Welcome!

Weblogic Authors: Yeshim Deniz, Elizabeth White, Michael Meiner, Michael Bushong, Avi Rosenthal

Related Topics: Weblogic

Weblogic: Article

Delivering SOA

Delivering SOA

With the rapid adoption of Web services standards and increasing support for asynchronous and XML-based messaging in the J2EE specification (JMS, MDB, JAXM, JAXRPC), it's time to address the challenges involved in building business applications based on a service-oriented architecture.

This evolution impacts current practices for Web application development, which now need to support this new paradigm. It also presents challenges for application deployment and management, commonly addressed today through proprietary enterprise application integration (EAI) solutions. In essence, the notion of a business application is evolving into "orchestration" of services, as the lines between development and integration become blurred.

Service orchestration refers to the assembly of loosely coupled components and the coordination of multiple asynchronous conversations over coarse-grain communication protocols. Implementing orchestration logic in an application produces a consistent set of technical infrastructure requirements, such as managing non-linear state and long-lived application context, supporting parallel activities and sophisticated join patterns, handling exceptions and events generated by local and remote components, compensating for failed or cancelled business transactions, and graceful upgrading and management of application functionality.

In this article, I present a sample application demonstrating the orchestration of services implementing a loan procurement business process. I'll describe the technical requirements for orchestration raised by the sample application and how an implementation can leverage the capabilities of the WebLogic Server. Then I'll describe a J2EE-based container for service orchestration that packages the common infrastructure requirements. Finally, we'll show how Java developers can program the orchestration logic of the loan procurement application using a Java-based abstraction.

A New Face for Application Development
It's not an everyday event when multiple technological evolutions, seemingly independent of each other, join together to create sufficient synergy in the software industry to materially change the requirements for business application development as well as for the software platforms that deliver them. The last time something like this happened was in 1993, when a standard protocol (HTTP), a standard presentation markup language (HTML), a Web server, and a Web browser combined to create the ubiquitous publishing medium we know as the World Wide Web. Shortly thereafter, with the introduction and rapid adoption of Java as the language of choice for authoring server-side applications for this medium, the Web application server was born and took the driver seat as the primary mechanism for the delivery of business applications.

Since that time, application development has evolved and matured, in large part due to standardization through the J2EE architecture. This architecture provides an extensible foundation for component-based development of business applications using server-side Java and has facilitated the delivery of self-service applications and user-facing portals into the mainstream. Until recently, these business applications have been characterized by synchronous request/reply interactions with an emphasis on the creation and delivery of dynamic Web pages (presentation), use of encapsulated building blocks (EJB), and connectivity to back-end data stores (e.g., JDBC).

At the same time, organizations have still had to deal with the problem of connecting their information systems to one another, mostly using a variety of middleware technologies and proprietary EAI (enterprise application integration) tools. Even worse, this practice has typically remained separate from the mainstream application development domain and has normally been undertaken by consultants who possess specialized implementation skills. The methodology used for these implementations has continued to steer it away from that used for the delivery of mainstream business applications. However, the continued evolution of the enterprise computing platform and its rapid inroads into technologies such as XML Web services and asynchronous messaging is about to change all this.

Adoption of Web Services
"Businesses and people that work together need their applications and services to work together." This describes the need for interoperability in the heterogeneous enterprise computing environment. This need is driving the growing move toward Web services, an industry-standard interface and connectivity-technology stack layered on top of standard Internet protocols and a self-describing XML data format. Web services are the new building blocks that will enable application development to extend into and address the challenges of enterprise integration. As functional building blocks, Web services can encapsulate a variety of functionality, such as legacy applications, packaged applications (e.g., ERP, CRM, SCM), and Java components as well as .NET components. WSDL, the interface description language used by Web services, is self-describing, while SOAP, its messaging protocol, provides coarse-grain communication based on human-readable XML data file interchange.

