?
Solved

Best approach for singleton service

Posted on 2009-05-14
4
Medium Priority
?
764 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

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

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
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…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

649 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