[ale] Looking for OS software.
Joseph A Knapka
jknapka at earthlink.net
Tue Jan 1 17:20:50 EST 2002
"Tommie M. Jones" wrote:
>
> I am looking for code to develop a basic client/server application.
> What I am looking for is a very basic event driven server that can send
> screen definitions (mostly data entry forms) back to a client GUI software
> and then whenever data is entered or a button is pressed the data is sent
> to the server.
>
> I know this sounds like a web application but what I would like is to
> update the data on the screen without redrawing the whole page. Also I
> want a continously connected socket between client and server (like
> telnet)
>
> I've seen Lots of applications that do this. Mostly older client/server
> enterprise applications. What I haven't seen is an open source package.
> I also would prefer the server to be written in C or C++
>
> Does anyone have any suggestions?
Many open-source apps have this general structure. The two that
spring to mind immediately are OpenSSH and VNC. Essentially,
what you need on the server is a loop of the form:
for(ever) {
wait_for_network_data_with_timeout();
deal_with_incoming_data();
}
And on the client:
for(ever) {
wait_for_user_input_with_timeout();
deal_with_user_input();
wait_for_network_data_with_timeout();
deal_with_incoming_data();
}
In C, "wait_for_network_data_with_timeout()" is spelled
"select()". The "wait_for_user_input..." bit will depend
heavily on what you're using for the user interface. Almost
certainly, you want to use a high-level language such as
Python or (if it's a simple app) Tcl for the client. For
any non-computationally-intensive code, even on the server
side, I'd use something higher up the abstraction ladder
than C or C++, unless there are "political" reasons for
insisting on it.
Cheers,
-- Joe
"I should like to close this book by sticking out any part of my neck
which is not yet exposed, and making a few predictions about how the
problem of quantum gravity will in the end be solved."
--- Physicist Lee Smolin, "Three Roads to Quantum Gravity"
---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be
sent to listmaster at ale dot org.
More information about the Ale
mailing list