State management


EJB design: State management

  1. State management (3 messages)

    I'm working on the design of a chat application using JSPs, Servlets and EJBs i.e. J2EE APIs.

    The client has mentioned that the site is going to have a very large number of concurrent visitors, in thousands.

    What I need to know is to maintain state, i.e. the login ID and Chat room ID, what mechanism would be the most efficient for a heavy load site :

    1) Using stateful session beans
      adv : memory management capabilities of the container -activation and passivation
     disadv : - as many beans as number of users
              - very high network traffic between web and app

    2) Using JSP JavaBeans to store state with stateless session beans as facade to entity beans
       adv : low traffic between web and app server
       disadv : as many JavaBeans as number of users and no auto activation and passivation facilities in the Web Server
    It is advised not to use stateful sessions beans because it is very resource intensive.
    Is there any other way to store state efficiently for a heavy load site.
    I'm using the MVC architecture on WebSphere 3.5

    This is urgent. Please reply. Thanx a million in advance.

    -Prasad Kamath

    Threaded Messages (3)

  2. State management[ Go to top ]

    How about managing the state in the JSP/Servlet session?
  3. State management[ Go to top ]

    You can't do this if you have more than one web server and you use load balancing - can you?.

    Anyone using any good state management techniques out there in an environment where you have more than one web server and more than one app server and you want failover capabilities?

    I have used a technique that stores the state info in the Servlet HttpSession, but it has to write the state info out to the database after each page in case the next request goes to a different machine. Farily simple, but it creates lots of database writes when you have a large site. I use a unique cookie value as the database table key and I store only simple data that can be written to the database in an XML blob. I choose to use the XML blob instead of packing the state data into a object the can be serialized and written to disk, because of the overhead associated with doing that.

    Any really simple solutions out there?
  4. State management[ Go to top ]

    Might be worth having a look at