Stateful vs. Stateless Webservices

前端 未结 3 1760
执笔经年
执笔经年 2020-12-17 16:27

Imagine a more complex CRUD application which has a three-tier-architecture and communicates over webservices. The client starts a conversation to the server and doing some

相关标签:
3条回答
  • 2020-12-17 16:48

    I've had reasonable luck with stateful web services. They do feel slightly dirty because the hole cookie session thing on top of HTTP is that; but on the other hand they were SOAP, so it would be kind of stupid to get too upset about beauty at that point.

    One thing to keep in mind is interoperability: if you are doing stateful web service your clients will have to support the same idea of state you do (usually cookies). But again -- worked fine for me.

    P.S. I assume you are in a container that will take care of keeping track of the sessions for you.

    0 讨论(0)
  • 2020-12-17 16:52

    Because keeping state in a webservice is difficult and if you aren't extremely careful and/or experienced sooner or later you might hit some very difficult to find bugs.

    0 讨论(0)
  • 2020-12-17 17:07

    State is where most bugs hide, too.

    0 讨论(0)
提交回复
热议问题