Live data from Hacker News

Apache Pulsar is an open-source distributed pub-sub messaging system

pulsar.apache.org

191–200 of 249 posts

Re: Apache Pulsar is an open-source distributed pub-sub messaging system

#191
post #187
post #145

Earlier quoted context omitted.

For what its worth I have a java microservice running on 13mb of ram.

Without knowing what that service does, how many users/request it serves per second/day, I can only assume it just an http listener up on some port that returns "Hello {username}" when someone sends a GET request.

Nah, its full Java EE. Its fully possible to run low profile java.

https://quarkus.io/

Re: Apache Pulsar is an open-source distributed pub-sub messaging system

#192

This looks promising. Is there such thing as a generalized SQL query engine that runs over any key-value store that provides certain minimal core operations? For example, say you have a KV Store with basic mathematical Set operations like GET, SET, UNION, INTERSECT, EXCEPT, etc. The Engine would parse the SQL and then call the low-level KV Store Set operations, returning the result or updating KV pairs. This explains…

One of the challenges with layering SQL on top of a KV store is query performance. The most obvious way to model a secondary index on top of a pure KV store is to map indexed values to keys. For example, given the (rowID, name) tuples (123, "Bob"), (345, "Jane"), (234, "Zack"), you can store these as keys: name:Bob:123 name:Jane:345 name:Zack:234 At this point you don't need or even want values, so this is effectivel…

I disagree that an index is a set rather than a map: it is by definition a map from keys to row ids.

As for a generic relational layer over K/V stores, I think it’s a superficially appealing idea that would be impossible to optimize adequately in practice. Honestly, if you want to implement a distributed relational database, I would recommend starting with Postgres as your local storage engine and pushing down as much relational logic as possible to that layer. I have worked on such a system in the past and it produced very good results for minimal development effort.

Re: Apache Pulsar is an open-source distributed pub-sub messaging system

#193
post #74

Earlier quoted context omitted.

Did you check this? https://docs.nats.io/nats-streaming-concepts/intro "..Message/event persistence - NATS Streaming offers configurable message persistence: in-memory, flat files or database. The storage subsystem uses a public interface that allows contributors to develop their own custom implementations." and "At-least-once-delivery - NATS Streaming offers message acknowledgements between publisher and server (for…

