#181001 - 2007-10-01 03:52 PM
Distributed net send type of app
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
I need to write a tool that will distribute a text message to client PCs across the WAN.
Net Send (besides being unreliable) isn't pretty enough for the IT managers, so I have written up a client GUI app to display the message with color and logos.

I have also written an admin GUI that will allow the msg to be entered and to select via listview all the networks to receive the broadcast.

My problem is making the two apps communicate. I have spawned a number of cmd processes to manage the ping process for looking for live IPs (about 20 class c networks) for each $subnet in $arrSubnets
run 'cmd /c wkix32.exe "'+@scriptdir+'"\pushmsg.kix $s=$subnet $m="$msg"'
next
I considered just doing a file copy to a hidden/root share that the client will monitor, but that seems cumbersome... even a small ini file copied across to 1500 PCs will take a bit of time, even if I have 20 processes managing it.
I thought about using sockets in KF.NET, but I can't find any details on if sockets is even implemented in KF.NET, just in KF... and if it was old or ignored, as most posts about it are seveal years old.
Basically I need to send a few sentances... say 256 characters at most, with no logging or receipt needed as long as it is semi reliable.
It has to work to and from both XP and Vista and the message might be sent by staff without admin rights.
Suggestions?
Edited by Radimus (2007-10-01 10:04 PM)
|
|
Top
|
|
|
|
#181017 - 2007-10-02 12:51 PM
Re: Distributed net send type of app
[Re: Richard H.]
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
I thought about that... using an ini file or similar as the host and then just let the clients "go fetch", but how much resources will 1500 PC polling for a file across a WAN use, when they check every 15 minutes for an updated message.
I was thinking that it would be less resource intensive to push the text file to the machine... when installing the client, create a hidden share. Then the admin tool could ping, check for share, then copy. The client would look every 5 minutes for a file, read it then delete it.
Personally, I wouldn't worry as much if I could use a DFS share, but the netadmin refuse to do set one up.
|
|
Top
|
|
|
|
#181020 - 2007-10-02 01:36 PM
Re: Distributed net send type of app
[Re: Radimus]
|
Glenn Barnas
KiX Supporter
   
Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
|
Not sure about your environment, but now that I have end-users to deal with again, well, lets just say I have more grey hair now. (of what's left, that is) 
One of the biggest issues I've encountered is some systems don't respond to ping, either because the netops team blocked ICMP at their remote router, the Windows firewall got turned on (yeah, we have GPOs to turn it off, but...), or the user installs some firewall like Black Ice or changes the McAfee settings and turns on the McAfee firewall. Our users are local admins - not my decision, but I have to live with it. Anyway, we've resorted to using XNET to check some service, like "UPS" - if it tells us anything other than "Remote machine not found", we're good to check the system and push updates, etc.
Bottom line, I'm very much in agreement with Richard about pull vs push. You could write a little routine to get the timestamp of \\server\service\message.ini. One quick burst on the net. Compare that with the timestamp with the last timestamp stored locally (.INI or registry to survive reboots) and display the message if needed. Your local routine to check and display could be a system service using SrvAny, and it could launch the local GUI to do the actual display once it detected the need. The service could determine and possibly retrieve the current message, minimizing the work done by the GUI.
With a service checking every 10-15 minutes, the network load would not be that great, nor concentrated. As a service, it determines the interval at startup, so the queries are spread out over a period of time. You could even wait a random amount of time between 10 and 15 mintes.
BTW - I've got several kix utilities running as services with SrvAny.
Glenn
_________________________
Actually I am a Rocket Scientist!
|
|
Top
|
|
|
|
#181031 - 2007-10-02 03:56 PM
Re: Distributed net send type of app
[Re: Les]
|
Arend_
MM club member
   
Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
|
You could take a look here, it was a long time ago and requires AutoIt but gets the job done Net Send Scripting
But when you want something centralized you have to look at sockets (.net implements socket support as well, just bother Shawn to add it) or use kixforms 2.x (find the chatclient and chatserver samples at shawn's board) or use an SQL/Access Database.
|
|
Top
|
|
|
|
#181041 - 2007-10-02 06:38 PM
Re: Distributed net send type of app
[Re: Arend_]
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
I did the autoit to get net send in the past, but net send doesn't exist in Vista, and it isn't cross platform. You cannot use XP and net send to vista, and vista cannot net send to XP
Edited by Radimus (2007-10-02 06:38 PM)
|
|
Top
|
|
|
|
#181109 - 2007-10-03 11:21 PM
Re: Distributed net send type of app
[Re: Richard H.]
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
1. I've decided that my best route is to get a /folder/file placed in netlogon with enough security that a file can be copied in from a limited group of people. Then have the clients poll %logonserver%\netlogon\folder\file.ini for the content of the message.
2. you could never send a message that contained, "The corporate network is experiencing intermittent short outages caused by a failing router. The failing switch will be replaced at 13:30. Please do not log a fault call unless you experience problems after this time", as most staff couldn't pronounce the terms in the message nor could understand the content. "There are intermittent connectivity problems preventing network communication. This problem should be resolved around 1:30 today. If you continue to experience this problem after that time, contact the help desk"
Thanks for the help and suggestions.
I'll provide code once the product is complete
|
|
Top
|
|
|
|
Moderator: Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart
|
0 registered
and 1577 anonymous users online.
|
|
|