Tuesday, January 24, 2017

Re: Django-channels and JSON-RPC

alexander, I uploaded some ideas.

I think our best call is to extend WebsocketConsumer with some basic Json-RPC rules. I reused some code from this module:
https://pypi.python.org/pypi/jsonrpc2

See jsonrpc_test branch on repo. If we wrap it up nicely it should be fairly easy.

The last step is to create a decorator for the consumer's method so it can send back the "Method Not Found" error if needed.

Andrew, if you have some ideas or input on that, it would be much appreciated.

Cheers,
Fabien


Le mardi 24 janvier 2017 11:24:35 UTC+1, Fabien Millerand a écrit :
I just read that on the "Docs":

One thing channels do not do, however, is guarantee delivery. If you need certainty that tasks will complete, use a system designed for this with retries and persistence (e.g. Celery), or alternatively make a management command that checks for completion and re-submits a message to the channel if nothing is completed (rolling your own retry logic, essentially).


....


Le mardi 24 janvier 2017 09:41:41 UTC+1, Alexander Prokhorov a écrit :
My github name is "prokher". Would be happy to help.

вторник, 24 января 2017 г., 11:00:06 UTC+3 пользователь Fabien Millerand написал:
Hi,

I will start implementing something this week (starting today).
I will let you know how things go.
Alexander, I would be happy to share my work and get some feedback/help on this project. Let me know your github username and we can colaborate

Cheers
Fab

Le dimanche 22 janvier 2017 15:18:03 UTC+1, Alexander Prokhorov a écrit :
If you are going to implement JSON-RPC based on Channels, I would be happy to participate, I suppose we will start doing this in a few week anyway.

пятница, 20 января 2017 г., 13:36:49 UTC+3 пользователь Fabien Millerand написал:
Thanks a lot for your answer Andrew.

On a side note, would you be related to Mike Godwin? I just draw some moustaches on Trump's face 5 minutes before seeing your message... It is disturbing...




Le jeudi 19 janvier 2017 19:27:10 UTC+1, Andrew Godwin a écrit :
I haven't seen anything like that personally, but I also don't see all of the Channels stuff going on, so maybe there is one.

It would be relatively easy to implement as a single class-based consumer that dispatches to RPC handlers based on method name, though, as it matches the consumer pattern very well.

Andrew

On Thu, Jan 19, 2017 at 7:34 AM, Fabien Millerand <mill...@gmail.com> wrote:
Hi everyone,

I am looking to implement a websocket server based on Django using JSON-RPC protocol.

I have been looking around for a pre-made solution without success. I am also a newbie in Django so I am a little bit lost...

Did anyone try to develop something like that?


 

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/f8fdc9b4-ef54-4e39-ad66-9f5b4d9eb042%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/f52130e1-4ec4-48b7-b903-cadf22fb6d70%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment