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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Service or Hidden Application?

Status
Not open for further replies.

djjd47130

Programmer
Nov 1, 2010
480
0
0
US
I'm building a system, as mentioned in other threads here, which tests network speeds between various computers on the network. I originally planned to run it as a service, but before I got too far, realized that there's some difficulties making services interactive, such as a tray icon which pops up balloon hints when speeds change, and more.

I was just wondering, would it be more ideal to run it as an application hidden in the background? I've done one before, but it gets tough hiding/showing the main form and all that jazz. I'm sure I could do both, and have a service and application talk to each other. That's going on a more advanced level though, and this is already a tough project.

Any infrastructure suggestions?


JD Solutions
 
The service idea is fine, you should probably have a system tray app that's installed globally, started when a user logs on and requests information from the service periodically, so it can display the status for your service.

(I think I gave nearly the same advice to someone in this forum before...)
 
I make services all the time.
Don't make the fault to try to build the gui (tray) into the service itself. Like TonHu stated, it is best to have a separate application to interact with the service.
I usually build a telnet server in the service to make interactions possible from command line or an application.

/Daddy

-----------------------------------------------------
What You See Is What You Get
Never underestimate tha powah of tha google!
 
That does sound like the path I'll take, except, this will also be my first time building a service and application which "talk" to each other. The service needs to be able to send messages to any application which is attached to it, so in this case, how do I begin the structure? Obviously I will be building 2 classes, one class used in the application which attaches to and interacts with the service, and then a class in the service which accepts connections from and interacts with the application(s). I presume it shall also be possible for multiple applications to be attached to the service at any given moment.

So the question becomes: How do I make an application "attach" to a service to "talk" to it? I'm familiar with socket communication too, so it can work on a packet basis with a single string buffer.

JD Solutions
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top