US 7761584 B2
Signals are mapped from one protocol to another protocol. A first protocol is received, and a mapping interface is generated to a second protocol. The first protocol is then mapped to the second protocol in accordance with the mapping interface. The mapping interface may comprise a coordination map. Moreover, a state diagram may be generated that is based on the first protocol, prior to mapping the first protocol to the second protocol. The first protocol may be an abstract protocol or a web services business activity protocol, for example, and the second protocol may be another abstract protocol, a concrete interface, a web services interface, a common language runtime interface, or a business process execution language for web services, for example.
1. A method, executed by a machine, of creating a new protocol from a first protocol, wherein a protocol is a structured communication pattern, comprising:
receiving the first protocol;
generating a mapping interface to a second protocol, wherein the mapping interface comprises a coordination map;
generating a state diagram based on the first protocol; and
creating the new protocol by partially mapping the first protocol to the second protocol based on the mapping interface, wherein the first protocol is an abstract protocol defining abstract operations and the new protocol comprises a protocol having (a) concrete characteristics, which bind one or more of the abstract operations to a first concrete (executable) process, and (b) abstract characteristics, which permit subsequent customizable binding of one or more of the abstract operations to a plurality of other concrete processes.
2. The method of
3. The method of
4. The method of
5. The method of
6. The method of
7. The method of
8. The method of
9. The method of
10. A protocol mapping system, wherein a protocol is a structured communication pattern, comprising an input device that receives a first protocol, and a processor that receives the first protocol from the input device, generates a mapping interface to a second protocol, wherein the mapping interface comprises a coordination map, and generates a state diagram based on the first protocol, and partially maps the first protocol to the second protocol based on the mapping interface, thereby creating a new protocol, wherein the first protocol is an abstract protocol defining abstract operations and the new protocol comprises a protocol having (a) concrete characteristics, which bind one or more of the abstract operations to a first concrete (executable) process, and (b) abstract characteristics, which permit subsequent customizable binding of one or more of the abstract operations to a plurality of other concrete processes.
11. The system of
12. The system of
13. The system of
14. The system of
15. The system of
16. The system of
17. The system of
18. The system of
19. A computer-readable storage medium having stored thereon a data structure for implementing the method of
a first data field containing a state diagram for a first protocol, wherein a protocol is a structured communication pattern; and
a second data field containing a coordination map between the first protocol and a second protocol, wherein the first protocol is an abstract protocol defining abstract operations and the coordination map is configured to generate a new protocol comprising (a) concrete characteristics, which bind one or more of the abstract operations to a first concrete (executable) process, and (b) abstract characteristics, which permit subsequent customizable binding of one or more of the abstract operations to a plurality of other concrete processes.
20. The computer-readable storage medium of
21. The computer-readable storage medium of
22. The computer-readable storage medium of
23. The computer-readable storage medium of
24. The computer-readable storage medium of
25. The computer-readable storage medium of
26. The computer-readable storage medium of
The present invention relates generally to the field of software development for distributed systems, and, more particularly, to the relationship between patterns of interaction and messages transmitted over a network.
Web services (sometimes called application services) are services that are made available from a business's web server for web users or other web-connected programs. Providers of web services are generally known as application service providers. Web services range from such major services as storage management and customer relationship management (CRM) down to much more limited services such as the furnishing of a stock quote and the checking of bids for an auction item. The accelerating creation and availability of these services is a major web trend. Users can access some web services through a peer-to-peer arrangement rather than by going to a central server. Some services can communicate with other services and this exchange of procedures and data is generally enabled by a class of software known as middleware. Services previously possible only with the older standardized service known as Electronic Data Interchange (EDI) increasingly are likely to become web services. Besides the standardization and wide availability to users and businesses of the internet itself, web services are also increasingly enabled by the use of the Extensible Markup Language (XML) as a means of standardizing data formats and exchanging data. XML is the foundation for the Web Services Description Language (WSDL).
When developers write web services they must move beyond designing interfaces for local objects. They essentially design protocols for interacting with remote services. Today, this is done in an ad hoc and often incorrect manner.
In view of the foregoing, there is a need for systems and methods that overcome such deficiencies.
The following summary provides an overview of various aspects of the invention. It is not intended to provide an exhaustive description of all of the important aspects of the invention, nor to define the scope of the invention. Rather, this summary is intended to serve as an introduction to the detailed description and figures that follow.
The present invention is directed to mapping the signals from one protocol to another protocol.
Exemplary embodiments include systems and methods of protocol mapping. A first protocol is received, and a mapping interface is generated to a second protocol. The first protocol is then mapped to the second protocol in accordance with the mapping interface. The mapping interface may comprise a coordination map. Moreover, a state diagram may be generated that is based on the first protocol, prior to mapping the first protocol to the second protocol.
According to aspects of the invention, the first protocol may be an abstract protocol or a web services business activity protocol, for example, and the second protocol may be another abstract protocol, a concrete interface, a web services interface, a common language runtime interface, or a business process execution language for web services, for example.
Additional features and advantages of the invention will be made apparent from the following detailed description of illustrative embodiments that proceeds with reference to the accompanying drawings.
The foregoing summary, as well as the following detailed description of preferred embodiments, is better understood when read in conjunction with the appended drawings. For the purpose of illustrating the invention, there is shown in the drawings exemplary constructions of the invention; however, the invention is not limited to the specific methods and instrumentalities disclosed. In the drawings:
The subject matter is described with specificity to meet statutory requirements. However, the description itself is not intended to limit the scope of this patent. Rather, the inventors have contemplated that the claimed subject matter might also be embodied in other ways, to include different steps or combinations of steps similar to the ones described in this document, in conjunction with other present or future technologies. Moreover, although the term “step” may be used herein to connote different elements of methods employed, the term should not be interpreted as implying any particular order among or between various steps herein disclosed unless and except when the order of individual steps is explicitly described.
Web Services Business Activity (WS-BA) Framework
The present invention may be used in the web services business activity (WS-BusinessActivity or WS-BA) framework. By using the SOAP (Simple Object Access Protocol) and WSDL (Web Services Description Language) extensibility model, SOAP-based and WSDL-based specifications are designed to work together to define a rich web services environment.
The current set of web service specifications such as WSDL and SOAP defines protocols for web service interoperability. Web services increasingly tie together a number of participants forming large distributed applications. The resulting activities may have complex structure and relationships.
The WS-BA specification provides the definition of a business activity coordination type used to coordinate activities that apply business logic to handle business exceptions. Actions desirably are applied immediately and are permanent. Compensating actions may be invoked in the event of an error. The WS-BA specification defines protocols that enable existing business process and work flow systems to wrap their proprietary mechanisms and interoperate across trust boundaries and different vendor implementations.
The web services business specification is used to describe how to reliably define, create, and connect multiple business processes in a web services environment, and help organizations coordinate business processes and transactions within the enterprise and with partners and customers across heterogeneous systems and within the enterprise. A language to describe business processes is Business Process Execution Language for Web Services, or BPEL4WS. BPEL4WS is an XML-based flow language that defines how business processes interact. This interaction can involve processes contained within or between enterprises. It allows companies to describe complex business processes that can span multiple companies, such as order processing, lead management, and claims handling. These business processes can use partner-provided web services, and can also be offered as web services business process functions internally or to partners in a reliable and dependable way.
A business process describes the flow of tasks, the order in which they need to be performed, the type of data shared, and how other partners are involved. BPEL4WS allows companies to describe business processes that include multiple web services and standardize message exchange internally and between partners. WS-Coordination and WS-Transaction provide companies with a reliable and durable way of handling multiple web services interactions, regardless of the underlying computing infrastructure. In addition, they outline how partners can interact with a collection of web services and coordinate the outcome of those corresponding activities.
Thus, exemplary coordination protocols for business activities are BusinessAgreementWithParticipantCompletion and BusinessAgreementWithCoordinatorCompletion. Regarding BusinessAgreementWithParticipantCompletion, a participant registers for this protocol with its coordinator, so that its coordinator can manage it. A participant must know when it has completed all work for a business activity. Similarly, with respect to BusinessAgreementWithCoordinatorCompletion, a participant registers for this protocol with its coordinator, so that its coordinator can manage it. A participant relies on its coordinator to tell it when it has received all requests to perform work within the business activity.
The coordinator accepts several messages or notifications. Upon receipt of the “completed” notification, the coordinator knows that the participant has completed all processing related to the protocol instance. For the next protocol message, the coordinator should send a “close” or “compensate” notification to indicate the final outcome of the protocol instance.
Upon receipt of the “fault” notification, the coordinator knows that the participant has failed from the active or compensating state. For the next protocol message, the coordinator should send a “faulted” notification. This notification desirably carries a QName defined in schema indicating the cause of the fault.
Upon receipt of the “compensated” notification, the coordinator knows that the participant has recorded a compensation request for a protocol. Upon receipt of the “closed” notification, the coordinator knows that the participant has finalized successfully.
Upon receipt of the “canceled” notification, the coordinator knows that the participant has finalized successfully processing the “cancel” notification. Upon receipt of the “exit” notification, the coordinator knows that the participant will no longer participate in the business activity. For the next protocol message, the coordinator should send an “exited” notification.
The participant also accepts several messages or notifications. Upon receipt of the “close” notification, the participant knows the protocol instance is to complete successfully. For the next protocol message, the participant should send a “closed” notification to end the protocol instance.
Upon receipt of the “cancel” notification, the participant knows that the work being done has to be canceled. For the next protocol message, the participant should send a “canceled” notification to end the protocol instance.
Upon receipt of the “compensate” notification, the participant knows that the work being done should be compensated. For the next protocol message, the participant should send a “compensated” notification to end the protocol instance.
Upon receipt of the “faulted” notification, the participant knows that the coordinator is aware of a fault and no further actions are required of the participant. Upon receipt of the “exited” notification, the participant knows that the coordinator is aware the participant will no longer participate in the activity.
The coordinator can enter a condition in which it has sent a protocol message and it receives a protocol message from the participant that is consistent with the former state, not the current state. In such a case, it is the responsibility of the coordinator to revert to the prior state, accept the notification from the participant, and continue the protocol from that point. If the participant detects this condition, it discards the inconsistent protocol message from the coordinator.
In addition to the notifications set forth above with respect to
As used herein, cancel means to back out of a business activity, and close means to terminate a business activity with a favorable outcome. Compensate is a message to a completed participant from a coordinator to execute its compensation. This message is part of both the BusinessAgreementWithParticipantCompletion and BusinessAgreementWithCoordinatorCompletion protocols.
Complete is a message to a participant from a coordinator telling it that it has been given all of the work for that business activity. This message is part of the BusinessAgreementWithCoordinatorCompletion protocol. Completed is a message from a participant telling a coordinator that the participant has successfully executed everything asked of it and needs to continue participating in the protocol. This message is part of both the BusinessAgreementWithParticipantCompletion and BusinessAgreementWithCoordinatorCompletion protocols.
Exit is a message from a participant telling a coordinator that the participant does not need to continue participating in the protocol. This message is part of both the BusinessAgreementWithParticipantCompletion and BusinessAgreementWithCoordinatorCompletion protocols. Fault is a message from a participant telling a coordinator that the participant could not execute successfully.
BusinessAgreementWithParticipantCompletion protocol is a business activity coordination protocol that supports long-lived business processes and allows business logic to handle business logic exceptions. A participant in this protocol must know when it has completed with its tasks in a business activity.
BusinessAgreementWithCoordinatorCompletion protocol is a business activity coordination protocol that supports long-lived business processes and allows business logic to handle business logic exceptions. A participant in this protocol relies on its coordinator to tell it when it has received all requests to do work within a business activity.
Scope is a business activity instance. A scope integrates coordinator and application logic. A web services application can be partitioned into a hierarchy of scopes, where the application understands the relationship between the parent scope and its child scopes.
A protocol is a structured communication pattern. Examples range from bartering for goods in a public market to a reliable message exchange. For example, an abstract protocol is a pattern of behavior. An interface defines the structures and actions an object or service accepts. Aspects of the present invention are directed to mapping from a high-level protocol abstract description to a concrete interface or another protocol.
In an exemplary abstract protocol, the two roles are participant and coordinator. The participant acts as the seller and the coordinator acts as the buyer. Desirably, the roles are mapped, and then the transitions and messages are mapped. For example, a buyer and seller each provide a port type to each other. Generally, to map from an arbitrary protocol to an arbitrary port type, the transitions are made into parameters. The new transitions are then mapped.
According to an exemplary embodiment, the abstract protocol is translated or otherwise encoded into a state diagram. The state diagram is a contract showing what gets mapped onto the concrete protocol. The state diagram is used to build a concrete protocol, for example.
For example, port type “BuyerPT” refers to transition operations such as “ready to ship”, “order declined”, “out of stock”, “revoke failed”, “order cancelled”, and “revoke successful”. Input messages corresponding to these transition operations are also provided. Port type “SellNormalPT” refers to transition operation “confirm and ship order, and port type “SellBreakPT” refers to “cancel order” and “revoke order”.
In the coordination map shown in
More particularly, lines 1-15 in
Lines 2-4 and 5-7 define the two service roles in the interaction the “Buyer” and the “Seller”. Line 3 defines the WSDL port type for the buyer. A port type is a fixed set of web services operations which typically manifest as SOAP messages which enter (inputs) or exit (outputs) a service. Line 6 defines the port types for the seller. In this case, the seller service exposes two port types, “SellNormalPT” and “SellBreakPT”.
Lines 8-15 comprise the coordination map which defines the mapping. This coordination map is specific to the WS-BusinessActivity coordination type. Subsequent examples demonstrate more general mappings. The transitions are mapped to messages. WS-BusinessActivity defines two abstract roles, “participant” and “coordinator”, and a set of abstract signals including “completed”, “cancel”, “compensate”, and “close”.
Line 8 establishes one equivalence (mapping) between the abstract role “participant” and the concrete role “Seller” and a second equivalence between the abstract role “coordinator” and the concrete role “Buyer”. Line 9 establishes an equivalence (or mapping) between the abstract signal “completed” and the concrete operation “ReadyToShip” on the “BuyerPT” port type (message between the two web services, for example). Lines 10-12 establish similar equivalences or mappings between abstract signals and concrete operations. In this example, the abstract signals including “completed”, “cancel”, “compensate”, and “close” are fixed per XML.
A more general example is directed to arbitrary mapping, as shown in
More particularly, line 1 of
In this example, the protocol operations include “completed”, “cancel”, “compensate”, “close”, and “fault”. The roles are as before “coordinator” and “participant”; however, in this example, the roles are parameterized. The role parameters are instantiated on Lines 2 and 5. The “type” attribute establishes a correspondence between the abstract role and the concrete role defined in the “name” attribute.
Lines 9-13 define maps from protocol operations to concrete operations against service port types. Line 9 establishes a mapping from the protocol operation “completed” to the “ReadyToShip” operation on the “BuyerPT” port type. Lines 10-13 establish similar mappings between protocol operations to concrete operations. The abstract parameters for the protocol operations are variables and may be changed in this example, per XML
Another example is shown in
In the example of
Thus, in the example of
In the example of
In the examples of
A further example is shown in
When mapping from an abstract to a concrete protocol it is often useful to bind some operations and leave others unbound. This mapping effectively creates a new protocol that has some concrete and some abstract characteristics.
Exemplary Computing Environment
Numerous embodiments of the present invention may execute on a computer.
Those skilled in the art will appreciate that the invention may be practiced with other computer system configurations, including handheld devices, multiprocessor systems, microprocessor based or programmable consumer electronics, network PCs, minicomputers, mainframe computers and the like. The invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote memory storage devices.
As shown in
The personal computer 20 may further include a hard disk drive 27 for reading from and writing to a hard disk, not shown, a magnetic disk drive 28 for reading from or writing to a removable magnetic disk 29, and an optical disk drive 30 for reading from or writing to a removable optical disk 31 such as a CD-ROM or other optical media. The hard disk drive 27, magnetic disk drive 28, and optical disk drive 30 are connected to the system bus 23 by a hard disk drive interface 32, a magnetic disk drive interface 33, and an optical drive interface 34, respectively. The drives and their associated computer readable media provide nonvolatile storage of computer readable instructions, data structures, program modules and other data for the personal computer 20.
Although the exemplary environment described herein employs a hard disk, a removable magnetic disk 29 and a removable optical disk 31, it should be appreciated by those skilled in the art that other types of computer readable media which can store data that is accessible by a computer, such as magnetic cassettes, flash memory cards, digital video disks, Bernoulli cartridges, random access memories (RAMs), read only memories (ROMs) and the like may also be used in the exemplary operating environment.
A number of program modules may be stored on the hard disk, magnetic disk 29, optical disk 31, ROM 24 or RAM 25, including an operating system 35, one or more application programs 36, other program modules 37, and program data 38. A user may enter commands and information into the personal computer 20 through input devices such as a keyboard 40 and pointing device 42. Other input devices (not shown) may include a microphone, joystick, game pad, satellite disk, scanner or the like. These and other input devices are often connected to the processing unit 21 through a serial port interface 46 that is coupled to the system bus, but may be connected by other interfaces, such as a parallel port, game port or universal serial bus (USB). A monitor 47 or other type of display device is also connected to the system bus 23 via an interface, such as a video adapter 48. In addition to the monitor 47, personal computers typically include other peripheral output devices (not shown), such as speakers and printers. The exemplary system of
The personal computer 20 may operate in a networked environment using logical connections to one or more remote computers, such as a remote computer 49. The remote computer 49 may be another personal computer, a server, a router, a network PC, a peer device or other common network node, and typically includes many or all of the elements described above relative to the personal computer 20, although only a memory storage device 50 has been illustrated in
When used in a LAN networking environment, the personal computer 20 is connected to the LAN 51 through a network interface or adapter 53. When used in a WAN networking environment, the personal computer 20 typically includes a modem 54 or other means for establishing communications over the wide area network 52, such as the internet. The modem 54, which may be internal or external, is connected to the system bus 23 via the serial port interface 46. In a networked environment, program modules depicted relative to the personal computer 20, or portions thereof, may be stored in the remote memory storage device. It will be appreciated that the network connections shown are exemplary and other means of establishing a communications link between the computers may be used.
While it is envisioned that numerous embodiments of the present invention are particularly well-suited for computerized systems, nothing in this document is intended to limit the invention to such embodiments. On the contrary, as used herein the term “computer system” is intended to encompass any and all devices comprising press buttons, or capable of determining button presses, or the equivalents of button presses, regardless of whether such devices are electronic, mechanical, logical, or virtual in nature.
The various systems, methods, and techniques described herein may be implemented with hardware or software or, where appropriate, with a combination of both. Thus, the methods and apparatus of the present invention, or certain aspects or portions thereof, may take the form of program code (i.e., instructions) embodied in tangible media, such as floppy diskettes, CD-ROMs, hard drives, or any other machine-readable storage medium, wherein, when the program code is loaded into and executed by a machine, such as a computer, the machine becomes an apparatus for practicing the invention. In the case of program code execution on programmable computers, the computer will generally include a processor, a storage medium readable by the processor (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device. One or more programs are preferably implemented in a high level procedural or object oriented programming language to communicate with a computer system. However, the program(s) can be implemented in assembly or machine language, if desired. In any case, the language may be a compiled or interpreted language, and combined with hardware implementations.
The methods and apparatus of the present invention may also be embodied in the form of program code that is transmitted over some transmission medium, such as over electrical wiring or cabling, through fiber optics, or via any other form of transmission, wherein, when the program code is received and loaded into and executed by a machine, such as an EPROM, a gate array, a programmable logic device (PLD), a client computer, a video recorder or the like, the machine becomes an apparatus for practicing the invention. When implemented on a general-purpose processor, the program code combines with the processor to provide a unique apparatus that operates to perform the functionality of the present invention.
While the present invention has been described in connection with the preferred embodiments of the various figures, it is to be understood that other similar embodiments may be used or modifications and additions may be made to the described embodiments for performing the same functions of the present invention without deviating therefrom. Therefore, the present invention should not be limited to any single embodiment, but rather construed in breadth and scope in accordance with the appended claims.