100 likes | 184 Views
Messaging. Message Type Patterns. Command Invoke a procedure in another application SOAP request is an example Document Message Single unit of information, single object or data structure SOAP response is an example Event Asynchronous event notification between applications
E N D
Message Type Patterns • Command • Invoke a procedure in another application • SOAP request is an example • Document Message • Single unit of information, single object or data structure • SOAP response is an example • Event • Asynchronous event notification between applications • Do not require a reply • Request-reply • Two-way communication • Can be P2P or pubsub • How should it be broadcasted? 1, 2, …, many?
Message Channel Patterns • Channels = queues • Point-to-point Channel • Take out the middle man • Pub-sub Channel • Sends event to all subscribed users • Datatype Channel • Different data types have their own channels • Allows applications to handle events differently based on object
Message Queuing • One of the most widely used method for distributed apps • Allows distributed applications to communicate asynchronously • Messages sent are stored in queue to be delivered to recipient • Allows abstraction • Distributed applications can be developed without the need to worry about the mode of transportation • Don’t care about the availability of end recipient
Message Queuing Advantages • No direct communication between programs (clients) • Loose coupling • Communication is independent of time • Communication can be driven by events • Work is carried out by small self-contained programs • Can assign priority to a message • Security • Authorization checks (like access control list) • Data Integrity • Recovery Support
Message Oriented Middleware (MOM) • AMQP (Advanced Message Queuing Protocol) • Apache Qpid • RabbitMQ • StormMQ • XMPP (Extensible Messaging and Presence Protocol) • ejabberd (Erlang Jabber Daemon) • Metronome • STOMP (Streaming Text Oriented Messaging Protocol) • Apache ActiveMQ • Apache Apollo • RabbitMQ • Others • Apache Kafka
Evaluation • Strengths • Provides increased modularity: middleware is swappable • Can use pub/sub in browser and pub/sub across browsers • Asynchronous communication model for speed • Leverage distributed resources for efficiency and redundancy • Weaknesses • Distributed, asynchronous nature could lead to difficult debugging • Complicated to program (if you start from scratch…) • No real strong standards….