Ajax push

N

NickPick

I'm working on www.PsychoAuction.com and I'd be interested in any
suggestions how I can make the refresh rate of the timer more
efficient. Is there any way that I could initiate a push command in
case a bid is placed and the price is updated for an item so that all
users are updated about the new price of the auction?
 
P

Peter Michaux

I'm working onwww.PsychoAuction.comand I'd be interested in any
suggestions how I can make the refresh rate of the timer more
efficient. Is there any way that I could initiate a push command in
case a bid is placed and the price is updated for an item so that all
users are updated about the new price of the auction?

Server push?

The browser can poll the server at regular intervals. This isn't
server push.

You can look into "comet" technology. The client opens a request to
the server, the server keeps the request open and responds when there
is data to be sent. This seems like flaky technology and requires
special server software to be reasonably efficient on that end.

I believe with a Flash movie or Java applet you can make a genuine
socket connection with the server so that the server can really push
information to the browser. Unfortunately that means an extra
requirement for the user.

Peter
 
D

David Mark

Server push?

The browser can poll the server at regular intervals. This isn't
server push.

You can look into "comet" technology. The client opens a request to
the server, the server keeps the request open and responds when there
is data to be sent. This seems like flaky technology and requires
special server software to be reasonably efficient on that end.

I don't know. I've done some work on a Comet client recently and I
like it for chat rooms and things like that. I don't see it as any
more flaky than polling a Web server with XHR.
I believe with a Flash movie or Java applet you can make a genuine
socket connection with the server so that the server can really push
information to the browser. Unfortunately that means an extra
requirement for the user.

Java is right out. Flash was never in IMO (talk about a
requirement!) I mean, where do you get cross-browser scripts to do
progressive enhancement with Flash?
 
R

Richard Maher

David Mark said:
Java is right out.

Bollocks!

Take a look at Java and UDP Sockets (Multicast would be ideal that they
still seem to fall foul of the sand-box same-origin rule evn when the
message originates from the codebase. Don't know if the new Java6 policy
files are effective here.)

PUSH your UDP Stock-price messages to the client and when they want to
buy/sell let them use Ajax (or a TCP/IP Socket) to verify the price and
perform the PULL transaction.

Flex didn't support UDP last time I looked, but Silverlight now also
supports at least TCP/IP Sockets, and the HTML5 people are really stuffing
things up with WebSockets :-(

Having a separate server process/thread dedicated to pushing asynchronous
messages to one client (and perhaps only one function for that particular
client) is the crap option, but is easy an therefore the one evrybody's
going for :-(
Flash was never in IMO (talk about a
requirement!) I mean, where do you get cross-browser scripts to do
progressive enhancement with Flash?

Adobe FAbridge?

Regards Richard Maher
 
D

David Mark

Bollocks!

Take a look at Java and UDP Sockets (Multicast would be ideal that they

It's Java! :(
still seem to fall foul of the sand-box same-origin rule evn when the
message originates from the codebase. Don't know if the new Java6 policy
files are effective here.)

PUSH your UDP Stock-price messages to the client and when they want to
buy/sell let them use Ajax (or a TCP/IP Socket) to verify the price and
perform the PULL transaction.

Flex didn't support UDP last time I looked, but Silverlight now also

What about Flex?
supports at least TCP/IP Sockets, and the HTML5 people are really stuffing
things up with WebSockets :-(

I don't see it as stuffing up at all. :) And I don't care about
anything MS is doing. Have we learned nothing?
Having a separate server process/thread dedicated to pushing asynchronous
messages to one client (and perhaps only one function for that particular
client) is the crap option, but is easy an therefore the one evrybody's
going for :-(

Easy is good. What are the other options (those not yet dismissed.)
Adobe FAbridge?

It's Adobe! They couldn't write JS to save their life last I
looked. :(
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,981
Messages
2,570,188
Members
46,733
Latest member
LonaMonzon

Latest Threads

Top