May-20-2018, 02:33 PM
Hi,
I am working on a project for which I have written the back end in python socket programming an multi threading. For the same project I am writing Django based website now.
My requirement is I need to control the back end script from django website. What the back end script does is.. it does telnet to some network elements fires some commands and get the relevant data which is further stored in a sqlite db created for each run.
Now I was thinking of overloading system interrupts in the back end script like SIGTERM and all. After that from django start the script and save its PID. Further to send signals to that script django will send system interrupts(Overloaded in back end script) to that PID. Based on which the back end script will do some action.
The problem what I am seeing in this approach is, its one way communication. If any error, for example if login to network element failed in back end script. There is no way for django to know that.
Sorry for so much text. But I needed to explain my understanding.
Can anyone please guide me right direction. I am very new to django and python and short on time to complete this project.
Thanks a lot in advance.
Regards, Jaiswal
I am working on a project for which I have written the back end in python socket programming an multi threading. For the same project I am writing Django based website now.
My requirement is I need to control the back end script from django website. What the back end script does is.. it does telnet to some network elements fires some commands and get the relevant data which is further stored in a sqlite db created for each run.
Now I was thinking of overloading system interrupts in the back end script like SIGTERM and all. After that from django start the script and save its PID. Further to send signals to that script django will send system interrupts(Overloaded in back end script) to that PID. Based on which the back end script will do some action.
The problem what I am seeing in this approach is, its one way communication. If any error, for example if login to network element failed in back end script. There is no way for django to know that.
Sorry for so much text. But I needed to explain my understanding.
Can anyone please guide me right direction. I am very new to django and python and short on time to complete this project.
Thanks a lot in advance.
Regards, Jaiswal