Monday, November 14, 2011

Patterns in Science

In science we see problems , solutions and explanations . Most interesting thing about this is we can see same solutions get repeated in different ways in different branches of science.

In this blog i’m going to explain a common solution pattern we see.

Recently i wrote and published an article named “Implementing Store and Forward Messaging Patterns With WSO2ESB Part 1” which explains how to implement store and forward messaging patterns using WSO2 Enterprise service bus.

One problem solved using Store and forwarded messaging patters is integrating systems that accepts different message rates or traffic patterns. As an example say there is a system that provides a service but that service can accept messages below a certain rate say 500msg/sec.
Requirement is to integrate it with another system. Now say if that system produces messages at average rate of 400msg/sec but it can have message rate spikes (ex : 800msg/sec). So One way to solve this problem is to have an intermediate storage for messages inside the message flow where message will get stored and then forwarded it to the destination at a constant rate. (Above mention article gives an example to implement this kind of a scenario).

But if we look around we can see same generic problem is solved using the same generic solution in different scenarios.

Scenario 1.

Irrigation systems :

Problem : In rain season we get lot of excess water which can’t be applied to the cultivation directly.
Solution : Store water in tanks and release them in a slow rate throughout the year.

Scenario 2

AC to DC conversion :

Problem : How to deliver a smooth constant DC voltage output from a AC source when we use a full wave or half wave rectification circuit using a diode bridge to do the conversion.

Solution : After rectification use a Capacitor to store the charges and let it discharge at its slow discharge rate which will results a somewhat smooth DC current.

And also the same pattern is indirectly used on old Sri Lanken irrigation systems to reduce the output water pressure of the Water Tanks.We call it “Bisokutuwa”. see

So we can see in all these scenarios we have used the generic solution “store and forward” to solve the generic problem of “integrating different output rates with different input rates”.

No comments: