Skip to main content
Known Participant
September 13, 2007
Question

Broadcast data

  • September 13, 2007
  • 1 reply
  • 359 views
Hi all,

I am a newbie to FMS (2). I'll be displaying some data in few systems 24x7 and will be updating data every day few times which should be reflected in the client systems automatically, kind of server push. Any help or reference would be appreciated.

Thanks in advance

Regards
Kishore
    This topic has been closed for replies.

    1 reply

    September 13, 2007
    Kishore,
    Couple of different ways to push data from FMS. Easiest way is to use the application.broadcastMsg method. That will call a remote method on all clients connected to the specified application.

    Another method would be to loop through all the clients object and then call your remote method. You have better control over who gets the data push, for example, everyone except admin clients.

    Below are some examples...
    //Ex: 1 loop through clients oobject
    for (i = 0; i < application.clients.length; i++){
    application.clients .call("remoteMethod", null, {params});
    }

    //Ex: 2 application.broadcastMsg method
    application.broadcastMsg("remotheMethod", {params});

    HTH,
    Shack
    Participating Frequently
    September 14, 2007
    you can broadcast from serverside script to all users or from a client to any subscriber of a specific stream (in this case the data broadcast is also recordable with time info, search for ns.send method) and you can also share a set of variable between user using SharedObject