Search code examples
asp.net-mvcorleans

Using ASP MVC as Client for MS Orleans


I want to use MS Orleans with an ASP MVC client. I want to use the mvc app as an Orleans Client Observer in this constellation. Will i get possibly problems with the threadlifetime / apppool recycling etc? The documentation of Orleans said

The client part, usually a web front-end,...

...For example, an ASP.NET application running on a web server can be a client part of an Orleans application. The client part executes on top of the .NET thread pool, and is not subject to scheduling restrictions and guarantees of the Orleans Runtime.

But I am not quite sure how to interpret this.


Solution

  • It simply means that your 'client' code (client being from the perspective of Orleans; it would actually be running on a web server in your case) follows the normal rules you would expect in an application in terms of thread dispatchers etc. I don't remember the specifics as it's been a while since I delved into the documentation, but I believe they guarantee certain things such as single-threaded execution per actor using some special scheduler on top of the thread pool.

    Most likely your web app should not run an Orleans silo per se, but as an Orleans client should merely serve as a gateway to talk to a silo running in a separate application. That way app pool recycles would not affect operation of the silo.

    See also: Developing a Client