How to push data to variety of different client types in near real time?

巧了我就是萌 提交于 2019-12-11 04:03:32

问题


We need is to push sports data to a number of different client types such as ajax/javascript, flash, .NET and Mac/iPhone. Data updates need to only be near-real time with delays of several seconds being acceptable.

How to best accomplish this?


回答1:


The best solution (if we're talking .NET) seem to be to use WCF and streaming http. The client makes the first http connection to the server at port 80, the connection is then kept open with a streaming response that never ends. (And if it does it reconnects).

Here's a sample that demonstrates this: Streaming XML.

The solution to pushing through firewalls: Keeping connections open in IIS




回答2:


I would go with XML. XML is widely supported on all platforms and has lots of libraries and tools available for it. And since it's text, there are no issues when you pass it between platforms.

I know JSON is another alternative, but I'm not familiar enough with it to know whether or not to recommend it in this case.



来源:https://stackoverflow.com/questions/50831/how-to-push-data-to-variety-of-different-client-types-in-near-real-time

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