locked
Suggestions for a distributed architecture RRS feed

  • Question

  • Hi all,

    currently I'm in the process of designing an architecture for a new project and I can really use some advice.

    The project has the following elements:

    - A ASP.NET web interface following the MVP Pattern

    - A Service layer that will be called by the presenters. 

    - An integration service that will provide communication to backend systems. (This will run on a different, internal server so we plan to use WCF from the Service layer to the integration service component).

    - A Windows service that will run all day and check for changes in the backend systems and forward these to the Service layer for caching

    Some actions from the service layer to the integration layer can be a 'fire and forget', others will need the request immediately returned.

    How should I set up the communication between the service layer and the integration layer? I've read about the integration hub pattern and other messaging patterns. Also I've experimented a little with Microsoft Message Queue and this worked out nicely. 

    Should we do everything trough a messaging architecture? Or should the service layer decide to call the integration layer directly or just send a message to MSMQ? How should the integration layer itself work? Just forward a request to the correct external system? 

    I hope you guys can give me some advice. If there are any questions pleace ask!

    Thansk for your help,

    Wouter 

    Friday, September 30, 2011 9:22 AM

All replies

  • Hi

    The communication between service layer to the integration layer you are looking for asynchronious model. This can be implemented as in the web services itself as asynchronious server.

    or

     

    You can implement using command pattern.  refer the following MSDN URL briefs on command pattern.

    http://msdn.microsoft.com/en-us/magazine/cc163920.aspx

    This will help you to  understand distributed system.

    Regards

     

    Friday, September 30, 2011 1:31 PM
  • Hi,

    thnx for your response.

    I've read the article about the Command pattern and used that in my MSMQ experiment. It worked nicely (I added some expression tree serialization zo I can send the command I want to execute to MSMQ and run it on the destination server).

     

    The only thing that makes me a little uncomfortable is code like this:

     

    public class MyService : IMyService
    {
     public void RunSomeThing()
    {
     Queue.Send(...);
    }
    
    public void DoSomethingElse()
    {
    var result = IntegrationService.IntegrateSomething()
    }
    }
    


    This leaves the choice to run the command async or sync with the developer of the service layer. 

    I could change every call to a Command pattern call but with a reply-receive kind of functionallity this would be hard to create.

    Do you have any thoughts on this?

    Friday, September 30, 2011 2:10 PM
  • Hi,

    You can use the remot queue (destination server queue). The remote queue has some limitations on application scalablity and transaction.

    Refer the following MSDN url to understand the remote queue.

    http://msdn.microsoft.com/en-us/library/windows/desktop/ms699854(v=vs.85).aspx

    Regarding the reply and response, MSMQ supports to implement the reply reply and response messages. In the message we need to add additional parameters to co-relate the messages.

    Refer the below MSDN URL briefing on reply-response message implementatio with example. this will help you to implemente the reply and response message.

    http://msdn.microsoft.com/en-us/library/ms751435.aspx

    Regards

     

    Monday, October 3, 2011 2:57 AM