Sunday, May 27, 2018

Re: Django channels with python background tasks

Hi Andrew,

Thanks a lot for your reply.

For a fast and easy approach I need the backend to be able to tell its status when asked by Django and be able to act when django sends some activity events.
The back end will be a long running program which will run in an infinite loop once started by django. After that django should have the capability to pause the program or stop the program Such events needs to be sent by django using HTML buttons and the back-end script should be able to act on those even and give ack that its done.

I am really sorry for asking very basic questions. But I started with django this month only so I dont have very good idea about it or how to achieve this.

Can you please guide me a bit. And point me a tutorial of some sort to achieve this.
From your videos about django channels what I understood so far is Django channels can be used to offload the heavy work loads from one app or one server to some small services and apps.

Thanks a lot in advance!

Regards,
Jaiswal.

On Saturday, May 26, 2018 at 3:34:53 PM UTC+5:30, Andrew Godwin wrote:
Hi Jaiswal,

I'm afraid that I can't give detailed help about what your best options are or walk you through how to do it - that's something you'll have to research and decide on yourself. Channels allows you to do low-latency communictation between Django back-ends and JavaScript, but anything you can do with it can also be done slower using a polling API connection.

My recommendation would be to start simple - doing it using an API that you poll every few seconds - and then once you have that figured out, look at how you could improve it using WebSockets and channels.

Andrew

On Sat, May 26, 2018 at 8:38 AM Sourabh Jaiswal <sourabhj...@gmail.com> wrote:

Hi,


I am writing a python based application(CLI Back End) which does telnet to some network components and gets some data. It saves the data in sqlite db.


For this application I am writing Django based frond end. Which will start the CLI app and monitor it. For communication between the CLI App and django I am not able to decide what to use. I read somewhere on net that django channels can be used in this problem.


I have no idea about what django channel is and what it does. Can some one please help me in this I need to come up with a tool for this CLI and django communication ASAP.



Thanks in advance!

Regards, Jaiswal.

--
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/2d704873-07cf-41d7-a747-0beb9ac85cfa%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/6e518095-793b-49e9-be57-7a0a2578b7a3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment