sending text from experiment server to client

20 views
Skip to first unread message

KH.M.Y

unread,
May 9, 2019, 8:23:34 PM5/9/19
to weblabdeusto
Hello everyone,
I'm trying to develop a laboratory by weblab duesto and i want to do some thing like push notification from experiment server to the client user "sending data from server to client".
I work on managed laboratories, can any one help me.
Thanks for all..

Pablo Orduña

unread,
May 10, 2019, 4:25:25 AM5/10/19
to weblab...@googlegroups.com
Hi,

There are two ways:

  a) If you have the chance, take a look at weblablib: https://developers.labsland.com/weblablib/   It supports websockets natively so the experiment can indeed push data to the client. It's unmanaged, but right now it's the easiest way to implement a lab. The complete example: https://github.com/weblabdeusto/weblablib/tree/master/examples/complete  shows how and don't hesitate to contact us for any question. Also, if you're not using Python, the interface specification is here.

  b) If you need to use the managed approach, then the only way you have is through polling: making a request every few seconds to see if something has changed. In the archimedes lab, for example (see code here), it's every few seconds calling ALLINFO:ball1:ball2, and the command checks the status and returns it to the user. If you do it fast enough, the effect is similar. However, it's less efficient and takes much longer than using other techniques as websockets or HTTP Long polling (where you send messages continuously, and the server sleeps for few seconds until there is a change to be submitted to the user); both are not supported unfortunately in the managed approach.

Best,

--
You received this message because you are subscribed to the Google Groups "weblabdeusto" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weblabdeusto...@googlegroups.com.
To post to this group, send email to weblab...@googlegroups.com.
Visit this group at https://groups.google.com/group/weblabdeusto.
To view this discussion on the web visit https://groups.google.com/d/msgid/weblabdeusto/c325312b-f93b-4738-a51e-1f90b22c9067%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Pablo

KH.M.Y

unread,
May 10, 2019, 6:55:26 AM5/10/19
to weblabdeusto
Thank you very much for your reply,  Mr.Pablo
Reply all
Reply to author
Forward
0 new messages