Julian Jewel’s Weblog Welcome to my weblog();

Spring Integration

July 17

We needed a really light weight ESB and we were evaluating Mule, ServiceMix and finally decided to write our own Spring based service bus. And it ended up working great for us. At that time, the Spring Integration was just being developed. I was looking into the Spring Integration and looks like it is very endpoint / channel based. We wrote a component based service bus, that would just intercept, transform and invoke a service. Spring Integration is neat and flexible, but I’m not sure how the polling channel model would perform. Also we have services that communicate synchronously, but I’m not sure if there is a way to define a request/response type of architecture with Spring Integration. Looks like it is necessary to implement an input and output channel for every messaging pattern like transformer, router, etc.

ProtoJ

May 16
  • Don’t want to learn ant scripts
  • Tired of writing ant scripts
  • Don’t want to maintain XML files

Here’s a pure Java build API. You just have to download the JAR, add it to your projects and write the entire build configuration in Java.

ProtoJ is a pure java build, installation and deployment library that hands control over to you. There’s no third-party ProtoJ application directory to maintain, no environment variables to set up and absolutely no other required software. Simply add the ProtoJ library to your project and get ready to experience the joy of a friction-free development cycle.

More information at – http://code.google.com/p/protoj/

HL7 Interface Engines

May 6

So what do you really look for in an interface engine? There is more to an IE than just being a pass-through of messages.

Some good features of an interface engine –

1) Store and forward capability
2) Auto-acknowledgement
3) Guaranteed message redelivery
4) Rollback and retry capabilities
5) Reliable messaging, Once only delivery
6) Message Ordering, Error-free, Sequential
7) Disconnected Operation
8) Message Logging
9) Message Security
10) Consistent Routing
11) Message Monitoring
12) Exception/Error Escalation
13) Uptime Quantification
14) Persistent Messaging
15) Timely Delivery
16) Failover
17) Fault Tolerance
18) Load Balancing
19) MTTF (Mean time to Repair), MTBF (Mean time between Failure) management
20) Disk I/O performance monitoring
21) Continuous Availability
22) Transaction-aware distribution
23) Loosely coupled asynchronous messaging framework
24) Dead letter / exception mechanism
25) Messaging logging and auditing
26) Message Parallel Processing
27) Exception & Error Handling / Escalation
28) Deployment Infrastructure
29) Message Correlation
30) Message Routing Mechanism
31) Test messaging (ability to check if services are operational)
32) Reliable messaging
33) Store and Forward Configuration
34) Concurrency Management
35) Aggregation Locking Mechanisms
36) Response Timeout Configurations
37) Message Payload Optimizations
38) Conversational Capability
39) Component Failover Management
40) Cache management
41) Database Availability
42) Redundancy
43) Error escalation
44) Protocol independence
45) Adapter extensions
46) Best practices & reference architectures, implementation of enterprise integration patterns

Most of the interface engines range from 50,000 – 150,000$ / CPU license. HL7 IE’s are Vitria Businessware, Interfaceware, eLink, Oracle SOA Suite, Orion Health Rhapsody, Cloverleaf, OPENLink, Sybase e-Biz Impact, ConnectMate, BizTalk etc. Others are generic IE’s where we would need to buy/develop a HL7 adapter which include BEA, Websphere integration, Tibco, WebMethods and Ensemble.

Some IE’s require development licenses as well. Open source HL7 IE’s are SeeBeyond eGate and Mirth. Mirth is a great open source product as a HL7 interface engine used by various government entities.

Service Activator & Transaction

March 12

We process about 300 messages / second in our application. The Service Activator pattern has been very helpful to fork off and distribute processing of messages. We fork off messages to a JMS queue for processing. In some cases, the forked off messages need to run inside the same transaction of the caller and JMS helps us achieve this.

For more information on Service Activator, refer to http://java.sun.com/blueprints/corej2eepatterns/Patterns/ServiceActivator.html and http://www.eaipatterns.com/MessagingAdapter.html

Database War Stories

March 10

We have had numerous arguments with your DBA’s about normalization.

We had the following issues

  1. Normalizing 2 different tables used by entirely different services (Audit, Business) because they have the same field name
  2. Normalizing immutable audit table

The following links might help you in defending your architecture -

Read the rest of this entry »

97 Things Every Software Architect Should Know

March 10

Being an architect is a tough job. The life of an architect is very painful especially taking many suboptimal decisions in the dark. The book “97 Things Every Software Architect Should Know” can really help avoid such costly mistakes.

You can get the book at –

http://www.amazon.com/Things-Every-Software-Architect-Should/dp/059652269X/

Echo3 HelloWorld

March 9

Here’s a Echo3 application in 3 steps -

1) Create HelloWorld.java

public class HelloWorld extends ApplicationInstance {
public Window init() {
Window window = new Window();

ContentPane contentPane = new ContentPane();
window.setContent(contentPane);

Label label = new Label("Hello, world!");
contentPane.add(label);

return window;
}
}

2) Create the HelloWorldServlet
public class HelloWorldServlet extends WebContainerServlet {
@Override
public ApplicationInstance newApplicationInstance() {
return new HelloWorld();
}
}

3) Change web.xml

<servlet>
<servlet-name>HelloWorld</servlet-name>
<servlet-class>
gov.va.med.datasharing.mgr.HelloWorldServlet
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>HelloWorld</servlet-name>
<url-pattern>/HelloWorld/*</url-pattern>
</servlet-mapping>

Insane Strings

March 6

A cool article at http://www.roseindia.net/javatutorials/insane_strings.shtml

You never know what can happen with Java code :) .

Dynamic Update & Optimizing Hibernate

March 3

Hibernate has a cool annotation where it would only update or insert elements that are not null.

You can use the following properties in the Hibernate Entity annotation -
@org.hibernate.annotations.Entity(dynamicUpdate=true, dynamicInsert=true)

Dynamic updates/inserts should significantly speed up your system.

ORA-06512: at “SYS.SCN_TO_TIMESTAMP”

March 2

We have a cache synchronizer which uses the SCN_TO_TIMESTAMP(ORW_ROWSCN) in one of our queries to check for the recently modified records and updates the cache. The problem with the SCN_TO_TIMESTAMP(ORA_ROWSCN) is that the SCN’s are only valid for 5 days.

So a query like SELECT SCN_TO_TIMESTAMP(MAX(ORA_ROWSCN)) from SOME_TEST_TABLE; will return correctly if the recent ORA_ROWSCN was created in the last 5 days. Or you would get the following error.

java.sql.SQLException: [BEA][Oracle JDBC Driver][Oracle]ORA-08181: specified number is not a valid system change number
ORA-06512: at "SYS.SCN_TO_TIMESTAMP

Luckily we had a MODIFIED_DATE column that our application updates whenever a record is modified. So we ended up using that.

« Older EntriesNewer Entries »

Julian is one of the country’s foremost experts in software design, process, and construction. He regularly speaks at major technical conferences. Not only is Julian an expert architect and programmer, he excels at passing his knowledge on to others as both a consultant and educator.

Having worked as a CTO, Julian is also in a unique position to assess and improve both your software and your software-development process. If you’re a nontechnical CEO, he can help you bootstrap your startup or analyze (and help you improve) your existing software organization. He regularly does one-on-one CEO and CTO-coaching sessions, and can train individual teams and entire departments on Object-Oriented design/UML, Agile process, and languages.