A quick read through and it looks roughly how I expect; I'm not an expert in JSON-RPC though so I'd want some other people to chime in.
As for releasing it on PyPI, I think that's the best way; I don't want to roll something like this into Channels directly. I would suggest you turn it from a Django app into a simple Python module though, so you can just do:
from channels_jsonrpc import JsonRpcWebsocketConsumer
class MyConsumer(JsonRpcWebsocketConsumer):
....
In your own consumers file.
Andrew
On Thu, Jan 26, 2017 at 12:14 PM, Fabien Millerand <millerf81@gmail.com> wrote:
Andrew,--I have finished to develop what I called the JsonRpcWebsocketConsumer:https://github.com/millerf/django-channels-jsonrpc/tree/ master/django_channels_ jsonrpc/django_channels_ jsonrpc
I was thinking of creating a pypy package, there is a little bit f more work to be done for that. But if you want it for your next release it is pretty much standalone. There is an example provided and plenty of tests.Let me know what you guys think, and if you see anything to be modified/added.Cheers.
Le mercredi 25 janvier 2017 09:09:48 UTC+1, Andrew Godwin a écrit :Yes, it's a bit alarmist if you don't come from the background of writing distributed systems. I just don't like to hide the truth one bit!All your software and hardware can fail in myriad ways; I have a talk I need to give about it at some point. Knowing how it fails is half the battle!AndrewOn Wed, Jan 25, 2017 at 12:06 AM, Fabien Millerand <mill...@gmail.com> wrote:Ok, I start to understand now.--To be frank the docs are a bit alarming :)
Le mercredi 25 janvier 2017 08:47:06 UTC+1, Andrew Godwin a écrit :I am not sure to understand. In which case can there be messages/frames lost?! Where does that happen? Between the server interface and the Django layer? I would need to know more about that... Otherwise I might need to move with uWSGI or something.... JSON-RPC in itself doesn't implement a timeout, althought the javascript client better have one...It simply means that it's possible that you might lose an incoming frame. This is also true of implementing it in uWSGI (the process handling the socket might get OOM killed, or the server might die, etc.)It's not a normal case, it's just that if something super bad happens, the resulting handling is to drop a message rather than play it twice. Most systems I know of that handle websockets do this.Andrew
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/97e75375-6caf .-4e8d-a781-be6da421840d%40goog legroups.com
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/49dbc038- .46e5-402c-a810-900d47a561bf% 40googlegroups.com
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/CAFwN1upCc96mWBP7ZCZm9y26ZJu7YRL7Q%3DvrxXOL43xx5Zc1gA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment