• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 264
  • Last Modified:

Worried about collissions

I am adding a Health Check so that when my Windows program crashes or hits a breakpoint, I wil get a text message and an email. I have a Utility program that will "ping" my program every few seconds by way of a text file that wil be written by my primary program. The Utility program will simply read the last modified time and it that time it is more that 10 seconds ago, it will send the notifications.

Will I have a problem with collissions if one program is writing and the other is reading?

I'm curious. And wondering if there's a better way?

Thanks,
newbieweb
0
newbieweb
Asked:
newbieweb
  • 3
4 Solutions
 
ICaldwellCommented:
No, as long as you don't have a hub (most people now a days have a switch) you will not have collisions.  Collisions happen when two computers are talking on the same network at the same time, networks now a days are able to handle this but I would reduce your time from every 1 second to say every 3 or 5 just to reduce the issue of latency you could cause... Data maybe delayed because your requesting so much from another application continuously....

Hope this helps...
0
 
newbiewebAuthor Commented:
So a collission is not from two programs running on the same PC?
0
 
ICaldwellCommented:
Additional note, I would move over to Microsoft MOM... Microsoft Operations Manager

We use this for monitoring servers, it gives you a lot of control over what to monitor and will send alerts in many different ways if things go horribly wrong :-)....

There are several other monitoring tools but this should get you on the right track....
0
 
ICaldwellCommented:
No, collisions are caused on a network when three or more computers within the same hub are trying to talk all the same same time, only two can communicate and the other communications are lost, thus collision of data.... this can slow down things, thats why switches were invented to prevent this....

If you are monitoring on the same computer every 1 second then you would never run into a collision...  you may however have IO lockout where the file you are trying to access is locked by another application... although if your just trying to see the modification date then you would never hit this since modification date is part of the OS and does not require an IO lock....

Hope this helps....
0
 
ihardingCommented:
A better way to do what you are attempting would be to use remoting to share the same "state" object.  You could then put a timer on that object.  If the timer elapses, you would be notified by the monitoring process.  Take at look at:

http://msdn.microsoft.com/en-us/library/system.runtime.remoting.aspx
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now