-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using Orleans with DB-per-client architecture #2224
Comments
Unless you need a strong isolation between clients for security, there is no need to use silo per client. No problem with your own persistence layer. A lot of Orleans users use their own persistence layer, as it gives them more flexibility. |
@lee-alexander Indeed, currently your choice to is to differentiate betweeen connection string (either to a different database or something like And indeed, as @gabikliot pointed out, it's a perfectly valid option to use application specific logic. The new provider that comes in 1.3.0 tries to be an efficient "blob storage" where on can pick between binary, JSON and XML serialization and accordingly a slot in the DB and also storage-side processing is supported. There is more in the documentation, in the SQL Server script itself and then some more design-time rationale at #1682 (comment). |
Thanks for the feedback everyone. We ended up building infrastructure to transparently attach and remove the databaseID to the grain identifier, which has been working well so far. |
@lee-alexander Can you share what you are solving with Orleans? Is it at the point that it could be added to http://dotnet.github.io/orleans/Community/Who-Is-Using-Orleans.html? |
We currently evaluating Orleans as a way to supplement our existing 3-tier web architecture to improve throughput and reduce the need for always reading from the database by taking advantage of in-memory grain state.
A brief overview of our existing 3-tier SOA architecture:
Each service has an in-memory cache for immutable or rarely-changed data, but given that much of our data is very mutable this has limited use and is local to that particular instance of the service.
We would like to introduce Orleans in between our existing services and the database. However, the main question we need to answer is, how can we make sure each grain knows the appropriate database to talk to? In our existing services, this is accomplished through the current session information passed along with the request. Some ideas we've thought of:
We wanted to ask the community for thoughts and to see what the recommended approach might be, as we are still new to Orleans. Thanks!
One quick edit: We will likely not use the built in persistence functionality, instead opting for something like Entity Framework / raw SQL to work with our large existing DB schemas.
The text was updated successfully, but these errors were encountered: