Thursday, March 24, 2011

Best practices for building cloud based applications

I wrote another article outlining some best practices for building cloud based applications. You can read the article at http://www.devx.com/architect/Article/46602?trk=DXRSS_LATEST

I am writing this blog using my iPad and blogger is not iPad friendly

Monday, March 21, 2011

Cloud Computing for Java Developers

I wrote an article Java Cloud Development: What Developers Need to Know at Developer.com. This provides an introduction to Cloud Computing from Java Developers perspective. You can read the article here.

Wednesday, March 16, 2011

EJB 3 In Action, 2nd Edition

The second edition of EJB 3 In Action was announced recently. Ryan Cuprak joined as a new author of the book. Ryan and Reza are doing most of the work on the book. We have made a lot of changes in the content to include EJB 3.1 and other Java EE features such as CDI.
Here is the table of contents for the book:

Part I: Overview of the EJB landscape
1. What's what in EJB 3.1
2. A first taste of EJB 3

Part II: Working with EJB 3 components
3. Building business logic with session beans
4. Messaging and message-driven beans
5. EJB runtime context, dependency injection, and aspect oriented programming
6. Transactions and security
7. Scheduling and timers in EJB
8. Exposing EJBs as SOAP and REST web services

Part III: Using EJB 3 with JPA and CDI
9. JPA entities
10. Managing entities
11. Using CDI with EJB 3

Part IV: Putting EJB 3 into action
12. Packaging EJB 3 applications
13. EJB 3 testing
14. Designing EJB-based systems
15. EJB performance and scalability
16. EJB 3, Seam, and Spring
17. The future of EJB 3

Appendices
A. RMI primer
B. Migrating from EJB 2.1 to EJB 3
C. Annotations reference
D. Deployment descriptors reference
E. Installing and configuring the Java EE 6 SDK
F. EJB 3 developer certification exam
G. EJB 3 tools support

The book is available on Manning Early Release Program. You can join MEAP and help improve the program

Monday, November 08, 2010

Webinar: Event Processing for Java Developers

I'll be speaking at a webinar Event Processing for Java Developers arranged by Starview Technology, Inc tomorrow (Nov 9) at 10am PST. Register here.

Thursday, November 04, 2010

Introducing an Event Server Platform

After working for about seven years shaping and evangelizing for a Java Application Server platform and J2EE, I decided to move on. For the last year or so I’ve been spending my energy shaping up the next-generation middleware platform for building, deploying, and managing event-processing applications.

Most vendors have focused on providing limited functionality such as windowing, filtering, and pattern matching, often known as Complex Event Processing (CEP).These vendors have also been targeting limited use cases in the Financial Services sector. As CEP did not take off, many vendors have buried their offerings inside their SOA and BPM solutions. However, I think event processing is pervasive inside all businesses. Whenever you tweet or send a text/sms it generates an event. Whenever you plug in your electric vehicle to the grid, whenever you have a power outage, or whenever a machine breaks down in a factory – events are generated. A smart business needs to analyze and exploit these messages to make the right decision to take the right decision at the right time. Many of the new generation of applications are being built using an event-driven paradigm and need a new generation of middleware platform named an Event Server Platform. In this article, I will introduce an event server platform.

What is an Event Server?

Why do you use an application server? Because you do not want to reinvent the wheel and take advantage of several services the application server provides to quickly build your application. An event server provides similar functionality for users to rapidly build and deploy event-processing applications – optimized for event processing. I will discuss why traditional application servers are not suitable for event processing in a future article. One of the key points here is that traditional application servers are optimized for request-response applications and not for event processing.

In all practical senses an event server is an application server optimized for event processing applications. Let us look at an example architecture. The following figure shows the architecture for the Starview Event Server that is built on OSGi:

You have to build an application before you deploy it to an event server. So you need tools and languages to build an application.

Development Tool

You will need to build, test, and debug your event-driven application and hence you will need an IDE. Here is an example of Starview ACE that uses a model-driven approach to build an event-driven application. Starview ACE is an Eclipse plug-in and application models are based on the Eclipse Model Framework:

Connectivity Adapters

You will need to capture an event stream at its source and in-bound adapters provide this connectivity. The event source can be a messaging system, SNMP traps, socket reader, log files, database updates, and so on. An event server provides out–of-the-box adapters to simplify reading event sources without much programming. The adapters also generate outbound events or integrate with third-party systems and resources for correlating events.

Programming Language aka Event Processing Language

In order to process the events you need an Event Processing Language. The CEP vendors often refer to Stream SQL as their EPL. However, as you know SQL is quite limiting in nature and you will need the full semantics of a programming language built for event processing that provides fast and efficient in-memory structures to represent complex data types, andin-stream processing and analytics. The Event Processing Language must provide the ability to maintain state and support the concept of an event-processing agent for implementing complex event-processing rules.

Also, you do not want your event-processing rules to be static in nature: you want to enable your business users to author rules. Hence the programming language must provide a foundation to develop Domain-Specific Languages.

Here is a typical architecture for such an Event Processing Language:

This diagram shows the architecture for the Star language.

You may ask, “where is Java in this equation?” The event servers must integrate with existing Java applications, and provide the ability to build applications using Java. You have to remember, though, that Java has its limits and you have to explore the capabilities provided by Event Processing Languages.

Distributed Application

Many of the event processing applications are distributed in nature and require event processing at the edge. These are prevalent in many use cases such as Quality of Service, Smart Grid optimization, and manufacturing automation, where you want to process events locally and filter out unnecessary events at the edge. The event server platform must provide mechanisms to deploy a lightweight version of the event server at the edge and collaborate with a centralized event server without requiring hundreds of lines of code!

Management Infrastructure

You need a good management infrastructure for managing your event servers and applications. This becomes challenging when applications are distributed in nature. The management infrastructure should provide the ability to deploy, manage, and monitor applications, event servers, and server groups. And the infrastructure must be built using an event-driven paradigm.

The following screen shot shows the management console for Starview Enterprise Hub that provides such a management infrastructure:


These are the basics of an Event Server Platform. You will several advanced features such as high-availability, caching, etc.

We will discuss some of these topics in detail in future blog entries.

Bye!
References and Suggested Reading


Tuesday, January 12, 2010

SOA Management - Sample Chapter from Middleware Management Book

Oracle Technology Network published sample chapter SOA Management (Oracle Service Bus) of my Middleware Management book.

You can access the chapter at http://www.oracle.com/technology/books/pdfs/sample-soa-management.pdf

This book covers management of both Oracle Fusion Middleware (WebLogic/OC4J, SOA Suite, IDM, Coherence, Forms/Reports, etc. and non-Oracle Midddleware such as JBoss, Tomcat, Apache Http Server IBM WebSphere and Microsoft .Net/IIS, etc


You can purchase the book at Amazon at http://www.amazon.com/Middleware-Management-Enterprise-Manager-Control/dp/1847198341.

Also see details at http://www.packtpub.com/middleware-management-with-oracle-enterprise-manager-grid-control-10g-r5/book

Tuesday, November 17, 2009

Should Java be free from Sun/Oracle?

There was an interesting blog from SAP CTO “Freedom of Java”! He has a very absurd comparison of freeing Java from Sun/Oracle’s clout with falling of Berlin wall. Should we free Java from Sun? My answer is an emphatic No! I have been a Java enthusiast for about a decade. Although I never liked Sun’s control over Java/JCP, I have to admit that Java flourished under Sun’s stewardship. I hope Sun/Oracle will continue the leadership in taking Java to the next level. Oracle once claimed they support 300% Java! As an ex-employee of Oracle I know that Oracle’s business is completely dependent on success of Java, all of fusion middleware, applications, management products (enterprise manager) developed in Java. Oracle cannot gamble or bungle on Java. SAP’s concern seems to be too unjustified and seems to be politically motivated.

They are suggesting that Java/JCP should be freed from Sun/Oracle and controlled by some independent consortium (Java foundation) and have volunteered to throw money, time and energy behind Java. I don’t think SAP has contributed much to Java community in the past 15 years, besides furthering its own NetWeaver platform to attract developers to their proprietary application platform.


Interestingly enough they claim to have Java EE 5 certification for past two years. Note that Java EE 5 was finalized about two and half years back. I think they still do not have a production version of application server that supports Java EE 5. I could not find in their website about their production support even for J2EE 1.4. Their website still claims support for J2EE 1.3 as shown below:
http://www.sap.com/platform/netweaver/standardssupport/java.epx




They still have a developer preview for Java EE 5 at http://www.sdn.sap.com/irj/scn/downloads?rid=/library/uuid/00846edd-355b-2b10-f38c-df94ec96eb74



How can we believe that SAP will pump millions of dollars to an open consortium to support Java’s future growth when they have not invested money to build an application server that supports latest Java standards? I think they are just playing a devil’s role here to complicate matters with Oracle’s pending acquisition of Sun.

Without strong leadership, Java will perish. If we leave it to open source then it may fork and we will end up with several Java flavors and that will be a death blow to Java. Sun has invested billions of dollars on research, development and building the community around Java and should control it. If Oracle’s acquisition of Sun succeeds then Oracle should control Java/JCP, if it fails for some reasons then who should take over Sun (if SAP does!) should own Java!

That’s my 2 cents!