Network Application Query


M

Mike Copeland

I am trying to design a small network system that uses only an
application I've developed in MS C/C++ (ver. 6.0) - a Console
application. This system would have up to 6 "terminals" that run the
application (a data entry program) but needs to send and receive some
data to and from a central point after a successful data entry has been
done. This data entry will be done by "entrants" to an event, one-by-
one, who, when they finish processing their entry will go to the
"central point" system and pay for and receive their materials.
This system needs to have the terminals perform certain data
validation and various functions, but when an entry is complete send
some pertinent information to the "central point" so it can print
out a receipt and let the operator there know what to charge and hand
out to the person who has "entered". The distance between all these
activities is 10-20 feet, so this network can be wired.
I know almost nothing about setting up networks, and my application
is not a Windows GUI program (I don't have the skills to program a
Windows GUI app.), so I don't know where to start in this endeavor. The
terminals would be running Windows XP or Vista, and I would hope the
network could be set up in such an environment.
I believe the network could use semaphore files to exchange the
message information, since directories could be shared commonly (is this
correct?). Therefore, my hope is that the terminal program could write
the message information on (terminal-unique) files; the central point
system could scan for and process these files when they contain data
(and clear the files when its work is done), and have this somewhat
crude "communication" done totally by shared files.
This is my thinking, based on very limited knowledge of simple
networking, as well as my inability use new development environments
(e.g. OLE, TCP/IP, etc.) that I really don't have time to learn.
Is this idea workable...or is it impossible? How might I start
creating and building such a system environment? TIA
 
Ad

Advertisements

P

Philip Herlihy

Mike said:
I am trying to design a small network system that uses only an
application I've developed in MS C/C++ (ver. 6.0) - a Console
application. This system would have up to 6 "terminals" that run the
application (a data entry program) but needs to send and receive some
data to and from a central point after a successful data entry has been
done. This data entry will be done by "entrants" to an event, one-by-
one, who, when they finish processing their entry will go to the
"central point" system and pay for and receive their materials.
This system needs to have the terminals perform certain data
validation and various functions, but when an entry is complete send
some pertinent information to the "central point" so it can print
out a receipt and let the operator there know what to charge and hand
out to the person who has "entered". The distance between all these
activities is 10-20 feet, so this network can be wired.
I know almost nothing about setting up networks, and my application
is not a Windows GUI program (I don't have the skills to program a
Windows GUI app.), so I don't know where to start in this endeavor. The
terminals would be running Windows XP or Vista, and I would hope the
network could be set up in such an environment.
I believe the network could use semaphore files to exchange the
message information, since directories could be shared commonly (is this
correct?). Therefore, my hope is that the terminal program could write
the message information on (terminal-unique) files; the central point
system could scan for and process these files when they contain data
(and clear the files when its work is done), and have this somewhat
crude "communication" done totally by shared files.
This is my thinking, based on very limited knowledge of simple
networking, as well as my inability use new development environments
(e.g. OLE, TCP/IP, etc.) that I really don't have time to learn.
Is this idea workable...or is it impossible? How might I start
creating and building such a system environment? TIA

It's crude, but it should be possible to make this work. First, make
sure each client can see and write to a shared folder on the server
machine. Create a suitable folder, ensure suitable accounts/permissions
apply (use calcs command-line tool - never without /E option if on XP
Home). Share to the network, and ensure connecting clients are logged
on with identical usernames/passwords.

To avoid file-locking problems, I'd be inclined to arrange things so
that only one program instance can write to (including create and
delete) any particular file, so you wouldn't want to have the server
fail to clear a file because the client is trying to write more lines to
it, for example. You could have the clients create a file with a
numerical title (Client001-data-458.txt for example) and have the server
write a corresponding file (Client001-ack.txt) containing the file
number of the latest successfully-read file. You'd probably want to
allow the data files to accumulate in case anything went wrong. The
clients create files with names based on the latest "ack", and wait if
an earlier file is yet to be acknowledged. That should get you up and
running for what sounds like a one-off situation.

'tiz crude, though. C++ isn't needed - you could do all this in Windows
Scripting Host and VBS (easy if you've learned C++) or (better)
Powershell. You'd also be amazed at how powerful the latest development
tools are - I'm sitting next to a copy of "Visual Basic 2005 Jumpstart"
which shows you how to get a basic GUI application up in minutes, and
the Express editions of these tools are free:
http://en.wikipedia.org/wiki/Microsoft_Visual_Studio_Express
http://www.microsoft.com/Express/

Me? I'd do this in Access, with a main back-end database in a shared
folder on the server PC and front-end clients on the others, with links
to the back-end tables, and containing a simple data entry form. Access
can handle quite a bit of concurrency (you can fiddle with the table
locking if you need to). Access isn't free, and the OpenOffice
equivalent (Base) doesn't appear to have much support for multi-user
working, sadly.

Alternatively, you could run IIS on your server (Win2K, XP Pro or Vista
Business or Ultimate) and use ASP or ASP.net with SQL Server Express and
then clients would need only a browser installed to access your
application via web-page forms. More to learn, though.

You could also do all this in Excel, with buttons and a bit of VBA.
"Recording a macro" and then playing it back in the debugger is a great
way to learn.

Miss all this. I don't get much time for development work these days,
and I'm rusty as hell, as sharp-eyed commentators will doubtless point
out...

Phil, London
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top