Server push: comet vs ape?

后端 未结 8 977
难免孤独
难免孤独 2021-02-15 16:24

I\'ve read a little about comet and also APE.

Which one is better? I want the users to see other users updated content. Like Google Wave.

And in comet, there are

8条回答
  •  我在风中等你
    2021-02-15 16:49

    Comet is a technology, APE is one of a lot implementations. What about iframe vs traditional ajax? Use HTML5 WebSockets anywhere you can use it.

    At now all modern browsers use XMLHttpRequest for ajax requests (client-to-server, something back and end). But sometimes JS-applications sending files via iframes and its ok. Not all implementations of XMLHttpRequests supports multipart-data transport (Chrome and modern FF afaik). WebSockets was created especially for Comet-like technologies (when client opening only one connection and web-server pushes some data to client via opened stream or WebSocket) so use it if you can.

    BTW I'll recommend you to use independent web-server for your Comet-streams (or channels).

    P.S. I like APE.

提交回复
热议问题