Hi Roger,

Have you seen Diamond (http://diamond.readthedocs.io/en/latest/) it may be
just what you need on the client side. Graphite (the server process) runs
on Django.

Dan

On 1 September 2017 at 11:56, Roger Gammans <rgamm...@gammascience.co.uk>
wrote:

> Hi all,
>
> I'm trying to build a system with a Django frontend which displays live
> information from other services on the backend (eg, the one running
> python - not the browser) host.
>
> To keep my dependencies as light as possibly I'm trying to avoid import
> the settings file for django and channel into the backend services. And
> run those a much lighter an simple process which concentrate on their
> tasks.
>
> I can easily create an async event in the backend processes; but to
> get the channels layer to respond to it; It seems that I need to create
> my own thread with it own tight loop doing something like:-
>
>         def forward_sensor_to_web(sensor_gen,dj_channel):
>                 for sensor_data in sensor_gen():
>                         Channel(dj_channel).send(sensor_data.as_json())
>
>
> Obviously this needs to be kept running and restarted if the
> loop/thread raises an exception etc.
>
> Is there any extant best practice for how to set this sort of
> architecture up using channels? Can I integrate the into the channels
> main Aio loop?  Or is channels to the best way to go?
>
> I'm seeking to make sure I'm not missing anything; before thing start
> to get hard to change.
>
> Anybody got any thoughts?
>
> --
> Roger Gammans <rgamm...@gammascience.co.uk>
>
> --
> 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/1504263403.30060.7.camel%40gammascience.co.uk.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Wildman and Herring Limited, Registered Office: 28 Brock Street, Bath,
United Kingdom, BA1 2LN, Company no: 05766374

-- 
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/CAPZHCY5Ces3s2%2Bdy%2Bhqz4xFmqUh27Noz_dQk%2BhyGtF5zoe-f8A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to