Stateful vs. Stateless Webservices

蓝咒 提交于 2019-11-29 09:21:07

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.

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.

State is where most bugs hide, too.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!