How good and/or necessary are Stateful Web Services?

前端 未结 5 1115
感动是毒
感动是毒 2020-12-31 01:47

What kind of server do you people see in real projects?

1) Web Services MUST be stateless: Basically you must send username/password with every request, every reques

5条回答
  •  礼貌的吻别
    2020-12-31 02:41

    Ideally webservices (and web sites) should be stateless.

    Unfortunately this takes very well thought out problem domain, and clear separation of concerns.

    I've found that in practice most real-world web sites depend on state even though this limits their scalability.

    I've also found that many real-world web-services also rely on state.

    Ultimately the 'right' decision is the one that works for the specific problem, so it's probably okay to write a webservice that relies on state, and refactor it later if scalability becomes an issue.

提交回复
热议问题