A REST -based Approach to Integrate Enterprise ...

9 downloads 0 Views 265KB Size Report
of process, Hans Weigand proposed a methodology which packages contract ..... Software Architectures (PhD Thesis), UC Irvine, Information and. Computer ...
A REST [1]-based Approach to Integrate Enterprise Resources Wang Junye#1, Mao Lirui#2, Cai Hongming#3 #

Laboratory of Information System, School of Software, Shanghai Jiao Tong University, Shanghai 200240, China 1 [email protected] 2 [email protected] 3 [email protected]

ABSTRACT: As is known to all, the shortcomings of traditional SOAP-based web service and the older XML-RPC protocols [2], such as lacking of addressability and connectedness, greatly limit the modeling and abstraction of enterprise resources. In order to integrate the resources of enterprise information systems in heterogeneous environment, this paper proposes a REST-based resource-oriented approach to integrate enterprise resources efficiently. First, the characteristics of resource-oriented architecture is elaborated to show its advantages compared to traditional ones. Then, the platform architecture based on RESTful web service, which can be used to integrate enterprise resources, is outlined. Finally, a sample integration scenario is provided to verify the correctness and feasibility of the prototype framework, the result draws the conclusion that it can meet the demand of enterprise resource integration, and this approach to integrate enterprise resources is feasible and effective. KEYWORDS: REST; Web Service; Enterprise Resource Integration

I.

Resource-Oriented;

INTRODUCTION

With the further research of software technology and the widely use of web technology, many companies have established their own information systems in different departments. They are developed and applied under different conditions, serving different layers and sides of the enterprise business. Because of the heterogeneity of the development tools, hardware platforms and databases, as well as the differences in dispersed, multiple-format and multiple-structure information, the company always have interactive problems among information systems, as a result, neither interoperability nor information sharing happens. In the past years, service orientation architecture [3], including widely accepted grid technology and web service has been the most popular integrated architecture. In respect of process, Hans Weigand proposed a methodology which packages contract models, and connects business contract specification language XLBA with component definition language specification of object-based business workflow system. In respect of support, Hongming Cai [4] proposed a heterogeneous resource integrated model based on semantics. Overall, the current resource organization style still cannot meet the demand of distribution and dynamics.

Based on REST, this article proposes a resource-oriented enterprise information integrated platform framework. The integrated platform encapsulates the information distributed in heterogeneous information systems, centering on resource model. It also maps the various distributed heterogeneous resources to logical reference system, and shields all the data format differences among systems by defining a unified resource meta-model and data access interface. By the resource pushing mechanism based on task decomposition, we can construct a software system which provides resource service to implement a different application system, converting heterogeneous information between the accounting process-level interactions. In this way we can establish a resource integrated environment that support business workflow. II.

REST-BASED RESOURCE-ORIENTED ARCHITECTURE

A. Introduction to RESTful Web Service REST (Representational State Transfer) is advanced by Dr. Roy Thomas Fielding, it's a distributed software architecture style that fully makes use of the web properties, reduces the complexity of system development and provides the scalability of the system. RESTful Web Service [5] is a resource-oriented lightweight web service that complies with REST design principles. It makes use of Uniform Resource Identifiers (URI) to locate and identify resources, and makes CRUD [6] operations to resources through the methods (PUT, GET, POST and DELETE) defined in HTTP [7] protocol. What’s more, responses can be marked as cacheable or non-cacheable, so as to increase the coordination and efficiency among proxy server, cache server and gateway. Representations of resource represent the data of resource's current state. The same resource can exist in different representation forms in order to weaken the service limitation in customer side and increase the loose coupling.

B. Introduction to REST-based resource-oriented architecture REST-based resource-oriented Architecture abstracts all the objects in the system as resources and gives them their own unique resource identifiers. It provides various resource services to external environment through RESTful Web Service. This architecture consists of the following four characteristic: addressability, statelessness, connectedness and interface unity of resources. Addressability means how an application publishes its centralized data as a resource by URI. Statelessness implies that every HTTP request is stateless and completely isolated. Since there's no need to save session state, the system's cluster will not be constrained by the session replication and therefore the system scalability will be largely improved. Connectivity requires resources should be linked with each other through their representation. Interface unity refers that the actions on the resource are implemented by the four methods defined by HTTP protocol, which not only simplifies service development and description, but also makes service discovery and automatic matching more convenient when the system is integrated. III.

