Python (Django). Store telnet connection -


I am programming web interface that communicates with Telnet via Cisco switch. I want to create a system that is storing one telnet connection per switch and every script (web interface, cron jobs etc.) can access it. Due to the creation of a single query queue for each device and many concurrent telnet connection, it is necessary to prevent large Cisco processor load. How can I do this?

Update

The option with connection handling daemon is good and will work best. Sharing Telnet connection objects between scripts can be difficult and debug, but this option is interesting because the interface is only being used by some operators and cron jobs.

The usual way is to have a process to run in the background, which constantly keeps on telecommunications connections and keeps them Queued commands are kept to go down.

After that join the front-end scripts (e.g., via Unix socket) to get commands and results asynchronous for command.

But it can be overkill. How many people are you expecting to use a switch interface? Only the lightweight options for the web part will be to keep Telnet connection objects in the web script, and only one instance of your webpage will launch to configure the web server / gateway.


Comments