{"id":370,"date":"2015-01-27T11:08:26","date_gmt":"2015-01-27T11:08:26","guid":{"rendered":"http:\/\/adriangrigoras.com\/blog\/?p=370"},"modified":"2015-01-27T11:08:26","modified_gmt":"2015-01-27T11:08:26","slug":"communication-checklist","status":"publish","type":"post","link":"https:\/\/adriangrigoras.com\/blog\/communication-checklist\/","title":{"rendered":"Communication checklist"},"content":{"rendered":"<h3>Design Considerations<\/h3>\n<ul>\n<li>Unmanaged code is used for communication across AppDomain boundaries.<\/li>\n<li>Message-based communication is used when crossing process or physical boundaries.<\/li>\n<li>Round trips are minimized when accessing remote layers.<\/li>\n<li>Data types that cross physical boundaries are serializable.<\/li>\n<\/ul>\n<h3>Message-Based Communication<\/h3>\n<ul>\n<li>Partially connected scenarios are supported by storing messages and sending them, when a connection becomes available.<\/li>\n<li>Design appropriately handles a scenario when a message response is not received.<\/li>\n<li>Acknowledgements are used, to force the correct sequencing of messages.<\/li>\n<li>A synchronous programming model is used, if message response timing is critical for your communication.<\/li>\n<li>Custom communication channels are used, only if the default channel does not meet your requirement<\/li>\n<\/ul>\n<h3>Asynchronous and Synchronous Communication<\/h3>\n<ul>\n<li>An asynchronous communication model is used, unless you must guarantee the order in which operations take place, or you use operations that depend on the outcome of previous operations.<\/li>\n<li>Platform features are used for asynchronous in-process method calls.<\/li>\n<li>Existing asynchronous calls are wrapped in a component that performs synchronous communication to support synchronous communication.<\/li>\n<li>Local caches or message queues are used, to store messages for later delivery in case of system or network interruption.<\/li>\n<\/ul>\n<h3>Coupling and Cohesion<\/h3>\n<ul>\n<li>A message-based technology such as ASMX or WCF is used, when loose coupling is important.<\/li>\n<li>Standard protocols such as HTTP and SOAP are used, when implementing a loose-coupled web service interface.<\/li>\n<li>Services and interfaces contain only methods that are closely related in purpose and functional area.<\/li>\n<\/ul>\n<h3>State Management<\/h3>\n<ul>\n<li>State is only maintained, if it is absolutely necessary.<\/li>\n<li>State information is stored in durable data stores in a stateful programming model within a component or service.<\/li>\n<li>If you are designing an ASMX service, the Application Context class is used to preserve state.<\/li>\n<li>Extensible objects provided by the platform are used when designing a WCF service.<\/li>\n<\/ul>\n<h3>Message Format<\/h3>\n<ul>\n<li>Binary serialization is used to preserve type fidelity.<\/li>\n<li>The design can detect and manage messages that arrive more than once (idempotency).<\/li>\n<li>The design can detect and manage multiple messages that arrive out of order (commutativity).<\/li>\n<\/ul>\n<h3>Passing Data Through Tiers &#8211; Data Formats<\/h3>\n<ul>\n<li>If performance is important, custom objects are used to pass data between tiers and to hand serialization.<\/li>\n<li>DataSets are used if your application works mainly with sets of data, and needs functionality such as sorting, searching and data binding.<\/li>\n<li>Scalar values are used if your application works primarily with instance data.<\/li>\n<\/ul>\n<h3>Interoperability Considerations<\/h3>\n<ul>\n<li>Standard protocols such as SOAP are used enable communication with a wide variety of platforms and devices.<\/li>\n<li>The design considers the scenario when target systems might be protected by firewalls that block some protocols.<\/li>\n<li>The design considers scenario when target systems might not understand platform-specific types, or might have different ways of handling and serializing types.<\/li>\n<\/ul>\n<h3>Performance Considerations<\/h3>\n<ul>\n<li>Chatty interfaces are not used for cross-process and cross-machine communication.<\/li>\n<li>Fa\u00e7ade pattern is used to provide a coarse-grained wrapper for existing chatty interfaces.<\/li>\n<li>Custom classes are used to implement efficient serialization.<\/li>\n<li>Network roundtrips are minimized by passing data as a single unit, for example by using the Data Transfer Object pattern.<\/li>\n<li>The design minimizes the volume of data sent to remote methods.<\/li>\n<li>XML is only used when you need to pass large amounts of data over the network.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>Source: apparch.codeplex.com<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Design Considerations Unmanaged code is used for communication across AppDomain boundaries. Message-based communication is used when crossing process or physical boundaries. Round trips are minimized when accessing remote layers. Data types that cross physical boundaries are serializable. Message-Based Communication Partially connected scenarios are supported by storing messages and sending them, when a connection becomes available.\u2026 <span class=\"read-more\"><a href=\"https:\/\/adriangrigoras.com\/blog\/communication-checklist\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30],"tags":[],"class_list":["post-370","post","type-post","status-publish","format-standard","hentry","category-architecture"],"_links":{"self":[{"href":"https:\/\/adriangrigoras.com\/blog\/wp-json\/wp\/v2\/posts\/370","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/adriangrigoras.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/adriangrigoras.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/adriangrigoras.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/adriangrigoras.com\/blog\/wp-json\/wp\/v2\/comments?post=370"}],"version-history":[{"count":1,"href":"https:\/\/adriangrigoras.com\/blog\/wp-json\/wp\/v2\/posts\/370\/revisions"}],"predecessor-version":[{"id":371,"href":"https:\/\/adriangrigoras.com\/blog\/wp-json\/wp\/v2\/posts\/370\/revisions\/371"}],"wp:attachment":[{"href":"https:\/\/adriangrigoras.com\/blog\/wp-json\/wp\/v2\/media?parent=370"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/adriangrigoras.com\/blog\/wp-json\/wp\/v2\/categories?post=370"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/adriangrigoras.com\/blog\/wp-json\/wp\/v2\/tags?post=370"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}