Stateful Web Services

流过昼夜 提交于 2019-11-28 05:54:22

问题


I'm building a java/spring application, and i may need to incorporate a stateful web service call. Any opinions if i should totally run away from a stateful services call, or it can be done and is enterprise ready?


回答1:


Stateful web services are a pain to maintain. The mechanism I have seen for them is to have the first call return an id (basically a transaction id) that is used in subsequent calls. A problem with that is that the web service isn't really stateful so it has to load all the information that it needs from some other data store for each call.




回答2:


Statefulness runs counter to the basic architecture of HTTP (ask Roy Fielding), and reduces scalability.



来源:https://stackoverflow.com/questions/94660/stateful-web-services

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