Unlike earlier technologies, such as CORBA and DCOM, Web services are vendor-independent and provide true industry-standard interoperability. Web services can be deployed in various contexts, such as inside or across the firewall, using different transport protocols underlying SOAP (such as HTTP, SMTP, and JMS), and can be simple or composite, synchronous or asynchronous. Regardless of the context, Web services are accessible over SOAP and are introspected through their WSDL interface, making them interoperable. Most importantly, Web services provide for loosely coupled operation by separating the interface from the implementation. Thus, the consumer of a Web service need only rely upon the external contract describing the Web service, without assuming anything about its internal implementation.

The Need for Asynchrony
Integrating loosely coupled functionality into business applications inherently increases reliability and scalability requirements, because the underlying components are not under the direct control of the application and cannot be guaranteed to always be available. Synchronous access to such components would potentially create performance bottlenecks and severely limit the execution throughput of the application. In any case, application reliability under such circumstances is not possible since the application context resides in memory and is not persisted. Therefore, asynchronous messaging has been introduced in order to address these needs, thus resulting in both improved application throughput and increased overall reliability, by allowing independent execution.

Using asynchronous messaging in a business application opens a range of opportunities for integrating loosely coupled components but also introduces significant new challenges when compared to a synchronous (RPC) programming metaphor. For example, when making an asynchronous call to an external component, the caller doesn't know how long it will take to execute. Therefore, a message correlation mechanism has to be put in place to be able to receive replies and match them to their original invocations. A conversation with a loosely coupled component may fail due to communication or component execution problems (at either end). Therefore, the application has to store its context at the start of the conversation and re-activate it from a persistent store upon completion of the conversation before executing subsequent application logic.

Publishing and Orchestrating Web Services
Working with Web services as part of a service-oriented application comprises two steps. The first step involves taking the IT assets that need to be integrated into the application and making them available as Web services - "publishing" them. Publishing Web services is widely supported by the latest versions of the leading J2EE application servers and by a growing number of tools, such as Glue (The Mind Electric), CapeStudio (Cape Clear Software), and several others. With growing support for Web service publishing, EAI tools are quickly losing their traditional competitive edge, i.e., providing proprietary adapters for legacy connectivity.

Orchestration, the second step in working with Web services, entails a more complex set of challenges. Orchestration of Web services involves making the services work together, as well as integrating them into an application. From a development standpoint, orchestration means assembly of loosely coupled services and coordination of the asynchronous conversations in which they are involved into manageable business applications. Experience with orchestration of services as part of a business application reveals a consistent set of infrastructure requirements that repeats itself across such applications. These technical requirements are described in our loan procurement example.

Loan Procurement Example
To better understand the technical infrastructure requirements of service orchestration, let's consider an example in which a loan broker integrates people, internal applications, and external service providers using JMS and Web services. We'll use a simplified version of the loan procurement business process (see Figure 1).

    1. A customer submits the loan request through a portal that subsequently starts the execution of the Java orchestration logic.
    2. The orchestration logic (shown as a question mark) communicates with a customer information system (through a session bean) and with a credit rating application (through an asynchronous JMS call) to obtain the customer profile and a credit rating.
    3. The orchestration logic routes any business exceptions that may be encountered to a customer support rep for manual processing of the application.
    4. The orchestration logic then initiates two asynchronous conversations with trading partners UnitedLoan and StarLoan to obtain loan offers that will be presented to the customer as they become available.
    5. Once the customer selects a loan offer, the orchestration logic obtains a loan policy from the selected provider and cancels the other loan requests. The loan policy is then issued to the customer.
Requirements of Orchestration Logic
Let's summarize the primary issues involved in developing, deploying, and managing orchestration logic and the technical requirements that need to be addressed in the context of the sample loan procurement application described above.
    1. Open standards (Java/J2EE, JMS, XML, SOAP, WSDL): How do you leverage your existing investment in, and developer knowledge of, Java and J2EE? How is each conversation marshaled into SOAP/XML and JMS messages?
    2. State and context management: How do you coordinate, store, and manage the state of each conversation while utilizing asynchronous messaging? How do you correlate responses to the business transaction that initiated them?
    3. Loosely coupled services: How do you model each conversation to allow for easy adoption of the application as business conditions change? How easily can you add a new loan processor or handle a change in interface?
    4. Parallel processing: How do you design and coordinate parallel conversations (e.g., submit the loan application to UnitedLoan and StarLoan in parallel)? How do you implement sophisticated join patterns ("Cancel the conversation with UnitedLoan if the user selects the offer from StarLoan")?
    5. Exception management: System- and business-level exceptions increase the variability and complexity of orchestration logic tremendously. What happens if UnitedLoan refuses to process the loan application because the information provided is invalid?
    6. Events and notifications: Conversations can span a long period of time and include multiple responses. How do you handle notifications such as loan approval and intermediate progress events? How do you specify and handle timeouts?
    7. Open nested transactions: How do you combine multiple nonlinear conversations into a business transaction? How do you track the history of activities to allow for compensation, if necessary (since you can't roll back someone else's database...)? 8. Scalability and performance: What happens when the scope of the application increases and you need to support more services, more complex types of conversations, and a higher transaction volume?
    9. Distributed administration: What happens if customer support decides to cancel a submitted loan application request? What happens if a change request occurs in the middle of a conversation?
    10. Business visibility: How do you provide visibility into the state of the conversations? How easily can a business user obtain information on the number of loan requests processed per day or on a particular loan application?
    11. Version control: How do you update the orchestration logic to reflect new business rules? How do you gracefully phase in new versions when 10,000 loan requests are pending?
    12. Audit trailing: Can you trace the history of all conversations related to a specific loan request? Can you provide nonrepudiation for the application?
The CGI Lesson
Time-to-market and cost pressures, efficient utilization of available developer skills, and management of application delivery risks are the constant elements in the changing world of enterprise software. Similar forces were in effect during the mid-'90s when just about every company was hard pressed to deliver a dynamic Web presence to its customers. To address this need, the static content publishing medium was augmented with a Common Gateway Interface (CGI) that enabled publication of dynamic content on the Web.

The delivery of simple Web applications that quickly grew in complexity introduced a common set of technical requirements. Developers found delivering those requirements in a custom, one-off fashion to be a significant impediment to cost-effective development and management of those applications. Session management, resource pooling (e.g., database connections) and multithreading, to name a few of these requirements, were then embedded in a new piece of infrastructure software that provided a compelling buy-versus-build option for IT decision makers and developers. This new piece of software, which became known as the application server, saved developers from repeatedly implementing (and maintaining) the same application infrastructure. Developers could now focus on authoring the application business logic, saving valuable time and increasing productivity.

In addition, this class of self-service and customer-facing applications became easier to deploy and manage in production with the use of an application server. The CGI lesson, i.e. encapsulating application infrastructure and plumbing and enabling developers to focus on the application business logic, is directly applicable to the problem domain of service orchestration.

Extending J2EE into Orchestration
As we observe the ongoing evolution of the J2EE computing platform, we get a clear indication of how orchestration fits in as J2EE expands to support asynchronous messaging and XML Web services.

From JDBC to EJB
Prior to the introduction of JDBC as a Java API, most application logic was coded using proprietary 4GLs (e.g., Oracle's PL/SQL) and stored procedures. The introduction of JDBC enabled developers to access tabular data sources (most notably SQL databases) in a standard fashion and caused a major shift in business logic programming to the middle-tier.

The widespread adoption of JDBC allowed a layer of data access components to be included in the J2EE application server, eventually standardizing as EJB component technology deployed using an EJB container and providing the underlying database access services and infrastructure. This evolution not only made coding at the JDBC API level unnecessary, but it also elevated the programming abstraction and enabled developers to focus on coding logic and avoid dealing with mundane application infrastructure and plumbing complexities.

The JSP Analogy
Java is an extremely flexible and powerful programming language and is particularly useful for authoring server-side logic for Web-based business applications. Since many business applications were intended to provide self-service functionality to end users, developers have sought ways to streamline development of the front-end or presentation-logic tier of these applications. The key to streamlining such development has been congruence - finding a straightforward mapping between the problem domain and the solution domain. JavaServer Pages (JSP) was created as part of the J2EE architecture (see Figure 2) to become the Java-based abstraction-enabling congruence for the development of presentation logic.

JSP technology allows Web developers and designers to rapidly develop, and easily maintain, information-rich, dynamic Web pages. JSP separates the user interface from content generation, thus enabling developers to alter page layout without changing the underlying dynamic content. This separation of page logic from UI design and display, and a reusable component-based design is made possible with the use of XML-like tags combined with Java scriptlets. With these features, JSP has simplified and accelerated the process of building Web-based applications.

The Impact of Messaging
Recently, JMS, JAXM, and related APIs and protocols have been introduced into J2EE to provide access from Java to asynchronous messaging and XML Web services. This is expected to induce a similar shift in how asynchronous business logic handling of loosely coupled services is programmed. Currently, coding to JMS and JAXM APIs is being hailed as the enabling access layer but it's expected that developers will eventually look for higher-level programming abstractions. Abstracting orchestration logic will leverage JMS and JAXM in much the same way that EJB leveraged JDBC and JTS. This migration of orchestration logic from proprietary EAI solutions (aka Businessware, BPM, Workflow, etc.) into the middle tier has already started and is expected to accelerate as effective and easy-to-learn means for programming orchestration logic become available.

The Orchestration Container
As is the case with EJB technology, orchestration requires a runtime environment, or container, for deployment. The orchestration container (see Figure 3) implements the complex plumbing and technical requirements (detailed in the earlier example) that don't need to be exposed to developers. A matching component model, called here the JSB, or Java Scenario Bean, enables effective programming for authoring orchestration logic. JSB is a powerful abstraction that assembles loosely coupled services and sequences the conversations among those services. Since these conversations involve asynchronous communication, JSB enables authoring long-lived, multistep orchestration logic across these services. Furthermore, JSB becomes a natural extension of the J2EE architecture since it is fully interoperable with its components, such as JSP, servlets, and EJB. The orchestration container provides a seamless bridge to XML messaging so developers don't need to deal with cumbersome Java-to-XML (and XML-to-Java) datatype mapping.

Leveraging WebLogic Server
As we've demonstrated above, implementing the complex requirements of orchestration can naturally fit as an extension of the J2EE architecture. The orchestration container, based on J2EE, needs to provide a scalable execution environment for the functional components involved in orchestration logic. The orchestration container is then deployed on top of a robust and scalable J2EE application server such as BEA's WebLogic Server. In addition to leveraging the runtime environment of a J2EE application server, orchestration logic also coordinates transactions among loosely coupled components and, through JMS, provides support for asynchronous messaging. Finally, the orchestration container uses the WebLogic Server two-phase commit (XA) transaction capabilities and its high-performance JMS implementation.

The code for this article can be found on the Web at www.sys-con.com/weblogic/sourcec.cfm. Listing 1 shows the Scenario Bean source code for the example loan procurement application. Listing 2 shows the associated XML-based deployment descriptor for the JSB.

Conclusion
As you've seen here, building enterprise applications that integrate functionality represented as loosely coupled services produces the need for orchestration. Orchestration involves the assembly of services and the coordination of asynchronous conversations across loosely coupled communication protocols. There is a need to effectively address the complex technical requirements of orchestration, highlighted through the loan procurement example. With the continued advance of J2EE, which provides API access to asynchronous and XML messaging, we demonstrate a nonintrusive approach that naturally extends the J2EE architecture and provides an open application model.

The illustrated solution is composed of an orchestration container that takes care of the infrastructure and plumbing requirements and a JSP-like abstraction that enables powerful, yet easy, authoring of orchestration logic by Java developers. Finally, the use of an orchestration container allows for versatile debugging, monitoring, reporting, and management of the resulting application.

More Stories By Doron Sherman

Doron Sherman is the CTO of Collaxa, Inc., a Web Service Orchestration Server vendor and a BEA Partner located in Redwood Shores, California. He has been involved with Java since its early days and pioneered application server technology while being a founder and chief scientist at NetDynamics.

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


@ThingsExpo Stories
With tough new regulations coming to Europe on data privacy in May 2018, Calligo will explain why in reality the effect is global and transforms how you consider critical data. EU GDPR fundamentally rewrites the rules for cloud, Big Data and IoT. In his session at 21st Cloud Expo, Adam Ryan, Vice President and General Manager EMEA at Calligo, examined the regulations and provided insight on how it affects technology, challenges the established rules and will usher in new levels of diligence arou...
Recently, WebRTC has a lot of eyes from market. The use cases of WebRTC are expanding - video chat, online education, online health care etc. Not only for human-to-human communication, but also IoT use cases such as machine to human use cases can be seen recently. One of the typical use-case is remote camera monitoring. With WebRTC, people can have interoperability and flexibility for deploying monitoring service. However, the benefit of WebRTC for IoT is not only its convenience and interopera...
The 22nd International Cloud Expo | 1st DXWorld Expo has announced that its Call for Papers is open. Cloud Expo | DXWorld Expo, to be held June 5-7, 2018, at the Javits Center in New York, NY, brings together Cloud Computing, Digital Transformation, Big Data, Internet of Things, DevOps, Machine Learning and WebRTC to one location. With cloud computing driving a higher percentage of enterprise IT budgets every year, it becomes increasingly important to plant your flag in this fast-expanding busin...
SYS-CON Events announced today that Synametrics Technologies will exhibit at SYS-CON's 22nd International Cloud Expo®, which will take place on June 5-7, 2018, at the Javits Center in New York, NY. Synametrics Technologies is a privately held company based in Plainsboro, New Jersey that has been providing solutions for the developer community since 1997. Based on the success of its initial product offerings such as WinSQL, Xeams, SynaMan and Syncrify, Synametrics continues to create and hone inn...
Smart cities have the potential to change our lives at so many levels for citizens: less pollution, reduced parking obstacles, better health, education and more energy savings. Real-time data streaming and the Internet of Things (IoT) possess the power to turn this vision into a reality. However, most organizations today are building their data infrastructure to focus solely on addressing immediate business needs vs. a platform capable of quickly adapting emerging technologies to address future ...
No hype cycles or predictions of a gazillion things here. IoT is here. You get it. You know your business and have great ideas for a business transformation strategy. What comes next? Time to make it happen. In his session at @ThingsExpo, Jay Mason, an Associate Partner of Analytics, IoT & Cybersecurity at M&S Consulting, presented a step-by-step plan to develop your technology implementation strategy. He also discussed the evaluation of communication standards and IoT messaging protocols, data...
Product connectivity goes hand and hand these days with increased use of personal data. New IoT devices are becoming more personalized than ever before. In his session at 22nd Cloud Expo | DXWorld Expo, Nicolas Fierro, CEO of MIMIR Blockchain Solutions, will discuss how in order to protect your data and privacy, IoT applications need to embrace Blockchain technology for a new level of product security never before seen - or needed.
In his session at 21st Cloud Expo, Raju Shreewastava, founder of Big Data Trunk, provided a fun and simple way to introduce Machine Leaning to anyone and everyone. He solved a machine learning problem and demonstrated an easy way to be able to do machine learning without even coding. Raju Shreewastava is the founder of Big Data Trunk (www.BigDataTrunk.com), a Big Data Training and consulting firm with offices in the United States. He previously led the data warehouse/business intelligence and B...
Cloud Expo | DXWorld Expo have announced the conference tracks for Cloud Expo 2018. Cloud Expo will be held June 5-7, 2018, at the Javits Center in New York City, and November 6-8, 2018, at the Santa Clara Convention Center, Santa Clara, CA. Digital Transformation (DX) is a major focus with the introduction of DX Expo within the program. Successful transformation requires a laser focus on being data-driven and on using all the tools available that enable transformation if they plan to survive ov...
A strange thing is happening along the way to the Internet of Things, namely far too many devices to work with and manage. It has become clear that we'll need much higher efficiency user experiences that can allow us to more easily and scalably work with the thousands of devices that will soon be in each of our lives. Enter the conversational interface revolution, combining bots we can literally talk with, gesture to, and even direct with our thoughts, with embedded artificial intelligence, whic...
"Evatronix provides design services to companies that need to integrate the IoT technology in their products but they don't necessarily have the expertise, knowledge and design team to do so," explained Adam Morawiec, VP of Business Development at Evatronix, in this SYS-CON.tv interview at @ThingsExpo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
Recently, REAN Cloud built a digital concierge for a North Carolina hospital that had observed that most patient call button questions were repetitive. In addition, the paper-based process used to measure patient health metrics was laborious, not in real-time and sometimes error-prone. In their session at 21st Cloud Expo, Sean Finnerty, Executive Director, Practice Lead, Health Care & Life Science at REAN Cloud, and Dr. S.P.T. Krishnan, Principal Architect at REAN Cloud, discussed how they built...
Digital Transformation (DX) is not a "one-size-fits all" strategy. Each organization needs to develop its own unique, long-term DX plan. It must do so by realizing that we now live in a data-driven age, and that technologies such as Cloud Computing, Big Data, the IoT, Cognitive Computing, and Blockchain are only tools. In her general session at 21st Cloud Expo, Rebecca Wanta explained how the strategy must focus on DX and include a commitment from top management to create great IT jobs, monitor ...
"Digital transformation - what we knew about it in the past has been redefined. Automation is going to play such a huge role in that because the culture, the technology, and the business operations are being shifted now," stated Brian Boeggeman, VP of Alliances & Partnerships at Ayehu, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
In his Opening Keynote at 21st Cloud Expo, John Considine, General Manager of IBM Cloud Infrastructure, led attendees through the exciting evolution of the cloud. He looked at this major disruption from the perspective of technology, business models, and what this means for enterprises of all sizes. John Considine is General Manager of Cloud Infrastructure Services at IBM. In that role he is responsible for leading IBM’s public cloud infrastructure including strategy, development, and offering m...
SYS-CON Events announced today that Evatronix will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Evatronix SA offers comprehensive solutions in the design and implementation of electronic systems, in CAD / CAM deployment, and also is a designer and manufacturer of advanced 3D scanners for professional applications.
To get the most out of their data, successful companies are not focusing on queries and data lakes, they are actively integrating analytics into their operations with a data-first application development approach. Real-time adjustments to improve revenues, reduce costs, or mitigate risk rely on applications that minimize latency on a variety of data sources. In his session at @BigDataExpo, Jack Norris, Senior Vice President, Data and Applications at MapR Technologies, reviewed best practices to ...
Nordstrom is transforming the way that they do business and the cloud is the key to enabling speed and hyper personalized customer experiences. In his session at 21st Cloud Expo, Ken Schow, VP of Engineering at Nordstrom, discussed some of the key learnings and common pitfalls of large enterprises moving to the cloud. This includes strategies around choosing a cloud provider(s), architecture, and lessons learned. In addition, he covered some of the best practices for structured team migration an...
22nd International Cloud Expo, taking place June 5-7, 2018, at the Javits Center in New York City, NY, and co-located with the 1st DXWorld Expo will feature technical sessions from a rock star conference faculty and the leading industry players in the world. Cloud computing is now being embraced by a majority of enterprises of all sizes. Yesterday's debate about public vs. private has transformed into the reality of hybrid cloud: a recent survey shows that 74% of enterprises have a hybrid cloud ...
22nd International Cloud Expo, taking place June 5-7, 2018, at the Javits Center in New York City, NY, and co-located with the 1st DXWorld Expo will feature technical sessions from a rock star conference faculty and the leading industry players in the world. Cloud computing is now being embraced by a majority of enterprises of all sizes. Yesterday's debate about public vs. private has transformed into the reality of hybrid cloud: a recent survey shows that 74% of enterprises have a hybrid cloud ...