Pluggable transports for connecting tiers in different docker containers? #2105
Replies: 2 comments 4 replies
-
First, it is important to understand that the CSLA data portal is designed around an n-tier model, not an async service-based model. That has a set of consequences, most notably that each time you call the data portal, the data portal calls a service, and then expects a response, which it provides to you. Understanding this, we can talk about protocols. The data portal is protocol agnostic, and you can provide data portal channel implementations for any protocol that can support the concept of sending a message, getting a response, and returning that response to the caller. This is very easy with things like http or grpc, because they are designed from the ground up as call-response protocols. A little over a year ago I implemented a RabbitMQ channel to demonstrate how to implement this concept using async messaging. The same basic implementation will work for Azure Service Bus or any async messaging model based on queue endpoints. The core idea is that the channel listens on a "callback queue" to get any responses, and sends messages to whatever queue is associated with the service you are calling. The requirement is that the service send its responses to the "callback queue". Given that the client-side and server-side data portal are designed using this call-response model, that all makes sense and is generally pretty easy to implement. The upside, is that (especially when combined with the versioning/routing features of the data portal) you can have your client send a message to a Kubernetes cluster (queue endpoint), and that message can be handled by any active service instance within the cluster. Because the message includes the name of the callback queue, it doesn't matter which container, instance, node, whatever handles your request, because that service is the server-side data portal and will send the response back to the callback queue, so the caller gets the response. Again, not "SOA", but with the same scalability, reliability, fault-tolerance characteristics that most people are looking for in a service-oriented system. Without the headaches that normally come with being service-oriented. |
Beta Was this translation helpful? Give feedback.
-
Thank you very much for your explanation. It would be easy to scale nHibernate vertically up to some level by adding more power just to a single node, also it is possible to add L2 cache with redis cluster on other several hosts. But how DataPortal with nHibernate or other ORM can be used in several processes/containers simultaneously to avoid its L1 cache inconsistency in different instances? How such DataPortal instances can be scaled horizontaly by adding more DataPortal nodes without adding caching at level 2? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
Please let me know, which methods can be used to connect different tiers of .NET 5 application based on your latest CSLA except REST? I am going to place some of different CSLA tiers into different docker containers and need to connect them somehow.
Can I use following libraries like:
ServiceStack (most likely REST too), MassTransit,
light low level clients for MQ services like https://www.rabbitmq.com/dotnet.html ,
may be something else?
Examples of using MassTransit:
https://ffimnsr.medium.com/connecting-services-using-masstransit-rabbitmq-on-net-core-3-1-343b510c9202
https://blog.hildenco.com/2018/08/creating-masstransit-clientserver.html
Which one of mentioned variants of interconnections between microservices would you suggest for CSLA applications?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions