Tuesday 15 September, 2009

SOA Benefits

SOA Definition

Service Oriented architecture (SOA) provides the effective way of realising reusable, interoperable services. It defines set of principles and guidelines for effective implementation of services. The key difference between traditional programming and SOA is reusability of the business logic. SOA implemented effectively helps in bringing down the Total cost of ownership (TCO).

SOA Benefits
Following are few of the SOA advantages
1) Reusable services 2) Effective governance 3) Interoperability of disparate technologies through adherence to standards 4) Support for BPM 5) Aligning technology with business requirements 6) Adaptable to business changes 7) Lower TCO through reduced development life cycle and integration costs due to reusable services and standards based integration.

Sunday 9 August, 2009

Difference between SCA and JBI

Java Business Integration (JBI) acts as a container (similiar to J2EE container which binds jsps, servlets, EJBs together) providing the deployment environment for service engines (BPEL SE, Java EE etc) and the binding components (SOAP,FTP etc) and facilitates in integrating them together. The interactions between service engines and binding components happens via Normalised message router (NMR) which plays a mediator role.

Service component architecture (SCA) specification helps in building and binding the components together using service oriented approach. SCA enables in writing platform independent components which can be invoked by disparate technologies seamlessly. Key here is that there is no requirement for a coordinator to bind different components together as the components themselves have the capability to communicate seamlessly in platform independent manner.

Thursday 6 August, 2009

Difference between ESB and Hub & Spoke

What is an ESB and how is it different from other Integration patterns like point to point and hub and spoke model?. In recent months this is the question most frequently posed to me by people who are about to start a project involving an ESB or who attended sessions on ESB's but still not sure about what exactly is it.

Let me start by first giving the definition of an ESB. ESB is a decentralised middleware infrstructure which facilitates seamless integration with disparate technologies and fostering reusability.

Now lets talk about other two popular design patterns, Point to Point design pattern establishes tight coupling between source and target systems by directly talking to target API. As the systems are tightly coupled there won't be any question of reusability.

In the Hub and Spoke pattern source and target systems are integrated through a centralised Hub. This centralised hub controls the flow of information between disparate technologies. But the main pitfall here is the centralised nature of the Hub itself. If there is any glitch with the Hub, communication between disparate technologies comes to stand still.

Now the difference between ESB and the other two design patterns is Decentralisation and Reusability. These are the two key factors which makes ESB different from other integartion design patterns. In ESB, along with ESB the services that makes an ESB are themselves reusable and they are decentralised which makes it efficient than other design patterns . Since the services in ESB are decentralised it becomes easy for supporting features like clustering,failover where as in hub and spoke model it is a big challenge to support the same.

Sunday 5 April, 2009

DOZER Framework and JCAPS512

Given the multilayered nature of the applications following SOA architectural approach,it becomes imperative that the message model being used in one layer is not bleeded in to other layers so that the layers are loose coupled.If we want to acheive the reusability of the business logic effectively,let the mapping functionality between different message models be segregated from the business logic and be handled by a mapping framework.

Advantages of using a mapping framework

  • Helps in providing more emphasis on business logic rather than focussing on the mapping intricasies by bifurcating the mapping functionality from the business logic.
  • Ease to maintain.
  • Ease to map.
  • Mapping between various data structures,Deep mapping,Mapping based on the indexes.

Lets take an example to showcase the usage of the mapping framework in JCAPS512 environment

Objective:Service(implemented using a JCD) needs to invoke another service by passing an object(java object,lets call it as a target object).The target object needs to be populated with the values passed on from source system which is unmarshalled in to an OTD being used in the JCD metioned above.The response from the target service is mapped to an output OTD in the source service(JCD) and send to an appropriate destination.

This can be implemented in the following way

1)Populate the input OTD with the message from the source system.

2)Using DOZER framework map the fields from the input OTD to that of the target object expected by the target service.

3)Map the output from the target service to the output OTD using DOZER framework.

Make the following code singleton

MapperIF mapper = new DozerBeanMapper();

DestinationObject destObject = (DestinationObject)mapper.map(otdObject,DestinationObject.class);

//set or get the values using the destObject object

Sample mapping file for mapping between source and target fields

/package.sourceOTDClassName

package.DestinationClassName

SourceFieldName

DestinationFieldName

External Jars in JCAPS512 Environment

Loading external jars in to JCAPS512 environment can be done in couple of ways.
1)Import the jar directly in to the JCD(The jar should be imported in to the project where this JCD is used or have access).
2)Place the jars in JCAPS\eDesigner\usr\lib\ext folder(If jars are placed in the above mentioned folder,to get the JCD recognize the methods exposed by the jar we have to type the entire package strcuture for the first time).

For runtime configuration
If the jars are not included as part of JCD,then for runtime loading of external jars,they have to be placed in JCAPS\logicalhost\is\lib folder.

Thursday 22 January, 2009

HPROF In JCAPS512

Introduction:
HPROF is a profiling agent which interacts with JVMPI and collects profiling information in to a file or socket. The profiling information collected can be either in ASCII or binary format. HPROF can produce profiling information related to CPU, heap usage, threads in the stack trace, depth of the trace etc. The profiling information so collected can be viewed by using agent like HAT etc.

Configuration in Application server Admin console:

In order to run the profiler, an argument needs to be passed to the jvm by specifying various options for which the profiling information needs to be captured.

To find out the various hprof options, run the following command in the command prompt with the path set to your directory where jdk is installed.

java -Xrunhprof:help.

Once a decision has been arrived on the options for which the profiling information is required, perform the following steps to configure and run HPROF profiler.

Login to asadmin (ex: - http://localhost:18000/asadmin).
Click on the JVM Settings tab and select the profiler option.
Give the profiler name as hprof and enable the profiler option. Leave the classpath and native library path as blank.
Click on the Add JVM option and enter the args.ex: - (-Xrunhprof: depth=3,file=c:\temp\log.txt,thread=y,heap=all).

Advantages:

· Helps in analyzing performance related issues.
· Helps in understanding bottlenecks.
· Helps in analyzing memory leak issues.
Note: Configuring HPROF in the App server will be an overhead as far as the performance is considered.