I'm currently working on a project that need to be dynamically scaled on demand according to the need.
My question is about scaling spring context. My web application has a classical multi module core (service, persistence, domain), which use use by client application (webapp, api).
The user end application could be clustered, database too, but I don't know how to proceed with spring context.
I plan to use Scala Akka actors on Spring service, but I can't be persuaded by the solution of using one context exposed by actors. All of the rest of the application is built with event driven techniques (Spring events are produced by the service layer).
I already built different webapps by user profile to scale according to user role (Eg. admin, enduser), however the only thing is Spring Context for business operations.
Question: Do I have to merge in one single context shared by all client applications or should I initialize one context per application?