Wednesday, October 13, 2010

Business Rules

What are business rules? Where we use them ?

Business Rule is a some kind of a rule that relates to a particular business. From time to time this rules may change. We know there is a logic behind each and every decision we get. Normaly we are getting some decision by considering some facts. Same thing apply to business. In business we get some decision , after considering some kind of facts. These facts may change from time to time according to the nature of the business.

Lets take a simple example : A Mobile Service Provider

With the experience we know , Mobile Service Providers most interested party is their customers. So they do many kind of promotions to attract customers to them. So from time to time they change their call rates and freely available features , etc. Here What they are doing is changing the logic from time to time according to their requirement. But they do not change the way they operate.

Basically we can separate this in to two parts;
1. What is to be done (Logic)
2. How is to be done (Implementation)

So in our example, from time to time , Business development team of the Mobile Service provide change the logic. We know Mobile Service Providers are running there business with some kind of a software. So software is developed by developers when the logic is clearly identified. Lets take a simple example:

if the season is new year festival season , all the call rates must be reduced by 10%

So this is the logic that software should perform actions behind. This logic may change from time to time. So if we are going to implement software using if else statements, We have to implement it each and every time logic changes. In Software world, This is a mess. So we need to have a solution to this problem, which we can change the logic with out changing the software.

This is the point Business Rules comes in to play.

With the use of business rules we can change the logic, with out affecting to the implemented software. There are many kind of rule engines. JBOSS Drools is the most common language we can use to write these business rules.

Since business rules are decide by business management people, business rules should be easy to understand by a person who have very little knowledge in java, c++ or what ever. Drools provide this simplicity.

you can get clear idea on drools by refering to the JBOSS Drools web site

Tuesday, October 12, 2010

Java Messaging Service (JMS)

What is Java Message Service ?
Before jumping in to the JMS directly , it is worth to get a back ground knowledge on where we use JMS. Lets get a bit understanding on messaging system.
We know people use email to communicate with each other. When we send an email to an address of another person , we are pretty sure that , the message will be delivered to that person , since all the stuff handled by email system. So email is commonly used human to human messaging system.

Here we basically consider about how different software applications can communicate with each other using messaging systems. In many business systems, it can be found application - to - application messaging systems and they are generally identified as Enterprise Messaging Systems or Message Oriented Middleware. (MOM)
Message-Oriented Middleware, can be used to transmit messages from one application to another across a network. These Enterprise Messaging Systems ensure that messages are properly distributed among applications. Apart from that Enterprise Messaging Systems provide ;
  • Fault tolerance
  • Load balancing
  • Scalability
  • Transactional support

How to create a patch file and how to apply that to the source code

Here i m going to tell you how we can easily create a patch file and how we can apply that patch file in to our source code;

Creating the patch file:

To create a patch file you need to have SVN access. When you want to create a patch file
move to the location that you have a difference with svn . Then use the bellow command to create the patch file.

svn diff > patchFileToBeCreated.txt

this will create the patch file called "patchFileToBeCreated.txt" in the same location.

Then when any other person wants to apply your patch to his source , he should have the same SVN revision that you created your patch file.

to apply the created patch file , you have to go to the same folder path that you created your patch file
Then use the bellow command to apply the patch to your source

patch -p0 < patchFileToBeCreated.txt