Redian新闻
>
what do u think of SOAP vs REST ( or even FB's thrift server)?
avatar
what do u think of SOAP vs REST ( or even FB's thrift server)?# Java - 爪哇娇娃
w*i
1
早年在乡下闲着没事,大家会轮流讲些故事,如唐伯虎、祝枝山、孟丽君等,但至今还
能稍稍记得住的却是个小故事。
说——有几个少年正在争论关于世上有没有鬼,小明认为绝对没有鬼,所以从来
都不怕。于是就有几个小伙伴跟他打赌,说是村里祠堂有几口空棺材,今晚12点正,小
明你敢不敢去一趟,揣上几个饼,给每个棺材里分一个,这样证明你确实去过,大家方
能服输,佩服你有胆……小明觉得这没什么,当场一口应承。
当晚没有月光,小明12点走进暗摸摸的祠堂,黑漆漆的棺材大都没有盖盖,小明
开始发饼。为给自己壮胆,他每发一个饼就大喊一声:“给你一个……给你一个”……
喊到第五个以后愈发害怕,声音都变了调。
说时迟那时快,从最后一个棺材内忽地坐起一黑影,大喊道:“我也要一个!”
声音在静寂空间如雷炸响,小明大惊,撒开腿逃出祠堂,跌撞着往家里狂奔。
到了村中的岔路,斜刺里又跑来一黑影,伸出手对小明大叫:“我也要一个!”
小明顿时胆破,仆地猝亡。
……
这个故事说明世间可能没有鬼,有鬼也可能吓不到人,但人吓人可能会吓死人!
avatar
c*n
2
I know it's a dead horse.....
but I think it's too much hype and ultimately the issue is simply
serialization/deserialization of messages, like the way Thrift treats
it.
ultimately programmers just need to treat the service as an interface
and call that using the language that expresses the service. SOAP/REST
is simply an encoding of the rest ( XML envolope vs encoding of the URL
), developers should not care about such encodings, instead they should
simply care about the service language.
at
avatar
s*e
3
one thing that is always poped up in the debate of soap vs rest is the
simplicity of the protocol.
many think that rest protocol is much simpler and easier to use than soap.
But this really depends on your background and your taste.
xml seems to be more verbose than json considering the download and upload
size. this is also an important factor you have to weigh out if you have a
global deployment, especially for users with a limited bandwidth, high
network latency, and/ or slow network speed.
avatar
t*e
4
Use SOAP/WSDL/XML for B2B, heavy-weight, and transactional communications.
REST/WADL/JSON is more efficient for high-frequent, client/server
communications, such as Ajax. In many places, such as CMS/DMS, both flavors
of web services are supported.
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。