long-polling


Long polling on a penny auction site?


On a penny auction site, there are a few fundamental requests that happen over time, namely:
Bidding request (when someone places a bid)
Timer updates
Leading bidder updates
I am trying to understand long polling a bit better and I'm stuck with this. As far as i know, Long polling is there to reduce Ajax requests. I.e. By only having ONE for visual updates, and ONE for actions. So, therefore:
bidding request (to place bids) will remain as is, but all the visual update requests will be combined into one "long poll" request, right?
If the user connects to the site for the first time, he will request the current state of the page by also passing in what he was last told the state of the page was. The server will compare it with the state of what it should be, and if they are different, it will pass the new state back to the user, correct?
When passing the state back, the LONG POLL will effectively stop, the screen will be updated, and a new LONG POLL will be started, correct?
Is this understanding correct so far?
If that is so, how will this in any way decrease the number of requests to the backend if the server still has to compare the state?
How will this help if the page is opened in 50 different windows by one user?
Long polling is used to simulate a connection in which the server pushes data to the client (rather than what is actually happening - which is the client requesting the information from the server). Basically the client requests data from the server, but rather than returning data to the client immediately the server 'holds' the request open - it can then return data to the client at a later time point - which can be used to simulate the server updating the client in 'real time'.
So in your example of an auction site the client might long-poll the sever for an item bid amount - the server would hold this request open, and when the bid value on that item changes can return the updated amount to the client.. this can be used to give the impression of the server updating the client as the bid amount changes.
As far as requests to the server go, this very much depends on how this is implemented. Obviously using long polling will reduce the number of requests made to the server compared with, say, getting the client to issue a new 'standard' request every second to check for updates. Multiple instances of the client will still result in multiple requests to the server - and moreover the server still has to deal with the overhead of holding the long polling requests open and responding to these when appropriate.. Apparently different servers, and server architectures, deal with this more effectively than others.

Related Links

Koa 2 router how to make a long poll request
Confluent long polling properties in kafka-rest
How to combine async and blocking requests in VuGen?
Long polling confusion
WAS Liberty & Atmosphere long-polling 1 min delay
Long Polling interval in atmosphere
MQTT long polling over GPRS/HSDPA
JS and CSS file fails to load when the page is refreshed in grails application which uses Atmosphere Meteor plugin
Security concerns in long polling
Kafka long polling
How to build the request for a long poll url for box.com
how to access enterprise events using Java code
Handle client timeouts when serving long polling with gevent
Long polling blocking multiple windows?
Long polling on a penny auction site?
Cannot implement long polling

Categories

HOME
twitter
client
oracle11g
mfc
raspberry-pi
read-eval-print-loop
alpha
windows-server
echarts
adfs
slurm
gitpitch
modx-revolution
quickbooks
quartz-scheduler
iolanguage
saxon
fatal-error
pugjs
database-replication
jprofiler
dbext
kryo
paging
graphicsmagick
kvc
extjs5
tibco-mdm
lcd
sparse-matrix
django-storage
facebook-access-token
url-scheme
nhapi
entitlements
ping
opentype
facebook-apps
bcd
oracle-fusion-middleware
hexo
suricata
az-application-insights
leading-zero
temporary-files
lumberjack
reportingservices-2005
http-redirect
slick-3.0
angular2-meteor
outlook-2013
network-flow
termination
pubmed
domain-model
git-diff
aurelia-validation
nstextview
brightcove
snmptrapd
android-cursor
windows-iot-core-10
ifs
objective-c-swift-bridge
google-feed-api
django-debug-toolbar
connect-by
persist
php-internals
php-parse-error
photobucket
jfugue
r-tree
ideamart
arcanist
operation
notify
qpainter
mdt
project-planning
didselectrowatindexpath
soundtouch
eclipse-memory-analyzer
buster.js
mqx
interface-orientation
sublist
quickdialog
word-processor
online-compilation
qtkit
osql
pendrive
gnu-prolog
xdomainrequest
self-extracting
recent-documents
sql-server-profiler
xfbml
swing-app-framework
privilege
anti-piracy
sustainable-pace
django-notification

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App