Solved

Best approach for singleton service

Posted on 2009-05-14
4
732 Views
Last Modified: 2013-12-17
Coming from a DCOM world, I'm trying to write a singleton type service that does not necessarily require user interaction via a GUI but needs to be programatically addressable.

This application should be run at startup like a Windows Service (in fact I would prefer a Windows Service but I understand that starting with Vista it is a no-no to have a program interface on a service).  Also needs to be reachable in a client/server setup.

Not really a web environment - I'm thinking maybe WCF?

Suggestions anyone?  Thanks!



0
Comment
Question by:mfenske17363
  • 2
  • 2
4 Comments
 
LVL 26

Expert Comment

by:Anurag Thakur
ID: 24391607
you want to have a windows service and to be accessible so that you can create the onject of the singleton class and then use it

my suggestion will be to create a windows service based singleton class and then make it accessible using TCP remoting

0
 

Author Comment

by:mfenske17363
ID: 24394740
Sorry for noobish questions...

Does not WCF replace remoting?

So you are suggesting creating a separate executable that the service would start that clients can then communicate with?
0
 
LVL 26

Expert Comment

by:Anurag Thakur
ID: 24395277
WCF might have replaced remoting but not completely
there might still be situations where the remoting applications will have advantage over WCF applications
http://www.codeplex.com/WCFvsRemoting/Wiki/View.aspx?title=Home
http://social.msdn.microsoft.com/forums/en-US/wcf/thread/bb7985ea-4595-4a31-97d6-928f9724ab46

I am jsut suggesting to create a windows service and implement remoting through it as it will listen to a specific port and when the call comes will return the singleton object or the value queried
0
 

Accepted Solution

by:
mfenske17363 earned 0 total points
ID: 24396593
I have a sample service running now, I wonder if there is a sample floating around that implements the singleton object concept that my clients can talk to.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This video discusses moving either the default database or any database to a new volume.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now