Menu

Persistence Broker Singleton

2005-07-25
2013-03-07
  • Nobody/Anonymous

    Hello,

    I read the posts in forum about singleton of persistence broker. Does it mean, that you should have one singleton per client for several applications or could I even have one singleton for several clients?

    I can't imagine, that the latter scenario work correct, if the clients make arbitrary transactions. Consider the following simple example:
    1. client1StartTransaction
    2. client1DoWork
    3. client2StartTransaction
    4. client1DoWork, client2DoWork
    5. client1EndTransaction
    6. client2DoWork
    7. client3StartTransaction
    8. client3DoWork
    9. client3EndTransaction
    10. client2DoWork
    11. client2EndTransaction

    The background is: We are at the beginning of C# and .NET and want to install a new client-server architecture. We have up to 200 clients. Now I am thinking about how to install a enterprise service with AtomsFramework.

    Thanks for any help.

    Greetings
    Andreas

     
    • Richard Banks

      Richard Banks - 2005-08-06

      Hi Andreas,

      It's really up to you how to handle the singleton object, but in a nutshell, there is one singleton per process.

      That means under ASP.NET you should end up with one singleton per client session since there is a new aspnet_wp.exe process created per session.

      If you roll your own side of the server architecture you can decide wether to create new processes for each client (which ensures memory security, etc) or wether to share a process across multiple clients.

      - Richard.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.