orleans icon indicating copy to clipboard operation
orleans copied to clipboard

New orleans streaming feature? LocalPubsub

Open xiazen opened this issue 9 years ago • 5 comments

In streaming business, a lot of application prefer streaming through local streaming infra for performance concerns, such as to retrieve low latency. One typical scenario of streaming application is producer and consumers stays in the same host, using local streaming infra to communicate with each other. While in Orleans streaming infrastructure, using local streaming infra is not always guaranteed.

Currently Orleans streaming infra has two subscribe model. One is implicit subscribe, which guarantee using local streaming infra, but unfortunately it lacks flexibility. Another more flexible model is explicit subscribe, whose streaming infra is implemented on top of a set of distributed grains. So in the second model, using local streaming infra is not always guaranteed.

Me and @jason-bragg is tinkering a third model, which guarantee the above requirement. The purpose of this issue is to expose this idea, to see whether this feature is valuable and how many users are interested.

#2771 is an attempt of this model, to give you more context about this model. It is definitely not complete, especially in the persistence side. It just fits in a narrow set of use cases.

xiazen avatar Mar 03 '17 23:03 xiazen

I did not understand the new idea, thus cannot advice or comment. What is local steaming? implicit is unrelated to local, explicit is unrelated to grains. And finally, what is the new feature?

gabikliot avatar Mar 04 '17 08:03 gabikliot

Sorry I apologize, my way of explaining things is confusing. Let me rephrase it.

Currently, when producer grain produce items, all the items got batched in a queue locally on the host, and then the local pulling agent pull from the queue, and then category items into different streams and deliver new items in each stream into its consumer grains. Because of the way streaming infra is designed currently(why I mentioned explicit pubsub or implicit pubsub previously), those consumer grains can be in any silo of the cluster, so when pulling agent deliver items to consumer grains, it's reaching remote consumer grains. This is the part I call inefficient previously, since many streaming application prefers just making local communication for performance concern.

The new feature is essentially to design a new feature in streaming infra, which guarantee producer grain and consumer grain uses local streaming infra. or steaming infra shouldn't have to make remote communication to consumer grains to deliver items. While how to do it is an open discussion. Or is this feature valuable or not is an open discussion.

xiazen avatar Mar 06 '17 22:03 xiazen

I too am confused about the implicit/explicit distinction, since those properties only affect the registration process.

Let me see if I get the gist of your proposal. Your proposal is adding the ability to create streams whose items will only be distributed to grains on the local server?

If this is what you're describing, is there a reason why it must be a firm rule, rather than a suggestion? For instance, why not just ensure that your publish and subscribe grains are all created on the same server with the PreferLocalPlacement attribute? The streams could still hypothetically send data across the network, but in practice the messages would be local.

If you need a firm guarantee, you might want to look at using dependency injection to inject some pub/sub service that you can be sure will be local only. A quick google pulled up this: https://github.com/flq/MemBus but I'm sure there are plenty of others.

lucasgodshalk avatar Mar 14 '17 12:03 lucasgodshalk

We are marking this issue as stale due to the lack of activity in the past six months. If there is no further activity within two weeks, this issue will be closed. You can always create a new issue based on the guidelines provided in our pinned announcement.

ghost avatar Dec 11 '21 01:12 ghost

This issue has been marked stale for the past 30 and is being closed due to lack of activity.

ghost avatar Mar 05 '22 02:03 ghost