Push APIs like gmail, twitter and facebook

I want to create an application using the pushing mechanism. that is, without user interaction, we can push messages to the client when something happens on the server similar to what gmail does for its email messages and recent facebook activity messages.

How can I implement this using java.

Please help, thanks in advance.

+3
source share
4 answers

One way to achieve this is to use the long survey method.

The client opens a connection to the server, but instead of instantly returning the result, the server keeps the connection for a certain period of time and delays its response.

- , ( , ...), , , . , , -, .

, .

Java . , .

, , SO:

-/ , , 10 -, " ", - , "".

0

, , Comet aka Reverse Ajax, , .

:

  • Tomcat Reverse Ajax.
  • Jetty Comet.
  • DWR
  • Streamhub (, )
  • APE. ( Windows)
  • ( )
  • CometD by Dojo.
0

Pusher API. REST , Pusher -. API .

0

Despite the late answer, here is my question on how to make a push server. You can use socket-io infrastructure in combination with nodejs.The socket-io client must listen for events and socket-io on nodejs (server) can issue (push) messages, the client (socket-io on a web page) selects it and can do whatever he wants. There is a trick, you should know a little javascript. The socket-io protocol is an agnostic transport too!

Here are the links

Great record when using socket-io and nodejs

Socket io

nodejs

0
source

All Articles