I'm trying to decide on a system design and would like some feedback.
System Description: I have an ASP.NET webapplication hosted on a server. The web application waits for incomming requests and saves the "message" a database on the server. I want an application (call it App A) that continually checks the database for new messages. Then App A should check what "type" of message it is, and then send the message to a specific message queue for that message type.
Next, there would be a receiving application called a parser. A parser can only parse messages with a specific type. A parser would need look at it's queue, and receive messages from the queue. It is important to be able to add a new parser to handle new "types" of messages without affecting already running parsers. Also it would be nice to be able to stop App A from checking the database for new messages.
Questions: What type of application should I use to build App A? What type of application should I use to build the parsers?
You might actually want to look into MSMQ for this type of solution. Then app A and the parsers could be just (pauseable/stoppable) services. If you're working just from the DB then you'd have to either have the apps poll the DB or respond to a notification from a stored proc or trigger.
You might actually want to look into MSMQ for this type of solution. Then app A and the parsers could be just (pauseable/stoppable) services. If you're working just from the DB then you'd have to either have the apps poll the DB or respond to a notification from a stored proc or trigger.
I've implemented app A and the parsers as windows services. App A has a timer which queries for new messages in the database at a specified interval. The parsers are also windows services and execute an async receive when a new message is found in it's queue. I've also use MSMQ for the queuing layer.