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.

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
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...
In his keynote at 18th Cloud Expo, Andrew Keys, Co-Founder of ConsenSys Enterprise, provided an overview of the evolution of the Internet and the Database and the future of their combination – the Blockchain. Andrew Keys is Co-Founder of ConsenSys Enterprise. He comes to ConsenSys Enterprise with capital markets, technology and entrepreneurial experience. Previously, he worked for UBS investment bank in equities analysis. Later, he was responsible for the creation and distribution of life settle...
Coca-Cola’s Google powered digital signage system lays the groundwork for a more valuable connection between Coke and its customers. Digital signs pair software with high-resolution displays so that a message can be changed instantly based on what the operator wants to communicate or sell. In their Day 3 Keynote at 21st Cloud Expo, Greg Chambers, Global Group Director, Digital Innovation, Coca-Cola, and Vidya Nagarajan, a Senior Product Manager at Google, discussed how from store operations and ...
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...
"IBM is really all in on blockchain. We take a look at sort of the history of blockchain ledger technologies. It started out with bitcoin, Ethereum, and IBM evaluated these particular blockchain technologies and found they were anonymous and permissionless and that many companies were looking for permissioned blockchain," stated René Bostic, Technical VP of the IBM Cloud Unit in North America, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Conventi...
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...
BnkToTheFuture.com is the largest online investment platform for investing in FinTech, Bitcoin and Blockchain companies. We believe the future of finance looks very different from the past and we aim to invest and provide trading opportunities for qualifying investors that want to build a portfolio in the sector in compliance with international financial regulations.
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.
Leading companies, from the Global Fortune 500 to the smallest companies, are adopting hybrid cloud as the path to business advantage. Hybrid cloud depends on cloud services and on-premises infrastructure working in unison. Successful implementations require new levels of data mobility, enabled by an automated and seamless flow across on-premises and cloud resources. In his general session at 21st Cloud Expo, Greg Tevis, an IBM Storage Software Technical Strategist and Customer Solution Architec...
Imagine if you will, a retail floor so densely packed with sensors that they can pick up the movements of insects scurrying across a store aisle. Or a component of a piece of factory equipment so well-instrumented that its digital twin provides resolution down to the micrometer.
When shopping for a new data processing platform for IoT solutions, many development teams want to be able to test-drive options before making a choice. Yet when evaluating an IoT solution, it’s simply not feasible to do so at scale with physical devices. Building a sensor simulator is the next best choice; however, generating a realistic simulation at very high TPS with ease of configurability is a formidable challenge. When dealing with multiple application or transport protocols, you would be...
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...
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 ...
We are given a desktop platform with Java 8 or Java 9 installed and seek to find a way to deploy high-performance Java applications that use Java 3D and/or Jogl without having to run an installer. We are subject to the constraint that the applications be signed and deployed so that they can be run in a trusted environment (i.e., outside of the sandbox). Further, we seek to do this in a way that does not depend on bundling a JRE with our applications, as this makes downloads and installations rat...
Widespread fragmentation is stalling the growth of the IIoT and making it difficult for partners to work together. The number of software platforms, apps, hardware and connectivity standards is creating paralysis among businesses that are afraid of being locked into a solution. EdgeX Foundry is unifying the community around a common IoT edge framework and an ecosystem of interoperable components.
DX World EXPO, LLC, a Lighthouse Point, Florida-based startup trade show producer and the creator of "DXWorldEXPO® - Digital Transformation Conference & Expo" has announced its executive management team. The team is headed by Levent Selamoglu, who has been named CEO. "Now is the time for a truly global DX event, to bring together the leading minds from the technology world in a conversation about Digital Transformation," he said in making the announcement.
In this strange new world where more and more power is drawn from business technology, companies are effectively straddling two paths on the road to innovation and transformation into digital enterprises. The first path is the heritage trail – with “legacy” technology forming the background. Here, extant technologies are transformed by core IT teams to provide more API-driven approaches. Legacy systems can restrict companies that are transitioning into digital enterprises. To truly become a lead...
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 ...
"Cloud Academy is an enterprise training platform for the cloud, specifically public clouds. We offer guided learning experiences on AWS, Azure, Google Cloud and all the surrounding methodologies and technologies that you need to know and your teams need to know in order to leverage the full benefits of the cloud," explained Alex Brower, VP of Marketing at Cloud Academy, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clar...
The IoT Will Grow: In what might be the most obvious prediction of the decade, the IoT will continue to expand next year, with more and more devices coming online every single day. What isn’t so obvious about this prediction: where that growth will occur. The retail, healthcare, and industrial/supply chain industries will likely see the greatest growth. Forrester Research has predicted the IoT will become “the backbone” of customer value as it continues to grow. It is no surprise that retail is ...