[Sugar-devel] Thoughts on Collab
Sam Parkinson
sam.parkinson3 at gmail.com
Mon Jul 25 22:13:13 EDT 2016
On Tue, Jul 26, 2016 at 9:56 AM, Abhijit Patel
<abhisandhyasp.ap at gmail.com> wrote:
> I have just found python modules like socket[1] for low level
> networking interface and SocketServer[2] which simplifies the task of
> writing network servers.
>
> Could using these modules be a better option?
>
> [1] https://docs.python.org/2/library/socket.html
> [2] https://docs.python.org/2/library/socketserver.html
> e
> Thanks,
> Abhijit
>
Hi Abhijit,
I think it would be good to just use TCP for our application protocol.
Topology wise, I think we should do like AbiWord does. That is, we
have a "leader" and everybody connects to the leader. The leader will
then parse the messages, optionally process them, and rebroadcast them
to all the other clients.
Initially, the leader can probably be the person who 1st shared the
activity. But if that person disconnects, or their computer looses
power, we need to change the leader.
We probably can't use the socket module directly, as we need Glib
mainloop integration so we don't block the ui. GLib will take a file
handle and give us a mainloop IOChannel via this api [1].
[1]
http://lazka.github.io/pgi-docs/index.html#GLib-2.0/structs/IOChannel.html#GLib.IOChannel.unix_new
[2]
https://developer.gnome.org/glib/stable/glib-IO-Channels.html#g-io-channel-unix-new
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20160726/578e84f9/attachment.html>
More information about the Sugar-devel
mailing list