Friday, January 27, 2017

Re: Django-channels and JSON-RPC

Thanks Alex.

I also rectified something that your test brought up.
I am modifying the structure at the moment to have a nice PyPI package.
I also remove the ability to push to master. Please make changes in a new branch and submit a push request next time ;)
But thanks anyway! I hope it will help in your project as well!

 

Le vendredi 27 janvier 2017 01:51:38 UTC+1, Alexander Prokhorov a écrit :
Dear Colleagues,

I've made some fixes in the code (most of them concerns Python 3 compatibility). I also added a test showing a problem with some kind of name clash.

пятница, 27 января 2017 г., 1:07:38 UTC+3 пользователь Fabien Millerand написал:
Yes, that was my thought as well...

Will do and let you know. It could be good to add a link in your docs  as a side note...

If you get any feedback let me know...

El 26 ene. 2017 22:38, "Andrew Godwin" <and...@aeracode.org> escribió:
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 <mill...@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!

Andrew

On 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%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...@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/49dbc038-46e5-402c-a810-900d47a561bf%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/b00Ie8wBPnc/unsubscribe.
To unsubscribe from this group and all its topics, 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/CAFwN1upCc96mWBP7ZCZm9y26ZJu7YRL7Q%3DvrxXOL43xx5Zc1gA%40mail.gmail.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/8be7afef-c9b0-48d8-ac8b-aca2b8ca2b18%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment