Architecture Question

G

Guest

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.
 
C

Cor Ligthert

Joshua

Did you ever thought on a webservice for this problem, in my opinion is that
so easy to handle using Visual.Studio Net and Dotnet and surely does not
give you any overhead on your system.

Cor
 
N

Nick Malik

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top