RESOURCE MODELING METHODOLOGY OF RESOURCE-ORIENTED ARCHITECTURE

A. Resource model characterization method In essence, the business process is the processing and transforming operations on the hosting business information resource model in the process activities. It changes its properties according to a certain action and passes the responded parameters and messages to the process of other activities. To realize the process of integration, firstly we need to recognize the resources in the present dispersed heterogeneous systems and then encapsulate them. Secondly, in order to shield the digital discrepancy, it is advisable to register the resources on the integrated resource platform to realize the unified resource management. Thirdly, we need to realize the resource interoperability by Restful Web Service. Thus, it is necessary to establish a unified resource modeling. There are many researches on resource modeling. Some research has adopted object-oriented modeling method of encapsulation and succession to define the structure and relationship of resource modeling. Some has analyzed the resources in a multidimensional way and described the resources by ontology and Semantic Web. Based on researches of manufacturing resources meta-model [8] proposed by Liu Wei and the analysis of workflow, this paper tends to propose a representation model of workflow-adaptive resource modeling. By applying this method of resource modeling, we can organize integration platform, manage the static and dynamic information in the various enterprise systems and establish open and extensible application system framework, thus to meet the demand of integrating the dynamic and flexible enterprise distributed heterogeneous system.

Figure 1. Resource meta-model

As Figure 1 describes, the resource meta-model contains six main components: Resource Meta-Model (RMM) The Resource Meta-Model is defined as a set of Resource Property (RP), Management Information (MI), Operation Set (OS), Rule Set (RS), Resource View (RV) and relation RE. Thus the Resource Meta-Model (RMM) is defined as the following tuple: RMM = {RP, OS, RS, MI, RV, RE} Resource Property (RP) The Resource Property is defined by the following tuple: RP = {ResID, ResType, SProps, DProps}. ResID represents the unique identifier of a resource entity. ResType represents the category of resource, which describes a kind of specific static resource and can be organized by using a hierarchical tree. SProps is the static properties of a resource, which implies that the values of the properties will never be modified once created. Correspondingly DProps is oppositely the dynamic properties, which describes the status and lifecycle of resources and so on, e.g. the status (created, modified, activated and frozen) of a sales order. Dynamic properties are the best way to describe the status of resources in enterprise business process so as to fit the modeling of enterprise workflow. Operating Set (OS) The Operation Set (OS) = {Oi} Oi is a method with the resource properties and states as the parameters. E.g. the order resource contains the operations of: create, delete, modify, freeze, activate and so on. Rule Set (RS) The Rule Set (RS) = {Ri} Ri represents a function mapping from resource properties to workflow states, in order to reflect the rules and constrains of the resource state transitions in a process. E.g., when the goods in an order are stored into the inventory, the