Also check out Liftbridge ( https://liftbridge.io ), which is a Kafka-like API on top of NATS. Disclaimer: I'm the author and former core contributor of NATS and NATS Streaming.

I looked at Liftbridge when choosing a streaming platform for event sourcing, but the FAQ says it's not production ready. Is that still accurate?

Re: Apache Pulsar is an open-source distributed pub-sub messaging system

#194

Earlier quoted context omitted.

One of the challenges with layering SQL on top of a KV store is query performance. The most obvious way to model a secondary index on top of a pure KV store is to map indexed values to keys. For example, given the (rowID, name) tuples (123, "Bob"), (345, "Jane"), (234, "Zack"), you can store these as keys: name:Bob:123 name:Jane:345 name:Zack:234 At this point you don't need or even want values, so this is effectivel…

I disagree that an index is a set rather than a map: it is by definition a map from keys to row ids. As for a generic relational layer over K/V stores, I think it’s a superficially appealing idea that would be impossible to optimize adequately in practice. Honestly, if you want to implement a distributed relational database, I would recommend starting with Postgres as your local storage engine and pushing down as muc…

I'm not talking about just any index, I'm talking about using a plain KV store as an index.

The row ID can be encoded into the key. From my example, a basic mapping might be:

  name:Bob:123 => 
If your KV store is optimized for range scans, as they usually are, then there's no reason to store anything in the value, because a key range scan can efficiently jump to the first instance of a key prefix.

For example, if I want to search for "name = 'Bob'", then I simply start at the key "name:Bob:" and pluck the row ID from each key, scanning sequentially until I reach the end of my range.

This works great for multiple values. For example:

  name:Bob:123 => 
  name:Bob:124 => 
  name:Bob:125 => 
Finding all rows matching "Bob" is a matter of just scanning by prefix.

If you store row IDs in the value, you'll risk read/write contention on the value. Let's say there are multiple rows with "Bob", you'll end up storing something like:

  name:Bob => [123, 124, 125]
To add or remove row IDs you'll now have to merge values of unrelated rows, and make sure this happens atomically. That usually means locking.

This also puts a constraint on the number of row IDs you can fit in a single value. KV stores typically co-locate value data with keys, so now you might not be able to efficiently scan a large range without also loading that data. You can do tricks like introducing an indirection, where you don't store "row IDs", but "row page IDs", where each page is sharded maximum of N row IDs, allowing you to sidestep the size limit on values. But that comes with other costs.

I'm not counting in-memory stores like Redis here. Implementing in-memory indexes is a completely different ball game to something that needs to live on disk.

As for "superficially appealing idea that would be impossible to optimize adequately in practice", your assertion is demonstrably false: TiDB and CockroachDB both implement performant relational databases on top of general-purpose KV stores.

Re: Apache Pulsar is an open-source distributed pub-sub messaging system

#195
I'm sure Pulsar is worth it if you use most of what they're offering, but the Java client library is crusty, throws exceptions for control flow. I'm looking at a persistence mechanism built on top of NATS to replace it. The NATS layer would make it simpler to decouple the gateways from the persistence layer, and support our bulk computing needs.

Re: Apache Pulsar is an open-source distributed pub-sub messaging system

#196

I just finished rolling out Pulsar to 8 AWS regions with geo-replication. Messages rates are currently at about 50k msgs/sec but still in the process of migrating many more applications. We run on top of kubernetes (EKS). It took about 5 months for our implementation with a chunk of that work mostly about figuring out how to integrate our internal auth as well as a using hashicorp vault as a clean automated way to ge…

That's amazing, thank you for sharing.

I understand why you chose Pulsar over RabbitMQ, but wouldn't have Kafka been a good choice as well?

Re: Apache Pulsar is an open-source distributed pub-sub messaging system

#197

Splunk just acquired streamlio and most of the core devs got sucked up. While pulsar is a great product - are you not concerned that these guys are getting paid $$ bank to do something else now?

There is another company StreamNative, founded by core Pulsar/BookKeeper devs 1 year ago. :)

Re: Apache Pulsar is an open-source distributed pub-sub messaging system

#198
post #196

I just finished rolling out Pulsar to 8 AWS regions with geo-replication. Messages rates are currently at about 50k msgs/sec but still in the process of migrating many more applications. We run on top of kubernetes (EKS). It took about 5 months for our implementation with a chunk of that work mostly about figuring out how to integrate our internal auth as well as a using hashicorp vault as a clean automated way to ge…

That's amazing, thank you for sharing. I understand why you chose Pulsar over RabbitMQ, but wouldn't have Kafka been a good choice as well?

There are numerous places in the discussion where reasons for not choosing Kafka are elaborated.

Re: Apache Pulsar is an open-source distributed pub-sub messaging system

#199
From reading their documents, I really like the design of Pulsar. However, Kafka has been working so well for us and has much better integration with other components of our stack (Flink, Spark, NiFi, etc) that there's no compelling reason to switch.

I think Pulse should really focus on the integration with the rest of the Apache stack if they want to gain traction.

Re: Apache Pulsar is an open-source distributed pub-sub messaging system

#200
post #78

I just finished rolling out Pulsar to 8 AWS regions with geo-replication. Messages rates are currently at about 50k msgs/sec but still in the process of migrating many more applications. We run on top of kubernetes (EKS). It took about 5 months for our implementation with a chunk of that work mostly about figuring out how to integrate our internal auth as well as a using hashicorp vault as a clean automated way to ge…

Alrighty, a few questions: - what k8s definitions do you use, e.g. do you use the official Helm Chart, or have you written your .yaml's from scratch? - have you practiced disaster recovery scenarios in the context of k8s? Can you describe them briefly? - how do you upgrade/redeploy the Pulsar k8s components, i.e. does this cause the Bookies to trigger a cluster rebalance, or does it trigger the Autorecovery - for the…

Do you have a link to the eks networking bug?
Post reply on HN