Re: Django Channels and Background Processes

2017-06-07 Thread Markus Schaber
Hi, Andrew,

We intended to implemen the pool in the "Background Processes" mentioned on 
https://blog.heroku.com/in_deep_with_django_channels_the_future_of_real_time_apps_in_django.
 
<https://blog.heroku.com/in_deep_with_django_channels_the_future_of_real_time_apps_in_django>

Apart from persistent information, it also contains non-persistent 
information (like which clients are currently connected, and when they last 
sent data), so I'm not sure whether a database is the right place to put 
that information.


Thanks,
Markus Schaber



Am Dienstag, 30. Mai 2017 19:17:35 UTC+2 schrieb Andrew Godwin:
>
> Hi Markus,
>
> There is no plan to roll Channels up to and including the 2.0 release so 
> far - it's persisting as an external project for now with its own release 
> cycle.
>
> Some of what you describe can be done with Channels - it gives you an 
> inter-process messaging framework for sending data between processes and 
> having background tasks acting on it - but it does not give the "pool with 
> state information", which should be done using a database, probably one 
> more designed for that kind of task like Redis. It also does not have 
> directly native timer support intermingled with other events - you have to 
> set up timer events and hook onto the client events (like sending a 
> message) and see if one happened recently enough to trigger what you want 
> to do.
>
> At the end of the day, Channels and ASGI (which powers it) are a low-level 
> framework for letting you design a more event-driven system on top of 
> Django. They will help you do what you want, but you will have to implement 
> your own layer of features and customisation, much like sites on top of 
> Django itself.
>
> Andrew
>
> On Tue, May 30, 2017 at 5:19 AM, Markus Schaber <markus...@gmail.com 
> > wrote:
>
>> Hi,
>>
>> We're currently working on a server application using Django as framework.
>>
>> Now, some advanced use cases appeared on the horizon, and we're 
>> evaluating how we'll be able to solve them in the future.
>>
>> We came across 
>> https://blog.heroku.com/in_deep_with_django_channels_the_future_of_real_time_apps_in_django
>>  
>> which advises to use "Django Channels" for that.
>>
>> The linked article claims that "The plan is to roll Channels into Django 
>> for the 1.10 release" - but as far as I can see, it's not in 1.10 nor 1.11. 
>> Can anyone confirm my findings?
>>
>> Additionally, the linked article shows "background processes", which 
>> could fit nicely into our concept, as we need functionalities like:
>>
>> - Some pool with state information about certain clients (whether they're 
>> currently connected via web socket, which messages they sent etc...)
>>
>> - Based on some timers (scheduled jobs, or clients were not connecting 
>> for some time, etc...) we need to get active on the server side (e. G. send 
>> emails, or send messages via web socket to other clients, etc...)
>>
>> Can those background processes be used to implement such functionality? 
>> We did not find any documentation about them apart from the image yet, so 
>> pointers are welcome. :-)
>>
>> The pool information mentioned above needs also be available for clients 
>> using http messages, so we'll need to access that data from the "view 
>> functions".
>>
>> Is it possible and feasible to implement those features using Django?
>>
>> Thanks in advance,
>> Markus Schaber
>>  
>>
>> -- 
>> 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/3eb9e492-c7bf-472e-81dd-5957df8ed3bd%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/3eb9e492-c7bf-472e-81dd-5957df8ed3bd%40googlegroups.com?utm_medium=email_source=footer>
>> .
>> 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+unsubscr...@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/75518b56-a6ff-43d9-b57a-0b188fe45fe5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Django Channels and Background Processes

2017-05-30 Thread Markus Schaber
Hi,

We're currently working on a server application using Django as framework.

Now, some advanced use cases appeared on the horizon, and we're evaluating 
how we'll be able to solve them in the future.

We came across 
https://blog.heroku.com/in_deep_with_django_channels_the_future_of_real_time_apps_in_django
 
which advises to use "Django Channels" for that.

The linked article claims that "The plan is to roll Channels into Django 
for the 1.10 release" - but as far as I can see, it's not in 1.10 nor 1.11. 
Can anyone confirm my findings?

Additionally, the linked article shows "background processes", which could 
fit nicely into our concept, as we need functionalities like:

- Some pool with state information about certain clients (whether they're 
currently connected via web socket, which messages they sent etc...)

- Based on some timers (scheduled jobs, or clients were not connecting for 
some time, etc...) we need to get active on the server side (e. G. send 
emails, or send messages via web socket to other clients, etc...)

Can those background processes be used to implement such functionality? We 
did not find any documentation about them apart from the image yet, so 
pointers are welcome. :-)

The pool information mentioned above needs also be available for clients 
using http messages, so we'll need to access that data from the "view 
functions".

Is it possible and feasible to implement those features using Django?

Thanks in advance,
Markus Schaber
 

-- 
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+unsubscr...@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/3eb9e492-c7bf-472e-81dd-5957df8ed3bd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.