Defining Messaging Patterns

Hashworks
Hashworks
Published in
5 min readJul 8, 2018

There have been a lot of buzz around the Enterprises on the term Integration. The term Integration is overused and defined in different complex ways by the industry experts that it makes it look as though it’s very complex. There are multiple products and evangelists who are still try to define it differently and solve the problems associated to it in multiple ways. Integration as a solution is a complicated topic, however Integration as a subject should be very easy to understand. I’m trying to present some of the key words used in parallel with Messaging patterns in a simplistic way.

For a moment, forget all the complicated jargons that are keyed into the technology world, the simple definition of an integration has been always “how can i do a handshake with my friend”. In this article let me try to defining these IT jargons with this scenario of the handshake. There are multiple ways in which two people can meet, when two people meet its usually for an exchange, it may be exchange of words, exchange of work or exchange of favors or it can be a simple meetup for a drink. Let me give you an example, assume Bob and Marely are very close school friends… Bob wants to throw a New Year party and he wants to invite Marely for the party.

Pattern 1- Point to Point
Bob can in person shows up at Marely’s door the next day with the invitation and invite Marely for the New Year party at his home. This is when Bob jumps on to his Car, hits the ignition on and takes a road that is pre-built and drives to Marely’s house and also assumption is that Bob knows the road. In the software industry terms this is called a point to point model of messaging where one of them is cognizance of a channel to reach directly to the other system and hence opens up a connection and drives up to the other system.

Pattern 2- Message Broker
Bob doesn’t really need to drive to Marely’s place, he can use the existing network of post office to get the invitation delivered. Bob wraps the invitation in an envelope, writes the address of Marely’s residence and puts it into the post box. The Post Master picks it up and is responsible for delivering it to Marely’s address. Now Marely when he wakes up next morning, he will find the invitation in his post box. This pattern of messaging is usually done with the help of a message broker like a queue or database.

Pattern 3- Broadcast
Bob can also announce the details of the New Year Party in the local radio channel. The only problem is its too public and anyone and everyone tuned into the radio station at that hour can hear this message and might turn up on the New Year eve. And also this doesn’t guarantee that Marely got this invite or not. These are called broadcast messaging pattern.

Pattern 4- Publish-subscribe
There is another way Bob can do this is, he can advertise about the party on the weekly local magazine to which Marely subscribes. Now this invitation will reach all the people who have subscribed to this magazine. This would guarantee that in the next publish of the magazine it would be delivered to Marely since he is one of the subscriber for the magazine and Bob ensured that he has done his job of inviting Marely and it’s now up to Marely to show up on New year’s eve.

Pattern 5- Service Endpoints
These days mobile phones, Text Messaging, emails are very common. So if Bob and Marely have access to any of these devices and technologies then Bob can call him up, shoot an email or text him on his smart watch about the party on New Year’s Eve. These are efficient and powerful technologies and because they have as strong communication channels built underneath. For example email, mobile phones are built with complex network of cables and satellite systems to which bob & Marley need not be unaware of. These devices actually abstract the complexity underneath these devices and just expose simple endpoints for the users. This concept of abstraction or service endpoints ensure easy way to communicating between each other without actually understanding the underlying complexity of the communication. There is usually a contract or a specific endpoint agreed upon between the two people wanting to communicate. The agreement can be an agreed phone number or a language of text, there are usually web service urls and wsdl’s contracts pre-defined and can be invoked from remote locations.

Pattern 6- Service Bus & Message Transformations
Until now we were assuming that Bob and Marely talk the same language and can understand each other, however they find out that Jun Wei their Chinese schoolmate is in town during the New Year eve and hence Bob wants to invite Wei also to the party… Now Wei only understands Chinese, so Bob needs to ensure that he gives the invite to a mediator that can not only just deliver the message to Mr. Wei but also can transform it to Chinese or Mandarin so that Mr. Wei gets the message in his preferred language. Hence Message transformations become an important part of the communication systems across an enterprise. Most of the enterprise systems are heterogeneous in nature, they typically are collections comprised of hundreds if not thousands of applications or software utilities each performing a specific function in the whole body. Some are third party, some are custom built, and some are mutli-tier architecture and some using different operating systems. Hence it is common to find an enterprise with myriad technologies in its belly and running their business.

These are some of the prominent concepts in patterns of Integration. Each messaging patterns enables us to solve the integration problems in different ways. Each has its own pro’s and con’s, in this post I will not get into the details of each. It is always good to have a consultation from one of the technology experts or an architect to define which messaging pattern or integration pattern is suitable in which scenario.

--

--

Hashworks
Hashworks

Your digital transformation partner to Collaborate | Innovate | Change