I'm trying to apply hexagonal architecture to a project which will have several apps having to deal with the same domain model.
We will have for example an mvc website requesting the application service which will then deal with the domain model and data access layer. Everything is fine so far.
The question I have is when should I instantiate an application service class. Should I have only one instance of any class for all users (singleton) ? Or should I instantiate one per user and then have it hold some user data and be stored in user session ? Or should I instantiate a new class for each request ?
Of course any of these options is possible but I would like to get your best practices advices.
I guess the more stateless the class is the better it is, but stateless classes mean I need to pass user specific data with each method call which I don't particularly like.