status of that order can be changed to “activated”. What’s more, it’s more convenient to implement the choreography of resource services with business rules organized as resource-centered. Management Information (MI) The Management Information (MI) is defined in form of the following tuple: MI = SystemInfo is the information in the system where the resource locates. PlatformInfo is the register information of the resource in integrated platform. It mainly supports the RESTful Web Service representation method of resource objects. Resource View (RV) The Resource View (RV) = f (RP) Resource View is the result of the resource properties with the constraint of certain rules. A set of rules f (RP) is used to generate the functions of resources such as display, search, filter and buffer. B. RESTful Web Service characterization method of resources In REST architecture style systems, the core element is the URI characterization method of resources, that is, URI should be properly meaningful and well-structured. The unified identifier template definition is as follows: /{namespace}/{address}.{format}?{parameters}, the four parts are: 1) Resource namespace. It is used to resolve resource name conflict problems in heterogeneous systems. Moreover, namespace could route a target resource to the corresponding system specific module. E.g., /erp/finance implies the target resource locates in Finance module of the ERP system. 2) Resource address. It is used to retrieve the representation of resource objects in specified systems. E.g., /client[1]/order[2] represent the order resource with resource number 2 owned by the customer with resource number 1. There’re also several usually used URI mapping rules, such as inherit, aggregation, composition and association. 3) Resource representation. Common forms are XML documents, HTML web page documents, JSON data format, etc. 4) Resource request parameter. When requesting resources with HTTP GET method, we can add filter parameters at the end of the URI. URI identifies only resources instead of the operations of the resource, so it’s not appropriate to place the operation name in the URI. If freeze operation should be executed towards an order resource, we can adopt the way of overloading HTTP POST, add operation name and related parameters in HTTP BODY so as to send resource request to the URI “/invoice[id]” by POST method.

IV. REST-BASED RESOURCE-ORIENTED ENTERPRISE INFORMATION INTEGRATION PLATFORM FRAMEWORK A. Integration platform framework model

Figure 2. Integrated platform framework model

Figure 2 shows the framework model of the integration platform, which consists of six components: 1) Heterogeneous system resource adapter: Resource adapters help each heterogeneous system to to discover and identify business resources, and then registered to the resource model library in the integrated platform, making the integrated platform able to use uniform resource identifier to do reading and writing operations for heterogeneous resources. 2) Resource model management: It takes responsibility to manage the resource models from each heterogeneous system. The meta-information and mapping strategy of the resource model is saved in the XML file for resource objects module. It provides model information which is dynamically binded to the service for the resources service module. 3) Resource object management: It takes responsibility to manage resource objects discovered and identified from different heterogeneous systems. The Resource Strategy Manager judges the resource request from the RESTful Service Management, and dispatch them to the corresponding Resource Handling Engine. Then the requests will be routed through the Resource Router Manager to the heterogeneous systems. At last resources representation is generated and returned to the RESTful Service Management.

4) RESTful service management: The configuration, authority, transaction, interface definition of RESTful services are managed by this module. It receives service dynamic binding requests, and publishes services in Web Application Description Language (WADL) document [9] based on the service interface definition and configuration, so that these services are available to external applications. 5) Service bus: It ensures the information transferring and routing among RESTful services, includes publishing, subscription, response to request of RESTful services, and it supports both synchronous and asynchronous messages, records the call history of services, as well as measures and monitors data. It also helps attain service from RESTful service management, and can be registered service by that. 6) Process management: This module takes charge of the management of process lifecycle, process exception handling, service execution and service orchestration, and it parses the resource process execution language with the help of the workflow engine. Temporary Data Transfer embeds the data handling scripts into the RESTful service process files, and executes the operations such as extraction, filtering, and transferring with the input and output parameters. B. Resource applying mechanism supporting workflow This platform adopts workflow description language Bite [10] , which fits to RESTful Web Service, to describe service orchestration. Table I shows the overview of Bite constructs: TABLE I.

OVERVIEW OF BITE CONSTRUCTS

Activities

Notes

, ,

Receiving and replying to messages



Call to an external party



Call local code

, ,

Wait for fixed time, no-op, terminate the process instance



Basic data manipulation



External choice



Loops as long as a condition is true



Control link



Optional variable declaration

V.

PROTOTYPE SYSTEMS AND VERIFICATION

A. System Architecture and Implementation Architecture of the prototype system is shown in Figure 3:

Figure 3. Integrated platform software architecture

