Re: Architecture Question
From: Nick Malik (nickmalik_at_hotmail.nospam.com)
Date: 09/11/04
- Next message: DM McGowan II: "Re: Mono and Gtk# programms."
- Previous message: Slava M. Usov: "Re: How to retrieve serial number of OS or CPU for copy protection?"
- In reply to: Joshua Belden: "Architecture Question"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 11 Sep 2004 22:08:46 GMT
My brain is not so sharp... help me to understand what you want to do...
You want to have a central object. You want client apps to tell the central
object: "please inform me of these events". You want your central object to
generate events back to the clients by scanning a database using a web
service.
Is this true? If so:
I would suggest that you create an additional component. A singleton object
that you manage with Remoting. This is the dispatcher.
This object is the event broker. The windows service will simply scan the
database and when it finds an event it wants to share, it sends the event to
the dispatcher.
The client objects call the dispatcher and pass in a delegate that they want
called when an event occurs. Perhaps they also pass in enough info so the
dispatcher can decide what event to send to them.
The dispatcher simply waits for an event to arrive, then dispatches it to
all qualified listeners.
--- Nick
"Joshua Belden" <JoshuaBelden@discussions.microsoft.com> wrote in message
news:AB701FCB-7501-45FB-9434-20523FD7BCDC@microsoft.com...
> Small architecture question I'm hoping someone can answer?
>
> I want to create a Windows Service Component that will periodically poll a
> database for data changes, respond to several client application messages,
> and in turn notify clients of events that they can then respond to.
>
> I'm clear on creating the Windows Service, as well polling the database,
> however, not sure on the other two.
>
> Immediately I thought of Remoting; responding to events seems
> straightforward. It quickly became confusing though trying to wrap my head
> around having a singleton object running in the service that will also
talk
> to the rest of the windows service.
> I'm also concerned about performance on the Singleton call.
>
> My next thought was to use sockets and send and recieve messages that way
> but wasn't sure if there would be considerable overhead using sockets vs
> remoting. Not to mention the complexity of network programming.
- Next message: DM McGowan II: "Re: Mono and Gtk# programms."
- Previous message: Slava M. Usov: "Re: How to retrieve serial number of OS or CPU for copy protection?"
- In reply to: Joshua Belden: "Architecture Question"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|