stateless vs state-free appserver

Posted by agent_008_nl on 10-Sep-2014 07:40

https://community.progress.com/technicalusers/f/19/t/1904.aspx?pi624=2

In 2010 some of you preferred stateless over state-free. Stateless requests could perform better and you could maintain context. How are the opinions nowadays, with 11.3 /11.4 available?

  I never tested the performance difference (anyone did in 11.3 / 11.4?), maintaining context sounds like using shared vars for me. I never used another mode then state-free. But now there is a customer moving from 9.1E to 11.3 and my first idea is to advise switching to state-free instead of the stateless mode used in 9.1E. Shared context is not used. Parallel running agents could become interesting. State-free looks most flexible, offering the most possibilities.

11.4 docs state:

(http://documentation.progress.com/output/OpenEdge114/pdfs/asaps/asaps.pdf)

 

Performance considerations

A state-free AppServer provides the highest degree of availability and responsiveness to clients

compared to a comparable configuration using any other operating mode. Because multiple

state-free AppServer instances and their agents can handle multiple requests from one or more

clients, multiple requests even from the same client can execute in parallel, vastly increasing the

potential response time for a given request.This capability provides the highest degree of scalability

compared to other operating modes. That is, a relatively small number of AppServer agents can

support many more client requests than even for stateless operating mode. As long as clients

never use bound agents, a state-free AppServer can make maximum use of its available agent

resources to handle client requests. This operating mode thus maximizes throughput for large

numbers of clients, especially if no attempt is made to maintain any context between client requests.

 

“If your application requires no context management on the AppServer and otherwise has no

programming dependency on a session-managed operating mode, you can choose the session-free

operating mode (state-free). For an existing session-managed AppServer application that meets

these requirements (maintains no context), you can immediately change the AppServer operating

mode to state-free with no code changes, thus converting the entire application to a session-free

model with potentially greater performance benefits.”

 

If you can use the session-free operating model, it has the following advantages over the

session-managed model:

• Both application services and Web services scale much more readily compared to

session-managed.

• The programming model for session-free applications—for the AppServer application and for

the client application—is simpler than for session-managed applications.

 

 

All Replies

Posted by gus on 10-Sep-2014 09:21

might be an improvement. but try first. nothing is ever as easy it might seem.

In theory there is no difference between theory and practice.

In practice there is.    --  J.L.A. van de Schnepscheut

Posted by Thomas Mercer-Hursh on 10-Sep-2014 10:39

Note also that 11.5 will have the new AppServer where agents are threads instead of processes.  This is much lighterweight and means that there is essentially no penalty for leaving an agent around with state when this is appropriate.  Yes, many AppServer calls should be done and over with in one call, but there are also some where it makes sense to leave a query open, for example, having delivered the first N records or something.   So, the rules may change!  They are signing people up for early access now.

Posted by agent_008_nl on 10-Sep-2014 13:11

Maybe the docs could be improved (more subtle marketing, please ;-). But in the meantime I would appeciate some comments of those who tried. Would save some others reinventing the .. yesyes.

This thread is closed