Webservices and broadcasting to peers

  • Thread starter Thread starter Rotsey
  • Start date Start date
R

Rotsey

Hi

This a related question to recent post.

I am thinking of using webservices to handle comms for a game I am dev.

But not sure you when sending data to a webservice how it broadcasts
that data to other peers.

Do the peers have to block and wait for data?

rotsey
 
Rotsey said:
I am thinking of using webservices to handle comms for a game I am dev.

But not sure you when sending data to a webservice how it broadcasts
that data to other peers.

Do the peers have to block and wait for data?

I you are going to use a WebService, all the peers will have to "poll"
the webservice to find out if there is new data available. Web Services do
not provide a mechanism for "pushing" data back to the client without the
client making a call into the webservice. This means that nothing is
"broadcast", but instead data is kept in a central storage (the web server)
and the clients have to make repeated calls into the server to find out if
there is something new in that data.
That doesn't mean that the clients have to "block". Instead, the web
service will give an answer of "no new data available at this moment", so
the client can continue doing whatever the game does when noone else is
doing anything, and then poll the webservice again after a little while. If
this mechanism is not fast enough for the dynamics of your game, you may
wish to reconsider the communications mechanism, and use something else
instead of web services.
 
great answer. thanks Alberto

Alberto Poblacion said:
I you are going to use a WebService, all the peers will have to "poll"
the webservice to find out if there is new data available. Web Services do
not provide a mechanism for "pushing" data back to the client without the
client making a call into the webservice. This means that nothing is
"broadcast", but instead data is kept in a central storage (the web
server) and the clients have to make repeated calls into the server to
find out if there is something new in that data.
That doesn't mean that the clients have to "block". Instead, the web
service will give an answer of "no new data available at this moment", so
the client can continue doing whatever the game does when noone else is
doing anything, and then poll the webservice again after a little while.
If this mechanism is not fast enough for the dynamics of your game, you
may wish to reconsider the communications mechanism, and use something
else instead of web services.
 

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

Back
Top