my dog learned polymorphism*
The moose likes Servlets and the fly likes Client pull and Server Push Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Client pull and Server Push" Watch "Client pull and Server Push" New topic
Author

Client pull and Server Push

Reba Shahid
Greenhorn

Joined: Mar 05, 2002
Posts: 2
Hi,
Could somebody tell me the difference between client pull and server push? As far as I can figure out client pull is when we send a GET request via a browser to fetch information from a server...but I can't figure out server push.


"Tell me and I forget. Show me and I remember. Involve me and I learn."
Manish Hatwalne
Ranch Hand

Joined: Sep 22, 2001
Posts: 2579

Have a look at these articles -
1) http://catt.bus.okstate.edu/itorms/joc/node19.html
2) http://jakarta.apache.org/turbine/turbine-2/pullmodel.html
3) http://www.bris.ac.uk/ISC/talks/lunchbyte0301/

HTH,
- Manish
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
Check ou thsi link http://wearcam.org/pushpull.html
You can also search google for more info.


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
chris scalise
Greenhorn

Joined: Apr 24, 2002
Posts: 1
A client pull is when a client program solicits data from the server. A server push is when a server sends unsolicited data to a client. An example of a server push would be an application where a client registers interest in a particular data item (lets say a stock symbol) and the server pushes data (such as stock purchase and sell data) as it occurs without the client having to continuously ask for updates.
Toby Davis
Ranch Hand

Joined: Apr 09, 2002
Posts: 65
FYI - note that a form of server push (such as MultipartResponse, from o'reilly) is not supported if you use Internet Explorer browsers as clients.
A situation would be when you want to change the header content type twice with one request. For example, you push an application/octet-stream to force a file-save, then you want to display html on the browser afterwards stating "finished!" by switching to text/html... all with one client request. Fails badly in IE.
---
[ April 24, 2002: Message edited by: Toby Davis ]

SCJP2 (1.4)
Val Pecaoco
Ranch Hand

Joined: Dec 05, 2001
Posts: 156
OK, here's the link to the com.oreilly.servlet.MultipartResponse doc.
Ex Animo Java!
-- Val


"Knowledge is power, but enthusiasm is the key." -- Lavern Barn
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16158
    
  21

And just to make it formal: under HTTP, you can ONLY do client pull, not serverf push (sneaking headers into the middle of a pull's response stream isn't really a push, since a pull already initiated it).


Customer surveys are for companies who didn't pay proper attention to begin with.
Wouter Zelle
Ranch Hand

Joined: Apr 12, 2002
Posts: 30
Originally posted by Tim Holloway:
And just to make it formal: under HTTP, you can ONLY do client pull, not serverf push (sneaking headers into the middle of a pull's response stream isn't really a push, since a pull already initiated it).

Correct, if you need to push info to a browser you should use an applet or Flash.
Reba Shahid
Greenhorn

Joined: Mar 05, 2002
Posts: 2
Thanks for all the info...
So is it possible to incorporate server push using Servlets ? :roll:
 
Consider Paul's rocket mass heater.
 
subject: Client pull and Server Push