Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Events vs Timers

Status
Not open for further replies.

troymill

Programmer
Jun 20, 2001
6
US
Here's our problem. We are developing a student queuing/tracking system in VB that will allow students to sign-in to see an academic counselor. The front desk of the department gets notified and they control all flow of students to counselors. The front desk then sends a notification to a counselor when a student has signed in. Currently only 6 - 8 clients are using the application but the plan is to expand to 50+ clients.

Our first approach was to use winsock to send/receive messages. We found that messages were being "lost" and never received on the other end even though we had error handling in place.

Our next approach was to use DCOM and fire events when a student signed-in. The client creates a connector object which points to a global control object that fires the events. However, when the counselor's PC crahses the connector object on the server is not destroyed. As more and more of this happens, the activex exe on the server starts generating "component busy" messages on the clients. Once we restart the server everything works fine for a day or two then the same problem starts again.

We are now considering using timers to poll the database for new students but we don't want to create unnecessary network traffic.

Finally, here's my question: is DCOM and events/callbacks the best choice for this or is timers the better approach? Any suggestions would be greatly appreciated.

Thanks,
Troy
 
I hate to say it but it sounds like the problem may lie within the architecture in general. Is there a way you can draw a flow of what ideally would happen, or write it out using a consistent naming convention (using 'client' to describe a component in this process is a little vague - especially when it's interspersed with descriptive objects like 'student' and 'counselor'. I'm assuming 'counselor' is technically a client, though 'counselor' as a client doesn't sign in or request services like a student 'client' does, or does it?) Anyway, When you start using phrases like "this notifies that", etc., they generally translate to a callback (using events). I'm sure I could help you pretty easily if you still need it, but I'd need some sort of diagram for the process, or a little better description.

Sorry for the non-answer...
 
Sorry for the confusion. Basically when something happens on one computer many computers (1...n) need to be notified. The problem is it needs to be as close to real time as possible.

We tried to use a remote component to raise events when something happened. It works fine until the computers that access the remote component have to be restarted, for what ever reason (i.e. it crashes). After several of the computers have to be restarted they begin to receive a "Component Busy" message box while using the application and it gets progressively worse in time. Once we restart the remote server it works fine for a few days then it starts again. It almost seems like the remote component is still trying to notify a client computer that gets shut down improperly.

I've been able to reproduce the behavior by disconnecting from the network and terminating the application. After around 6 times of terminating the application I begin to receive the "Component Busy" message box. If I shut down the application properely the behavior never occurs.

I'm trying to find the best approach to take as far as notifying many computers in real time when another computer does something. I'm fairly new to DCOM so I'm not sure if this approach is the best.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top