Solved

Best approach for singleton service

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

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

813 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

18 Experts available now in Live!

Get 1:1 Help Now