Solved

Best approach for singleton service

Posted on 2009-05-14
4
745 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used.

791 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