How does the native mainlobby client get updates

Forum for discussing building user interfaces for controlling MLServer using the iPhone or iPod Touch.
bigDvette
Expert
Expert
Posts: 718
Joined: Thu Oct 12, 2006 12:19 pm
Contact:

How does the native mainlobby client get updates

Postby bigDvette » Mon Apr 05, 2010 10:17 pm

Mario / Dave,

I know with the iPhone we fire a getvar command and pass an array of server variables we want back to get updates. Something happens in the web server and client names get replaced and we get back a set of variables and their values to use. This requires polling and isn't ideal.

The cinemar mainlobby client get's updates automatically and I assume it isn't polling. I've written a number of flash and flex apps lately and many of them subscribe to a data service and get push updates. Does the mainlobby client work this way and if so can we tap in to that interface using the browser instead of having the browswer poll for variables? Or if that isn't viable, I'm interested in writing a web service that subscribes to MLServer for variable updates and then pushes them out to clients acting as a bridge for data.

Thanks in advance,

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: How does the native mainlobby client get updates

Postby CinemarDave » Tue Apr 06, 2010 3:17 pm

The MainLobby client establishes a client/server connection on a TCP socket when the client connects. Updates are automatically sent to all connected clients over the socket connection. This eliminates the need for polling but floods the client with a lot of data it might not necessarily need or want. This is not possible with a web connected client at this time. In fact polling for just the variables the page wants is fairly efficient.

bigDvette
Expert
Expert
Posts: 718
Joined: Thu Oct 12, 2006 12:19 pm
Contact:

Re: How does the native mainlobby client get updates

Postby bigDvette » Tue Apr 06, 2010 3:45 pm

So how much "load" would I put on the system if I polled every .5 seconds for updates to about 30 vars on 3 web clients?

What I may do is write a web service that polls mainlobby for updates but pushes them to the client based on what vars they have subscribed to.

I assume there is no supported way for someone to use the socket connection?


Return to “iPhone / iPod Touch Beta”

Who is online

Users browsing this forum: No registered users and 2 guests