Open Net Environment (ONE) Software ArchitectureAn Open Architecture for Interoperable, Smart Web ServicesOpen Net Environment (ONE) Software Architecture
Resources Open Net Environment (ONE) Software ArchitectureIntroductionThe Internet has had a profound impact on user expectations. Not too long ago, a computer user was a highly trained individual. Businesses trained their employees to be experts in one or two specific applications. A Web user, though, is an entirely different breed. A business doesn't have the luxury of training its Web users. Web applications must be intuitive. Or perhaps it's more appropriate to say that Web applications have to be invisible. People simply use the Web to read e-mail, find directions, pay bills, approve an expense request, and so on. They don't view these activities as executing applications. They're simply using services that are available on the Web. They want to be able to access these services from a wide variety of client devices, such as desktop systems, PDAs, mobile phones, and in-car computers. Furthermore, the user wants these services to be smart enough to understand and act differently according to the context of the situation. Who am I? Where am I? What time is it? Am I acting as an employee or an individual? These new user expectations are causing businesses to change the way they build application systems. Rather than creating large, monolithic applications or desktop-oriented, client/server applications, businesses are starting to build applications using a service-oriented application design. Software is being broken down into its constituent parts - into smaller, more modular application components or services. These application services make use of infrastructure software that has also been decomposed into discrete system services. All these discrete services can be deployed across any number of physical machines that are connected to the Internet. This modular services approach gives companies great flexibility in system design. By reassembling a few services into a new configuration, a business can create a new service. ServicesAn application service represents a type of user or business activity, such as reading e-mail, getting a stock quote, authorizing a credit purchase, and procuring materials. A system service represents system infrastructure and management functionality, such as storage, security, transactions, messaging, and fault recovery. A service exhibits the following characteristics:
Service-oriented systems are not a new concept - we've been using service-oriented systems such as ONC RPC, DCE, COM, CORBA, RMI, and Jini[tm] technologies for years. Now we're seeing a new, service-oriented system evolve: one that focuses on delivering services over the Web. This new type of service is commonly known as a Web service. Web ServicesA Web service represents a unit of business, application, or system functionality that can be accessed over the Web. Web services are applicable to any type of Web environment, be it Internet, intranet, or extranet, with a focus on business-to-consumer, business-to-business, department-to-department, or peer-to-peer communication. A Web service consumer may be a human who is accessing the service through a desktop or wireless browser, it could be an application program, or it could be another Web service. A Web service exhibits the following characteristics:
The industry is clearly focusing in on the eXtensible Markup Language (XML) as the lingua franca to enable Web services. Most Web services use XML to describe their interfaces and to encode messages. What is most intriguing about XML-based Web services is that it doesn't matter what technologies are used to build the Web services. XML-based Web services communicate over standard Web protocols using XML interfaces and XML messages, which any application can interpret. Hence, all XML-based Web services can interoperate - at least in theory. What Businesses WantSince the advent of the Web in 1994, businesses have been using the Internet to get closer to their shareholders, employees, customers, and partners. They have been using the Internet to automate supply chains and improve business process efficiency. Electronic business is no longer a future direction; it has become the norm. Now businesses are intrigued by the Web services approach to Internet computing. The Web services computing model promises even better cross-business integration, improved efficiency, and closer customer relationships. But in order to make the Web services model palatable, businesses must be able to leverage existing application assets and expose them as Web services. Businesses want tools and technologies that will reduce the cost, risk, and complexity of moving to this new model. Web Services TechnologiesA variety of technologies that support Web services is starting to appear. The leading candidates include SOAP, SOAP Messages with Attachments, WSDL, UDDI, and ebXML. Currently, these technologies are not available as supported products, but they are maturing quickly.
The Developer's DilemmaAlthough these technologies are rapidly maturing, the nascent Web services developer is pretty much left to his own devices to figure out how to make Web services work. No guidelines exist to help put all of these technologies and standards into perspective. He can use a context-sensitive XML editor to manually define the Web service interfaces, or he can generate them using a SOAP or WSDL toolkit. But how does the developer associate these new Web service interfaces with existing applications and services? And how does he assemble multiple discrete Web services into a composite business service? Interoperability between vendor implementations is still very challenging. The vision of seamless assembly and integration of distributed, heterogeneous Web services is still a distant dream. Shared ContextThe issue is a matter of shared context. Context refers to the things that a Web service needs to know about the service consumer to provide a customized, personalized experience. These things include the identity of the consumer, the location of the consumer, and any privacy constraints associated with the consumer information. If a number of services are aggregated to create a composite business service, these services somehow need to share this context. Take, for example, shared user identity. A Web service that offers a personalized experience maintains information about the identity of each user. When an individual uses that service, she identifies herself to it. Sometimes the service determines her identity automatically from a cookie maintained on her system. Sometimes she has to enter a user ID and password. Consider for a moment how many user IDs and passwords you have to remember for all of the Web sites you visit. Think about how many more cookies you have stored on your system. And consider how many businesses maintain their own private little databases of information about you. This discussion has no doubt raised your hackles about privacy and security issues. It also points out a significant challenge facing Web services technology. There are no standards that allow Web sites to share something as simple as user identity. There are, in fact, no standards to represent user identity and no standards to ensure user privacy. How can we achieve the seamless integration of Web services if these services can't share identity, as well as other situational context? Before the vision of transparent, dynamic interaction of widely distributed, heterogeneous Web services can become a reality, this issue of shared context must be solved. Shared context raises some fairly sensitive issues. The solution can't come from a single vendor. It cannot be proprietary. The solution must be open and interoperable. It must work with any Web service. And it must ensure the security and privacy of individual information. What Developers WantSo where does this leave the developer? Obviously developers aren't going to sit back and wait for new standards to be developed. They need to start building Web services today. But they want help. They want help understanding how all the different Web services technologies work together. They want guidelines to ensure that Web services are interoperable. And they want to be able to build ?mart?Web services. Smart Web ServicesA smart Web service is a Web service that can understand situational context and share that context with other services. It produces dynamic results based on who, what, when, where, and why it was called. A smart Web service can be aware of a number of situational circumstances, such as:
Smart Service ExamplesFor example, let's say you invoke a smart restaurant finder service to help you select a restaurant. The smart restaurant finder wants to make a recommendation based on where you are, what you like, where you ate last night, and your companions. It makes a big difference whether you're going out with your children or an important prospective client. So the smart restaurant finder considers your identity, your preferences, your history, and your role. As another example, imagine that there's a power emergency in California. The electric company broadcasts a Stage 3 alert to all power consumers. This notification would launch an energy conservation service, if available, at all consumer sites. In a business facility, the energy conservation service would automatically reduce power utilization by adjusting thermostats and switching off lights according to predefined policies based on parameters such as time of day and day of the week. Some of these predefined policies might be superseded by situational parameters, such as a temporary service-level agreement that's in effect during a particular production run. In a home, the energy conservation service could adjust the thermostat, switch off lights, and impose a volume governor on your teenager's stereo. But the smart service also considers who is physically present in the home. For example, the smart service knows that a baby is sleeping upstairs, and therefore doesn't adjust the thermostat for the upstairs heating zone. As a final example, consider an order fulfillment process. Imagine that a customer has ordered six different items. At the time of the order, you promised that the goods would be shipped within two days, but as your procurement service places the order with your contract suppliers, it determines that a supply constraint on one of the items will prevent you from shipping the entire order as promised. Your standard policy in a situation like this is to send a partial shipment, but this eats away at your profit margin. What's most irritating is that even if you send multiple shipments, they often arrive all on the same day - and the customer may not care if the goods arrive today or tomorrow. You're looking for an alternative that saves money and still keeps the customer happy. Rather than automatically sending the goods in multiple shipments, a smart service would determine a course of action by considering the customer's profile and past history, and weighing the profit impact of expediting missing components or reshuffling factory work orders. The service may also take into consideration other parameters, such as cost of inventory, cost of space, estimated shipping charges, and expected delivery times. It might send an inquiry to the customer -- by e-mail, short message service (SMS) message, automated voice response message, return fax, or some other delivery mechanism as defined in the customer profile -- requesting a decision:
Making Web Services SmarterAnyone can build context-sensitive Web services. Certainly many Web sites offer highly customized content based on who you are and your past history with the site. But context sensitivity is only half of the problem. A smart service must also be able to share context with other services. Unfortunately, no standards or conventions exist for representing this context. Every site that provides a personalized experience maintains identity and history information in a proprietary format. What's needed is a new set of standards ?an XML framework -- to represent contextual information. What's also needed is an open architecture that defines how services use this information and assures service interoperability. An Open Software Architecture for Interoperable, Smart Web ServicesSun has defined an open software architecture to support interoperable, smart Web services. The Open Net Environment (ONE) software architecture addresses important issues, such as privacy, security, and identity. It defines practices and conventions to support situational context, such as client device type and user location. And it supports systems that can span multiple networks, including the traditional Web, wireless Web, and home networks. The architecture is designed to ensure that smart Web services, developed using any tool, running on any platform, can seamlessly interoperate. The ONE architecture includes a developer model that provides guidelines for building Web services. The principles defined with the developer model apply to any programming language, but the ONE developer model specifies programming practices in terms of Java APIs. The ONE architecture is based on a recommended set of open and pervasive standards, technologies, and protocols. While defining the architecture, Sun identified additional standards that are needed to complete the architecture. Sun is working with other companies to foster the development of these new standards through appropriate standards bodies and industry initiatives, such as W3C, OASIS, IETF, UDDI, ebXML, and the Java Community Process program. In particular, Sun is working with others to foster the development of new standards to support shared context. Core Standards and TechnologiesAt its essence, the ONE architecture is based on XML and Java technologies and core infrastructure standards. Sun's technical philosophy is to use common, pervasive technologies ?to use what is available, and not reinvent the wheel. The core standards used with the architecture are:
ONE Software Architecture Functional OverviewThe ONE architecture is a living system, and it will continue to grow as new technologies appear that might enhance the environment. The illustration in Figure 1 shows a high-level, functional overview of the major components of a Web services architecture. Figure 1: A functional overview of the major components of a Web services architecture. Service Creation and AssemblyAcross the top of the illustration is a box entitled Service Creation and Assembly. This part of the architecture represents the tools used to develop systems based on the Web services model. A Web service is often made up of a number of discrete service components that instantiate various bits of content, business logic, and applications. Therefore, the service development process involves two distinct steps. The first step involves creating discrete services, which the ONE architecture refers to as micro services. The second step involves assembling the micro services into composite services, or macro services. Developers create micro services using integrated development environments, code generators, XML editors, and authoring tools. (More information about the micro service development model appears later in this paper.) Service assemblers use business process modeling tools, workflow tools, scripting engines, and other types of ?lue?tools to assemble macro services. Assemblers also use policy tools to define business rules, security policies, and context-sensitive policies that can dynamically change the macro services process at runtime. Web ServicesOnce fully tested and complete, the Web services are ready to be delivered to a deployment platform, and the policies and rules are ready to be deployed to an open directory that manages identity, security, and policy. The Applications & Web Services box in Figure 1 represents the deployed Web services, which can be deployed on any type of platform or intelligent device, from a tiny smart card to a massive mainframe. What appears to the user as a single Web service might actually be a macro service composed of a number of micro services. The discrete components of a macro Web service may be deployed on any number of physical platforms. Micro services can be assembled, configured, and reconfigured at any time. Deployment ArchitectureThe remainder of Figure 1 represents the ONE software deployment architecture. Working from left to right, the diagram depicts service consumers interacting with service delivery facilities. A service consumer may be a human interacting through a variety of devices, another application, or a Web service. Service delivery facilities provide basic connection, location, discovery, and communication functionality. This part of the architecture includes all types of user and business portals that enable Web users, wireless users, voice users, and external business systems to invoke services. Service delivery facilities direct each request to an appropriate Web service. A Web service executes within some type of service container, such as a Web or application server. The service container provides a runtime environment for the service and persistence and state management services as well as process management facilities, which manage service workflow and event processing. Service integration facilities enable the service to access other Web services and resources such as databases, files, directories, and legacy applications. The entire environment runs on a service platform, which provides access to local operating system services such as databases, directories, and messaging services. Identity and policy facilities within the service platform manage the environment and ensure security. The service platform resides on an operating system or virtual machine, providing access to hardware, storage, and networks. Any kind of processor can act as a service platform, from a smart card to a mainframe. Adding Smarts to the SystemThe illustration in Figure 2 shows the Web services architecture with additional functionality to support context sensitivity. The smart delivery facilities can aggregate, customize, and personalize service results based on context. The smart policy facilities coordinate activities according to policies associated with identity, context, and roles. The smart process facilities use context to affect business service workflow. And the smart management facilities ensure privacy, security, and access rights based on specific situations as defined by the context. Figure 2: Making Web services smarter. Web Services Processing ModelFigure 3 shows an overview of the processing model based on the smart Web services architecture.
Preparing a Web ServiceSmart management facilities manage, monitor, and maintain a Web service to:
Smart policy facilities manage and interface with the various directories and repositories that contain the policies and business rules that affect service processing. Processing a Service RequestA service request comes in through a delivery channel, such as a Web server, wireless server, or business portal. Smart delivery facilities capture the current context of the request; record information such as location, role, and time; and pass the request to the service. Service ProcessSmart process facilities manage the choreography of a macro service. Based on the contextual assignments and policies and business rules defined for the service, smart process facilities ensure that the appropriate micro services are invoked in the proper sequence. The services use integration and resource access engines to invoke other services and access databases, files, legacy applications, and other resources. Delivering a Service ResponseWhen processing is complete, smart delivery facilities tailor a response for the consumer using personalization and contextual sensitivity engines. The final response is delivered back to the user through appropriate delivery channels. Standards BackplaneThe illustration in Figure 4 shows the Web services architecture overlaid with many of the standards and technologies that provide the foundation for the ONE architecture. Not all of these standards are required in every case. The standards are provided as a guideline and aid for interoperability. Figure 4: Standards ensure interoperability. Smart Delivery StandardsSmart delivery facilities support a variety of client devices using a number of device-specific presentation formats, including HTML, XHTML, WML, and VoiceXML.
Smart delivery facilities also manage content transformation, generally using XML and XSLT.
A Web service exposes an XML interface, which communicates using an XML messaging protocol such as SOAP, SwA, ebXML Message Service, or XMLP. The format of the XML message should be defined using an XML schema, such as W3C Document Type Definition (DTD), W3C XML Schema, RELAX (an emerging ISO standard), or TREX (an emerging OASIS standard). The message schema should be registered in a schema registry, such as xml.org. The service interface can also be described using a Web service description language, such as WSDL. The semantics of the Web service may be described using business modeling tools and registered in a semantic service registry such as the ebXML Registry and Repository. The business that offers the service should register it in the UDDI Business Registry. Service ContainerThe service container provides the runtime environment for Web services. The type of service container used depends on the type of platform hosting the services. The ONE architecture provides recommendations for both servers and devices.
Smart ManagementSystem, network, and application management works as a distributed application involving management control services and numerous management agents deployed across each managed node in the environment. The agents on systems, devices, and applications collect information as defined by the Simple Network Management Protocol (SNMP) standard and relay this information to the control services. Traditionally, most management systems require a homogeneous infrastructure to effectively manage the entire environment. This approach has led to large, expensive system management frameworks that lock customers into a single vendor for all aspects of management. The Common Information Model (CIM), defined by the Distributed Management Task Force (DMTF), enables a new generation of system management solutions based on modular and interoperable management services that communicate SNMP information using XML. CIM defines the schema and protocol standards that enable the design of Web-Based, Enterprise Management (WBEM), which works independently of the underlying design of other services and agents with which they interact. In this model, system and network equipment will include its own management agents, and a wide variety of companies will compete with modular Web services targeting specific aspects of management. So instead of customers being locked into a single vendor, they will be able to choose best-of-breed vendors for each aspect of management. Web services can also be managed using this model. Developers can instrument a Web service using Java Management Extensions (JMX[tm]) technology or the Java WBEM Services API and create standard interfaces for managing deployment, health, and performance of the service. CIM enables this work to be done by the people who are in the best position to optimally implement these features ?developers. As Web services are deployed, Web-based management services will be able to use these same standards to discover services and manage them through their agents. Because these are well-defined services, companies will be able to outsource aspects of their system and network management to third-party management service providers (MSPs) that can perform those same tasks over the network. Since the services are modular, customers can determine on a case-by-case basis which parts of management they want to retain in-house, and which parts they would like to outsource. Smart ProcessSmart process facilities enable context-sensitive service choreography. Context-based smart processing can change the outcome of a macro Web service by dynamically altering the choreographed sequences of micro Web service invocations based on the context of the request, such as geography, jurisdiction, or the maturity of the business relationship.
Smart PolicyA Web service can use a policy engine to dynamically adapt processing and results according to rules that consider user identity, authorization levels, and other contextual information. The context-oriented standards have yet to be defined, but a number of standards and proposals exist for security. User and policy information can be maintained in an open directory accessed using LDAP. Kerberos and Public Key Infrastructure (PKI) provide services for authentication, authorization, privacy, and data integrity. In addition, the OASIS Security Services Technical Committee is working on the Security Assertion Markup Language (SAML), an XML framework for exchanging authentication and authorization information so that cross-enterprise transactions can be made more secure using open technology. This framework will provide a request/response protocol for accessing authentication and authorization services, encode requests for and assertions of identity and entitlement in XML form, and supply bindings of security messages to various transport and messaging protocols. SAML is based on two proposed security specifications: the Security Services Markup Language (S2ML) and AuthXML. The S2ML specification was written by Bowstreet, Commerce One, Jamcracker, Netegrity, Sun Microsystems, VeriSign, and webMethods. The AuthXML specification was written by an industry consortium led by Outlook Technologies. Web Services Developer ModelThe ONE Web services developer model provides recommendations for building Web services using XML and Java technologies. The Java platform includes native support for XML. The Java API for XML Processing (JAXP) provides a native Java interface to DOM, SAX, and XSLT. Additional Java APIs for XML are in various stages of development through the Java Community Process (JCP) program:
The Anatomy of a Web ServiceFigure 5 shows a micro Web service from the developer's perspective. A Web service consists of a Web service interface and one or more service components. The Web service interface manages and manipulates XML messages. Service components contain business logic that implements the service. Business components frequently interact with external resources and services through a variety of integration services.
Web Service InterfaceA Web service communicates by passing XML documents over standard Web protocols, such as HTTP. The Web service interface, which runs as a JSP page or servlet running within a Web server, implements the code that produces and consumes these XML messages. The ONE architecture recommends four types of XML messaging systems: SOAP, SwA, ebXML Message Service, and XMLP.
A service consumer invokes a Web service by posting an XML message to the URL that represents the JSP page containing the Web service interface. The service interface receives the XML message and extracts the XML document. Currently, this process is performed using SOAP or ebXML APIs. In the future, developers will use JAXM or JAX/RPC to more efficiently process XML messages. The service interface takes XML documents and maps XML data into Java object data. Today, developers can use JAXP to process XML documents. In the future, they will be able to use JAXB to automatically bind documents to Java objects. Capturing Context InformationThe Web service interface also captures as much context information as is available. User identity might be captured by retrieving a cookie from the client's system or by challenging the user for a user ID and password. Once the service interface has determined identity, the service can query its proprietary user history files to retrieve additional context. Sun is collaborating with partners to foster a standards effort that will define standard frameworks for identity and context. Details of the context framework have yet to be defined, but it is expected that a new set of standard APIs will be developed to access user context. Business LogicOnce the service interface has mapped the XML data to Java data and captured the context, it uses servlet facilities to perform the usual session management services, and then it invokes the business logic, which performs the actual service. The business logic is implemented as an EJB component, or possibly a servlet for light-duty applications. The business logic component interfaces with a workflow engine that choreographs the composite business transaction, and a policy engine that applies appropriate business rules according to the situational context. The specifics of this process have yet to be defined. No doubt, ebXML, BPML, and the OASIS security services will play a role. Integration ServicesThe business logic component interfaces with various resources. The JDBC API provides access to databases; J2EE Connectors and the Java Message Service (JMS) API can be used to access other application systems; and XML messages are used to interface with other Web services. Currently, developers construct XML messages using SOAP and ebXML APIs. In the future, they will use JAXM or JAX/RPC to more easily manipulate XML messages. Returning ResultsWhen the business logic component has completed its work, it returns a Java result object to the JSP page or servlet interface component. The interface component maps the results from the Java object to the output XML document using JAXP or, in the future, JAXB. The interface component can then use the context to further customize the response document as appropriate. When ready, the response is packaged back up into a XML message and returned to the requestor. SummaryThe ONE architecture is designed to help developers be successful building Web services today. The Web services technologies currently available are still rudimentary, but that fact shouldn't stop developers from venturing into this exciting new territory. Web services represent the next generation of software. This architecture provides a guideline to help developers put the myriad XML standards, technologies, and initiatives in perspective. The developer model provides a foundation for development efforts, indicating which technologies and APIs should be used for each facet of a Web service. Meanwhile, Sun is working with the community to foster new standards and technologies that will enhance and enable the Web services model. Initial topics to be considered include the creation of a standard XML framework that:
ResourcesFor more information about the products and technologies mentioned in this white paper, please visit:
|