What is Publish and Subscribe Integration Pattern?

Objective of this blog to introduce to Publish & Subscribe pattern integration pattern.


Like any integration pattern we have two entities (from and to)
  • Publish - we all know is to print/write/produce something at defined or irregular frequency without much worrying who actually is using it, say a monthly magazine.
  • And a subscriber is one who wants to get a copy of published item, as they are produced or say at a frequency of their own choice. 
So the beauty of this pattern is we can scale it with ease. You can have more publisher producing same or similar things and you can have ever changing list of subscribers.

Can you guess which is the third important entity in this model?

Image result for publish and subscribe model

Yes, its the Broker. Its a layer (software component) sitting between publisher and subscriber and managing both's needs. It lets publisher continue to publish as and when they wish. On subscriber side it allows preference, what they want to subscribe, at what frequency, etc.

In this interaction a key concept used is Topic. Broker creates various Topics (stored in a hierarchical structure). A publisher knows to which topic he is publishing and similar subscriber knows which topic he is subscribing to. In this way a level of abstraction happens between publisher and subscriber, both so not need to know each other and sit loosely coupled.

There are many broker solution available to achieve this. Will not cover all of that, but would mention this integration pattern is also the foundation of event driven architecture style. You need to look at publish as event publishing and subscriber are application who are interest in responding to that event. This architectural style is very popular in building large scale systems.

You may be interested in:
(1) Various products available in market that support Pub-Sub pattern?
(2) What is event driven architecture?
(3) How is topic structured and what is topic string? How it beings flexibility?

Will end by saying "The first newspaper was published in 1631 in France, so the concept is now new"

Happy Learning!




What is z/OS Connect? Can it provide RESTful API interface for mainframe?

Objective blog is to introduce you to z/OS Connect. 


z/OS Connect is a revolutionary product that provides RESTful API's as integration pattern for z/OS resources. Thus opening z/OS to Hybrid Cloud and the API Economy in way that today's developer is demanding. Below diagram shown how z/OS Connect does that.

As provider


As requester 



zOS Connect EE is built on Websphere Application Server.

The simplest way to look at zOS Connect as a black box solution that can expose mainframe resources as REST API and can make mainframe program call an external REST endpoint.

The key strength of this framework is API, which has become the preferred choice in connecting systems like Interest of Things (IoTs). One may say didn't we said same when Web Services got introduced? You are absolutely correct, Web Services also provide similar capability, but they are heavier for a developer to process and today's developer prefer REST API's, mainly the one working on mobile platform and cloud. Preference of JSON over XML is also a factor. Having said that, one should not think Web Services are no longer in the game. REST API in their true sense are mainly good for services / resources that can map to RESTful principles like HTTP methods, where as Web Services could be anything. But time to come will decide what direction it takes.

There are more integration frameworks being developed on top of zOS Connect, like IBM has collaborated with Rocket Software and working on API Mediation Layer on top of zOS Connect using which entire IBM Z System (ZOS and LinuxONE) can be exposed/integrated with state of the art development tools and techniques. This project is an opensource project under the name of Zowe.


You may be interested in following:
  • What is RESTful API?
  • What are the key components of zOS Connect EE?
  • What is JSON? How is it different from XML?
  • What are the different ways to interface with mainframe?
  • What is Zowe?
I would say "One of the greatest company the IBM will never disappoint you."

Happy learning!