(D)COM/TCP/UDP/... ?

Don't know where to post this question but I'll give it a try here first...

Intro:

Our product consists of several VB applications - 1 server, >=1 client(s) - which at this time are communicating through databases and/or files. Example: the user wants to execute a "command" => the client application adds a record to the "commands" recordset in the database => the server is "polling" this recordset (every x secs) to see if he has to launch a command => if so, the server does the job and when the "command" is completed, the server sets the completion flag of the command (still in the same recordset) to "true" => meanwhile, the client is polling again the same recordset to see when the requested command has been completed... Wow...!

As you'll notice, this implementation is SLOW and non-efficient, especially when server and clients are not on the same machine, when multiple users send commands or when several commands at the same time are being executed... Moreover, while the client is waiting for completion - which is crucial to our application - the user can't do anything else...

To the point:

What's the most pragmatic and efficient way to, let's say, "wake-up" the server (when he has to do something) and "wake-up" the client (when the command is actually executed) in other words to get rid of our polling mechanism?

We're considering some sort of messaging system - but how: TCP, UDP, DCOM, ...???

Our software originally ran on UNIX machines using shared memory to do the job... What's the way to do it in both Win9x and WinNT?

Thanks to all experts out there...

SLE
LVL 2
SLEAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

TimCotteeHead of Software ServicesCommented:
I would say the best way is DCOM, but I don't have any experience in this to speak of. I have used TCP/IP to do something similar, with very good results. Essentially it does what you describe, sends a message to the server to ask it do something, this is then completed and a reply is sent to the client so that it can do something else. It was originally developed to check the status of various servers/applications across the network and then request a specific machine to send a pager message to designated people informing them of the change in status. It isn't complete, but I could post the example code if it is of interest to you.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
dhodgeCommented:
Yes use DCOM.  Sounds daunting doesn't it.  It isn't just create a simple activex dll that accepts the 'command' and executes it.  Register this on the server.  From each client register the same dll, but launch 'dcomcnfg' to tell the system to run the object on the server.  Then when the client creates an object it will actually be running on the server, actions will be carried out on the server.  Also because you don't create the object until the client has something to do, you are not doing any 'polling'.
0
SLEAuthor Commented:
Sorry dhodge, but for the time being, I'll leave the question open to others...
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

GordonpCommented:
DCOM is definately a good way to go.
If your using VB then its completely transparent whther your running locally or remotely.

DO all you development with both processes on same machine, then when complete move Server to remote machine and use DCOMCNFG ( in system32 directory ) to set the reference to point to the remote machine instead of locally.

there are several HOWTO articles in the Microsoft KB, most of the articles I have are for using Win95 but there are equivelants for NT and 98 goto the KB search page and search on DCOM and HOWTO

However start with this one :
HOWTO: Create a DCOM Client/Server Application http://support.microsoft.com/support/kb/articles/q161/8/37.asp

Gordon

0
GordonpCommented:
TCP / UDP .

You can use the WinSock control provided with VB5+ to use both of these protcols. IF you have VB Books online then look for "Using the Winsock Control" it will give you most of the information on how to use in Client/Server enviroment.

Gordon

0
dhodgeCommented:
Certainly, sorry for locking the question, but you will find that it is the best way to go.
0
SLEAuthor Commented:
TimCottee - as you were the first to answer - I'll accept your comment, but thanks to all...

By the way, I think we'll go for the TCP way...
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming Languages-Other

From novice to tech pro — start learning today.