11.07.2015 Views

y - Net Developer

y - Net Developer

y - Net Developer

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

amrameshreddy.blog.comCHAPTER 8■ ■ ■Implementing ReliableMessaging and Queue-BasedCommunicationsWCF helps you implement reliable communications over an infrastructure that might beunreliable. Application infrastructure is prone to failure. <strong>Net</strong>work connectivity often breaks,services might not always be available, or messages get lost. WCF provides you with the functionalityto overcome these limitations in the infrastructure.You will learn in this chapter how to ensure reliable communication in a distributed environmentwhere the application endpoints might be available only intermittently. Reliablemessaging in WCF helps developers solve a number of challenges that have plagued them formany years. You will learn about the following in this chapter:• The need for reliable messaging• Challenges in implementing reliable messaging• Reliable sessions• Queuing support in WCF• How to integrate with legacy applications using MSMQLet’s consider our QuickReturns Ltd. scenario. Say you decide to sell a stock that hasdeclared a loss. You put in your order to sell. However, the message never reaches the tradingapplication, and the stock loses more value before you realize what has happened. This couldpotentially cost you thousands of dollars. Alternatively, say you put in a buy order, which mayaccidentally be sent multiple times. This can occur for a number of reasons, prime amongstthem being the lack of an acknowledgment from the receiving end. You could end up buyingstocks that you didn’t really plan to buy. Further, say you want to apply the proceeds of the saleof one stock to buy a second stock. The message to buy goes through, but the sell messagefails. This can cause a lot of problems in your portfolio.You could also experience network-related issues. For example, say the network is cloggedby buy/sell orders, and the router is overcome. Or say the wireless connection on your laptopblinks, and your order does not go through. Moreover, since the application is working overthe Internet, the congestion is completely out of anyone’s control and can result in messagesramrameshreddyramrameshreddy249

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!