Re: Installing several instances of an app as services
From: Dan Bass (danielbass)
Date: 01/20/05
- Next message: Ignacio Machin \( .NET/ C# MVP \): "Re: Check if a file is allready open by other application"
- Previous message: Tom Porterfield: "Re: How to: Use RangeValidator Control"
- In reply to: Roland Riess: "Installing several instances of an app as services"
- Next in thread: Roland Riess: "Re: Installing several instances of an app as services"
- Reply: Roland Riess: "Re: Installing several instances of an app as services"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 20 Jan 2005 13:46:17 -0000
Roland,
As a suggestion, would it not be better to have a multithreaded application?
There would be one config file (or registry hive etc), containing your
different configurations. When the service starts, it would first load the
config into a queue, then create N threads (where N is the number of
databases you want to read from). Each thread would then take the next
configuration block of the queue, and process to copy that database.
This would mean that you could easily stop and start the threads via a
global "running" flag which you simply set to false. Similarly, starting the
process would kick off all the threads to do your work.
It would be one application, installed at one location, running as one
process with many threads.
If you need more help with ideas for implementing this, let me know.
hope that helps and good luck.
Daniel.
"Roland Riess" <ce_clown@gmx.net> wrote in message
news:%230zPMsu$EHA.4092@TK2MSFTNGP09.phx.gbl...
> Hi all,
>
> at the moment i am developing an app which is sort of an interface to copy
> data from one database to another and it shall run as a service.
> As there are several databases the app must be installed and run in
> multiple instances with the configuration data (database, login, etc.)
> stored in an app.config file.
>
> Up to now I was concerned with Windows CE apps only so both running an app
> as service and running multiple instances of an app is new to me. I
> figured out how to create and install a single service app, but now I
> don't know how to "multiply" it. I imagine that every app must have its
> proper name, so do I have to compile as many instances of my app with
> different names as I will need? Or is there a way to "configure" my single
> app in a way that I can run it more than once, each being an own service
> for windows? And how could I manage the setup then, because Microsoft's
> service app sample only shows serveral instances running as one service,
> but every instance must be a service of its own.
>
> Any help is appreciated, thanks!
>
> Regards
> Roland
- Next message: Ignacio Machin \( .NET/ C# MVP \): "Re: Check if a file is allready open by other application"
- Previous message: Tom Porterfield: "Re: How to: Use RangeValidator Control"
- In reply to: Roland Riess: "Installing several instances of an app as services"
- Next in thread: Roland Riess: "Re: Installing several instances of an app as services"
- Reply: Roland Riess: "Re: Installing several instances of an app as services"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|