What is the difference between Stateless and state-free

Hi ,
Any one can tell the exact difference betwen Stateless and State-free AppServer Connections.
My understanding about stateless is the following:-
Each client request to the AppServer can be assigned to a different Application Server process
Context is maintained between requests, but because the broker assigns a request to any available Application Server process, the context available is uncertain. There fore, context between requests and connections must be maintained programmatically and outside of the Application Server Process.

Stateless I will use when I need to fetch query for the single time(lookup) or to fetcha stock balance etc..
When I read the document I can't se much significant difference between state-free and stateless. In which scenario I can use the state-free?
TIA
Philip
 

tamhas

ProgressTalk.com Sponsor
Stateless and state-free are both disciplines limited to a single message. With stateless, there is no automatic cleanup, so you have to be sure to cleanup anything before you end the connection. With state-free, the cleanup is automatic.
 

Casper

ProgressTalk.com Moderator
Staff member
With state-free, the cleanup is automatic.

In what sense is this automatic? What does it cleanup?
I am quite sure it wont change the state of the appserver after a request, that is still the responisbility of the programs running on the appserver. It also doesn't cleanup dynamic objects...

I am also always struglling with the difference between the 2. I know there is a difference with connecting. A statefree appserver makes only a logical connection to the broker while a stateless one makes a fysical connection to the broker.
You can see that: If you connect to a state-free apserver and query the appserver then you see the request time is still 0 while connecting (just issue a connect) to a stateless appserver results in some time needed for the request.

The actual request with a statefree appserver is only done when running a program on the appserver.

I read the documentation many times on this and the difference seems to be very subtle.

I am also quite interested in finding out the real difference between the 2.

Regards,

Casper.
 

FrancoisL

Member
Personally i noticed the cleaning up difference from using both states.

It not about DYNAMIC objects like query but more like TEMP-TABLE and LOCKS. If you create TEMP-TABLES in stateless and don't empty them before the end of the program your temp files while grow to huge sizes pretty quickly. Locks will also remain on record unless you release them before the end of the program.

In state-free Locks will be released when the program ends and temp-table will be cleared automaticly.
 

Casper

ProgressTalk.com Moderator
Staff member
Thanks for that. I didn't encounter that one yet.
We use state free apsserver in our new product.

Yesterday I also found out that, although it is possible to lock the appserver by running a procedure persistent, it isn't possible to make another call to the appserver to run a procedure in that persistent procedure. This is possible with a stateless apserver. (and yes I know it is a very bad thing to do, but tried it anyway out of curiousity).

Casper.
 
Top