Replies: 10 comments
-
Thanks for this question as I'm curious as well. I came upon this article from IBM https://developer.ibm.com/technologies/messaging/articles/difference-between-events-and-messages but it still does not answer how it will be with Orleans since Orleans can do streams and messages. In an ESB solution, I'm able to throttle the number of processors/components depending on the client quite naturally. I suppose this can be accomplished by creating a dispatcher grain which then can limit the number of processor grains (e.g. |
Beta Was this translation helpful? Give feedback.
-
Since there is broad interest in the question, I copy and paste a brief exchange that took place on gitter, it helps progress the discussion in the spirit of @drakeforte5 's message, however it doesn't really answer the question so hopefully a member of the core team can shim in to provide us an authoritative answer. Gitter discussion@oising Look at it from the other direction: What are the purposes of an enterprise service bus? One of the benefits is to allow you to swap out/re-route participants on the bus without disturbing the other participants, right? If you had all the grains for the entire company in a big project, running on a single cluster -- that isn't possible anymore, right? You've just create a single point of failure. If the cluster falls over, none of your company's systems work. With an ESB, One app dying doesn't affect the rest; and even if the ESB itself dies, in theory the other apps will run offline from it. Different scenarios. @nkosi23 Thanks a lot for your insights @oising , you make great points that I probably hadn't considered enough. My thinking is: when looking at the various failure modes in detail, is a separate ESB truly superior:
I am only talking about the scenario where one is interconnecting independent applications being each it fully developed using .NET and Orleans for their core business logic |
Beta Was this translation helpful? Give feedback.
-
For me the question is what you mean with "independent products". If independent means:
Then I would use another solution. Orleans is great for low level messaging and distribution of work, but for typical high level messages / events I would something like kafka or RabbitMQ to establish a communication between independent services. |
Beta Was this translation helpful? Give feedback.
-
From what I'm digesting at this point is use Grains in a bounded context. Bounded context might mean an app. Once data/events get out of this bounded context and shared across apps (enterprise level at this point) then Streams would be ideal solution since the producer/consumer are decoupled (provided that consumers are also in Orleans). Am I on point? Thanks. |
Beta Was this translation helpful? Give feedback.
-
@SebastianStehle Thanks for your input, in my case I am talking about:
@drakeforte5 This exactly the question i was writing as you posted! I am wondering what makes @SebastianStehle consider that Orleans Streams wouldn't be suited for cross-bounded context scenarios (especially since Orleans allows to plug in external stream providers like Kafka and RabbitMQ where needed). |
Beta Was this translation helpful? Give feedback.
-
The idea is not to advocate for Orleans at all cost but to learn more about best practices, and intended usage, and how far we can push Orleans and rely on it to build our enterprise infrastructure. |
Beta Was this translation helpful? Give feedback.
-
Orleans is a framework to create scalable distributed applications based on actor-model programing. In my opinion it not only don't provide any independency for your teams but also it could tight couple your teams since they have to share some part of source codes like Interfaces with each other. |
Beta Was this translation helpful? Give feedback.
-
Thanks for your input @zeinali0, and for the reference to MassTransit. As previously highlighted this thread is specifically about the case where each independent product is already heavily using Orleans because it is a good fit for the application (and generally speaking, the company builds all their product with Orleans). Like others in this thread you are essentially saying "pick the right tool for the right job", but the point of this topic is precisely to determine if and how Orleans could turn out to be an excellent tool under the aforementioned scenario. To avoid going circle, I feel what we really need at this stage of the discussion is to have a member of the core team or someone who did something similar with Orleans to shim in and comment on best practices, and intended usage, and how far we can push Orleans and rely on it to build our enterprise infrastructure in light of the scenario described in the previous posts. |
Beta Was this translation helpful? Give feedback.
-
I am not advocating against Orleans. It is a great tool. But when I would be the enterprise architect I would just think about the services as boxes and would not care about the implementation details. Then the question is for me: How can I establish a communication between these 5 services and be prepared that I might have 10 more services in 3 other programming languages in the future. Then I have questions like:
If you can connect streams to your enterprise bus it is a great solution, but you should not drive architectural decisions from the tools you have available at the moment and you would use at the moment. I have experienced it many times that a big shifts were made in the implementation. From C# to Java or the other way. Especially in micro service architecture and when some frameworks are only available for one framework. Therefore it is very important to be as independent as possible. If you use streams with kafka, then streams is just like a kafka client and there is no need that your five products are in the same cluster, because you only communicate over kafka. The question whether you use Orleans or not is then irrelevant. |
Beta Was this translation helpful? Give feedback.
-
@SebastianStehle just to clarify one minor point, I didn't imply that you advocated against Orleans. This remark wasn't targeting you, it was actually targeting myself 😄 . Since I am insisting on having a discussion going on the specifics of Orleans for this use case, I just wanted to clarify that my goal is not to advocate for Orleans at all cost, I am just trying to keep the discussion on track. Anyway, thanks a lot for these very helpful and relevant insights, I totally agree with you. What I am trying to do here is think about the many companies (including ours) who in practice develop all their products using .NET. I am trying to assess how far the Orleans idea can be taken to simplify the enterprise architecture of companies being exclusively invested in .NET in an innovative manner. This is in the spirit of: is there really a point in using an abstract repository pattern allowing you to swap the underlying data store you use, if you perfectly know that you are only ever going to use a SQL database, and that you never modify the kind of data store used by your applications in practice. Say we were having this discussion in the context of EntityFramework, then the topic of this thread would have been: considering the many features of EF (both providing an ORM, and allowing to call stored procedures directly and to have fine grained performance tuning strategies for different kind of queries), would it be viable to directly reference the DbContext API instead of building an additional repository abstraction on top of it, both to simplify architecture, and to keep the powerful features of EF in hand where needed. In this kind of discussions, while general architectural insights are relevant, and needed and truly add to the discussion, I am trying to keep the discussion mainly focused on the possibilities enabled by the specific characteristics of EF (here Orleans) for companies having a specific scenario/use case. |
Beta Was this translation helpful? Give feedback.
-
Say an enterprise has 5 independent products written in .NET and needing to pass messages to each other. This is generally done by connecting them to a central enterprise bus. My question is: if all the applications are using Orleans, is it an anti-pattern to use Orleans like an enterprise bus by having the project referencing Orleans.Server be a giant project containing a definition of all the grains of all the applications of the company? Are we supposed to have one Orleans cluster per product, or one Orleans cluster for the whole enterprise? What is the standard practice?
Orleans seems to allow for both scenarios, and Streams allow to pass messages without needing to couple separate applications with each others. All of this while allowing us to have strongly-typed interfaces where needed and appropriate. However I feel this may be too good to be true, and may actually turn out to be an anti-pattern that will bite us down the road. One challenge may be availability during the deployment of application updates to the Orleans server, however clustering may actually have been designed precisely to deal with this kind of scenario. Is it standard/recommended practice?
Beta Was this translation helpful? Give feedback.
All reactions