The integrated platform uses Web-based J2EE Architecture, and is divided into four layers including user interface layer, business logic layer, resource operation layer and data storage layer. In user interface layer, it uses JSP page for interaction, based on web client. In business logic layer, it monitors arrangement of process, and is supported by the rules engine and workflow engine. Resource operation layer is responsible for maintaining the mapping and description of the resource model, retrieval and maintaining of the resource object, and registration and release of the resource services. Data storage layer consists of the database and XML file manager, and manages both structured and semi-structured data. B. Application Scenario Sales staffs manage business opportunities by CRM, and get product catalog, the inventory and price information from the ERP system. They constantly improve the business opportunities according to the negotiations with customers. When sales staffs succeed to create business opportunities, they informed the finance staffs (who are working on ERP) to create the order. And if the stock does not meet the demands, the orders will be frozen. When the inventory of the product in the order meets the demands, a request to create a sales order will be sent to the finance staffs. Finance staffs audit the order and give the feedback of review results in the ERP system. If the audit result failed, it will be passed back to the sales staffs for amendments, otherwise user will be verified whether he exists or not in the ERP system, and if not, relevant customer information will be achieved from the CRM system. After the order is created successfully, customer and order information in ERP must be updated to the CRM timely. Resource model description file in XML format is shown in Figure 4:

d2f3231e erp order active deactive freezed created reviewing destroyed for each $item in 'items' { return false if !($item.isSatisfied) } return true

Figure 4. Resource model description file

As is shown in Figure 4, through an enterprise resource extraction, packaging and presentation of the service, we can implement enterprise systems resource-oriented business process integration efficiently. VI.

CONCLUSION

In this paper, an approach to integrate enterprise resources is proposed, which is REST-based and resource-oriented. Based on this idea, a prototype platform is implemented for verification. Compared to the traditional SOAP-based integration approach, resource-oriented integration platform has many advantages such as service is addressable and can be connected to, interface is consistent, and resources can be cached. What’s more, Restful Web services is a lightweight Web services which has simple description of the document and is easy to release. The diversity of the manifestations of the resources reduces the reliance of client to service. The next step is to do further research on the mechanisms of resource service discovery, mapping and composition

automatically. Meanwhile, more effort will be made to enhance service orchestration, which can greatly improves the flexibility of resource integration when enterprise workflow changes. ACKNOWLEDGMENT This paper is supported by the National High Technology Research and Development Program of China (“863” Program) under No.2008AA04Z126, the National Natural Science Foundation of China under Grant No.60603080, No.70871078, and the Aviation Science Fund of China under Grant No.2007ZG57012. We want to express our gratitude for their supporting of our research. REFERENCES [1]

Fielding, R., Taylor, R.N.: Principled design of the modern Web architecture. ACM Press New York, 2000: 407-416. [2] Fielding, R. T, Architectural Styles and the Design of Network-based Software Architectures (PhD Thesis), UC Irvine, Information and Computer Science, 2000. [3] Thomas Erl: Service-Oriented Architecture, Prentice Hall PTR, 2004. [4] Cai Hongming, He Yuanjun, Liu Huyao: Modeling and implementation of design resource base based on hierarchy semantics networks, Computer Integrated Manufacturing Systems, 2005, 1 (11): 73-78 [5] Leonard Richardson, Sam Ruby. RESTful Web Service [M]. U.S.A: O’Reilly Media, Inc, 2007 [6] Wiegers, K.E.: Software Requirements. 2nd edn. Microsoft Press, 2003 [7] R.Fielding, J. Gettys, J. Mogul, H. Frystyk, L. Masinter, P.Leach, and T. Berners-Lee. Hypertext Transfer Protocol – HTTP/1.1. RFC 2616, The Internet Society, 1999. http://www.w3.org/Protocols/rfc2616/rfc2616.html. [8] Liu Wei, Qiao Lihong: Unified manufacturing resource model framework based on meta-model. Computer Integrated Manufacturing Systems, 2007, 13 (10): 1903-1908 [9] T. Takase, S. Makino, S. Kawanaka, K. Ueno, C. Ferris, and A. Ryman, “Definition Languages for RESTful Web Services: WADL vs. WSDL 2.0,” IBM Reasearch, 2008 [10] Francisco Curbera , Matthew Duftler, Rania Khalaf , Douglas Lovel. Bite: Workflow Composition for the Web. Lecture Notes in Computer Science, 2008, 4749:94-106

Suggest Documents