Server side push


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 7 of 7

Thread: Server side push

  1. #1
    Join Date
    Feb 2004
    Posts
    9

    Question Server side push

    Hi all,

    I have a project regarding network programming, and encountering a problem now.

    The situation as follows:

    I got a server program which make a server socket and listen to a dedicated/fixed port for clients connection. Suppose there is client connecting to our server, server will create a thread to serve for the client and sending data through the socket, It's seem find!!
    Due to it is a real time system, we need to implement that the server will send out the same data every 1 mintue to all clients who are connected to the server. That mean all the clients should received the same data every 1 minute. So i think server side push technology should be implemented.
    But I don't know how to broadcast the data to client in java, anyone can help?

    many thanks!

  2. #2
    Join Date
    Nov 2004
    Location
    Norway
    Posts
    1,560
    Is it not possible to have a scenario where the client side has an applet that
    sends requests to the server at specific intervals, indicating the clients latest update,
    and the server side sends the latest update back if required ?
    eschew obfuscation

  3. #3
    Join Date
    Feb 2004
    Posts
    9
    Thanks sjalle first!

    If clients make request to receive the data from our server, there will be a case that different clients receive different data. It is because it is a real time system, data may change in a short period(maybe 1 to 2 minutes), so suppose all the clients should make request at the same time, but it is difficult to ensure this.

    Thanks again!!

  4. #4
    Join Date
    Nov 2004
    Location
    Norway
    Posts
    1,560
    Perhaps you need a fast connection, and if the clients need different data depending on:
    - their last data exchange
    - their user authentication
    - the state of the info (from both sides)
    you should have a 'housekeeping' system that track this info, you may need a
    database, which I am sure you already have (according to your description).

    I've done similar stuff (synchronizing a databse on a lan) but you will have to give
    me more info so I can be more specific.
    eschew obfuscation

  5. #5
    Join Date
    Mar 2005
    Location
    VA
    Posts
    3
    Essentially, what your asking for is a multicast mechanism (broadcast messages to many clients). Have you looked at java.net.MulticastSocket?

  6. #6
    Join Date
    Jul 2006
    Posts
    6

    Cool iPush should meet your needs

    Quote Originally Posted by Ahsai
    Thanks sjalle first!

    If clients make request to receive the data from our server, there will be a case that different clients receive different data. It is because it is a real time system, data may change in a short period(maybe 1 to 2 minutes), so suppose all the clients should make request at the same time, but it is difficult to ensure this.

    Thanks again!!
    Indeed, what you describe is a real time data distribution system. Such a system should be built with push technology.

    I think iPush Server is what you need. It also supports J2ME for MIDP2.0 and Flash.

    iPush Server
    http://www.icetechnology.com/products/ipushv2/

    The Vender's Site
    http://www.icetechnology.com

    They also provide demos developed with flash, you may surf their site and find them.

  7. #7
    Join Date
    Oct 2005
    Posts
    107
    Are you the iPush spokesman. I think he wants to implement it himself...

    http://java.sun.com/j2se/1.5.0/docs/...astSocket.html
    When one sends a message to a multicast group, all subscribing recipients to that host and port receive the message (within the time-to-live range of the packet, see below). The socket needn't be a member of the multicast group to send messages to it.

    When a socket subscribes to a multicast group/port, it receives datagrams sent by other hosts to the group/port, as do all other members of the group and port. A socket relinquishes membership in a group by the leaveGroup(InetAddress addr) method. Multiple MulticastSocket's may subscribe to a multicast group and port concurrently, and they will all receive group datagrams.

    Currently applets are not allowed to use multicast sockets.
    Can this be setup so only the server can send messages??

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center