|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Stateless vs Stateful and Transactional vs Non-Transactional |
« View previous topic :: View next topic » |
Author |
Message
|
shashivarungupta |
Posted: Tue Jan 02, 2018 6:28 pm Post subject: Stateless vs Stateful and Transactional vs Non-Transactional |
|
|
 Grand Master
Joined: 24 Feb 2009 Posts: 1343 Location: Floating in space on a round rock.
|
Hi,
In many other forums including this, stateless and stateful web services architecture and design has been discussed in the past.
I wanted to bring it to the discussion again to understand the concept of stateless vs non-transactional messages as far as Web services (non-RESTful) are concerned.
Some of the Web Services (SOAP based) use Facade Services/Patterns using WebSpere MQ, whereas Non-facade Services (i.e. general Web Services) use SOAP/HTTP Protocol.
Would it be correct to say that to avoid the long running transactions (using single thread transaction for long running transaction), services can/should be implemented using MQ to PUT/GET messages from the MQ Queues to avoid Transactional behavior of the Service for long running transaction (also from Performance perspective) ? Also, these kind of Services will be called as Stateless Services ?
For example:
Web Service 1, Message Flow 1
Consumer Request --> (SOAP) --> WebService-1, Message Flow-1 --> MQ Queue (PUT)
Web Service 1, Message Flow 2
MQ Queue (GET) --> (SOAP Request) --> Service Provider
In this example, one web service has got two message flows, one is exposed as SOAP and another using MQ.
First one simply exposed to the Consumer over SOAP protocol and put the incoming messages to the MQ Queue and ends the thread/transaction.
Second flow, simply picks the message from that Queue and send it to provider as a SOAP call (for which it receives the SOAP response back, which gets logged (assume) and ends the thread/transaction).
Overall WebService, I believe is stateful cause it depends on the response from the Provider Service. Whereas flow1 is stateless and flow2 is stateful. Both the flows logically aren't to support long running transactions and purposefully end the thread as soon as the Unit of work is done.
Kindly suggest if my understanding differs with yours and there is more into stateless/stateful vs transactional/non-transactional messages.
Thank You in advance.
Happy New Year.
 _________________ *Life will beat you down, you need to decide to fight back or leave it. |
|
Back to top |
|
 |
bruce2359 |
Posted: Tue Jan 02, 2018 6:38 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
What did you learn from the other forums? _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
shashivarungupta |
Posted: Tue Jan 02, 2018 7:09 pm Post subject: |
|
|
 Grand Master
Joined: 24 Feb 2009 Posts: 1343 Location: Floating in space on a round rock.
|
bruce2359 wrote: |
What did you learn from the other forums? |
Different forums have different terminology to describe stateless/stateful pattern but none of them describe it with transaction/non-transactional behavior of the service.
Anyway... what I learnt from the other forums is summarized as if service is holding the data or waiting for some data to react/respond/transform accordingly, it will be called a stateful service cause the state of service depends on the nature of data.
If service doesn't depend on the state of data it will be called a stateless.
But again, they (other forums) talk about database, cache of data by client and/or server services/apps and their sessions, to further describe the concepts of stateful and stateless (with no reference to transactional/non-transactional messages).
Hence, I requested to suggest/share the point of view on this.
 _________________ *Life will beat you down, you need to decide to fight back or leave it. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|