Threads, Client server model and wodssh - WeOnlyDo Discussion board

Threads, Client server model and wodssh (wodSSH / wodSSH.NET)

by Stelios, Monday, February 27, 2006, 08:09 (6642 days ago)

Greetings to all !
We are trying to develop and app using VB, where depending on which form you are viewing different requests are send to the remote host.
These requests consist of linux commands to retrieve varius info from the remote host at different time intervals
For example one type of request/command should be send once a second , others at different intervals.
Since bw is an issue we can not have multiple connections all running at the same time, but we need a way to seriaze them and execute them depending on (time) priority.

Our current model is using a 2 dimentional array to hold info on the command to be executed.
A timer event then parses the array and sends the commands using the non blocking mode of wodssh in background so that other tasks running in the foreground can procceed at the same time.
(The quotes in forground and background are intentional ;) )

The thing is we are having problems when trying to display info from the first command while the other is been executed in the background
or when we try to move the windows etc...
The app friezes or no more data are send to the host

To solve this one option is to use the win32 api and create a seperate thread, the other is to create a client/server model, where the server doing the ssh connections runs as a different task and communicates with our app through some signaling mechanism.

What i would like to know is if wodssh would work on a different thread as descussed in this
http://www.codeproject.com/threads/VBThread.asp

or we should go for a client/server solution ?



Complete thread: