<<

Enterprise Service Bus Dependency Injection on MVC

Sidhant Rajam/Ruth Cortez/Alexander Vazhenin/Subhash Bhalla Graduate Department of Information Technology and Project Management University of Aizu Fukushima, Japan {m5132202, m5132203, vazhenin, bhalla}@u-aizu.ac.jp

Abstract—Paper deals with the design issues of an e-Learning generations. In the first generation, learning platforms were Computational System based on a Task Management Model. One developed as generic solutions for specific domains but with of the main components of the proposed e-Learning great challenges to support architectural flexibility. Several Computational Cloud is the Controller acting as an Enterprise standards emerged during this period to provision Service Bus (ESB) for absolute Model abstraction from outside interoperability between different systems at content level. The references. Simultaneously, View is completely decoupled from current or second generation embraces a design paradigm Model and ultimate privacy and security is achieved for the based on modularity and Service Oriented Architecture (SOA). business data objects. This ESB bolstered with the Dependency The design focus is extended from content sharing to the Injection Pattern has reinforced protocol and message exchange of learning objects, workflow sequences, learner’s transformation, service , global service contract, information, as well as recognizing the need of semantic service implementation autonomy, service reusability, service modularity, statelessness and dynamic discoverability of the exchange and platform independence. To support sharing of services. The ESB uses service virtualization that archives the content metadata, important standards were established, such as services together as a single deployable unit which is managed by the Sharable Content Object Reference Model (SCORM). A the Orchestration Engine as a central console. This allows the framework supporting interoperability by adoption of the user to customize e-Learning Platforms by sourcing a diverse SCORM standard is presented in [1]. Next generation of range of e-Learning services. Learning Management Systems (LMS) is envisioning scenarios that allow the exchange of tools, functionalities, semantics, and Keywords-; Distributed Systems; Serivce learning workflow. Users will be able to customize e-Learning Oriented Architecture; Enterprise Service Bus; Dependency platforms by sourcing a diverse range of e-Learning services Injection; e-Learning, Web Services. [4]. The creation of this new platform is the main purpose of the current research. I. INTRODUCTION The heterogeneity between the e-Learning applications and Technology has seen an enormous and whopping progress the e-Learning services are widening with respect to the during the last years. According with a CISCO study [2], the developing technologies and platforms. Therefore, in order to growing forecast of global IP traffic will quintuple from 2008 reduce this heterogeneity, there is an utter need for a to 2013, with a compound annual growth rate of 40%. The middleware to integrate the heterogeneous and disparate e- study also highlights that Mobile data traffic will double every Learning applications and services. The system flexibility and year reaching a growth of 131% by 2013. The main drivers of interoperability mentioned above may be achieved as a variety this rise are: “(a) the growing penetration of high-speed of Web services (WS). To realize this, an existing LMS broadband, (b) the expansion of digital screen surface area and application can be wrapped by an interface to be integrated resolution, (c) the proliferation of network-enabled devices, with emerging services allowing the system to evolve in and (d) the increase in the power and speed of computing complexity and functionality according to the user needs. In devices”. These factors are influencing the role of web [13], a framework providing customized capabilities is applications and provisioning the infrastructure to move to the proposed in order to design a LMS by assembling learning next paradigm of computational architecture. Cloud Computing services as constructive blocks. is envisioned as the means of on-demand self service, broad Our research is devoted to design an e-Learning network access, resource pooling, rapid elasticity, measured Computational System based on a Task Management Model services, etc. [16]. Enticing features of the Cloud Computing motivated us to It is possible to consider now that educational technologies design the e-Learning Computational architecture in is evolving drastically taking advantage of the resources the compliance with Cloud Computing. It is normalized based on Internet is offering to go beyond of traditional forms of the Model-View-Controller (MVC) design patterns [6] for learning. In [4], Dagger and O’Connor have proposed to decoupling presentation layer from actual business processing classify the evolution of e-Learning systems into two [14,15].

978-1-4244-6890-4/10/$26.00 ©2010 IEEE 1015 TENCON 2010

Figure 1. Message transformation and decoupling between View and Model

SOA powered by WS is the prevalent implementation Model liaise with Controller layer rather than communicating technology for Cloud Computing. In this paper, we are with each other directly. Fig. 1 shows part of the message introducing the Enterprise Service Bus (ESB) as a transformation engine and it explains how the View is communication middleware [3,9] modeled on top of decoupled from Model while requesting service from it. Dependency Injection (DI) pattern [11]. Since Model is a business processing layer, it is partitioned Usually, the ESB is a flexible connectivity infrastructure into the Service Model as the Business Object Pool and the [12] for integrating services that exploits WS, messaging Data Model for defining a service schema. The Service Model middleware, intelligent routing, transformation and uses the Data Model as a local database to process a given orchestration. It is composed from several applications or request. At the Controller end, the Extensible Stylesheet modules. Each application is focused in one specific capability Language Transformations (XSLT) is defined for mapping a like monitoring, security and service orchestration. Based on service request with the Service Interface deployed in the the ESB concept, the goal of the presented paper is to design an Service Model. The Controller XSLT contains part of the approach in order to reduce the size and complexity of service metadata description [17] including service contracts, interfaces, provide a service hosting and infrastructure service endpoint, interface, endpoint data and endpoint management that is highly distributed but centrally function. Endpoint service data is mapped with the manageable. It also provides reliable message routing with corresponding View literals by XSLT rule. The mapped data is service virtualization [3,10]. The DI pattern [5,11] induces an in string format and needs to be inflated into the Data Transfer interoperability benefit in service invocation in which high Object (DTO) of the Service Model. Hence, Controller level modules and low-level modules are independent on each deserializes or unmarshals series of bytes into DTOs. After the other but both should depend on abstractions. completion of service request execution, Model marshals the service object to render a response message in Extensible The rest of this paper is organized as follows. Section II Markup Language (XML) which is delivered to View via describes an approach for message transformation and Controller. In this way, either changes from Model or View decoupling between View and Model. The main elements of requires modification at only one place which is the Controller. the e-Learning Computational Cloud architecture are presented The Controller acts as a gate that directs the incoming in Section III. The Enterprise Service Bus and Dependency information and switches between Model and View. Injection is described in Section IV. Conclusion is discussed in Section V. The privacy of the Model is only exposed to the Service Controller and remains protected from remote reference or II. MESSAGE TRANSFORMATION AND access. Furthermore, the Controller completely decouples the DECOUPLING BETWEEN VIEW AND MODEL View from Model and acts as a communication channel or backbone. General association between View and Model [6] is The essence of the MVC design patterns is to demarcate the inverted by injecting Controller dependency as an abstraction presentation (View) and the business logic (Model) through an layer between View and Model. Thereby, we have contrived interface integration layer (Controller). However, in the the Controller in the form of an ESB that provides the traditional MVC design patterns [6], there is a provision for an infrastructure to build a SOA application. association between View and Model. Repercussion of such association does not ascribe the privacy of Data Model as well as the complete decoupling between View and Model. III. E-LEARNING COMPUTATIONAL CLOUD Therefore, in order to achieve an ultimate decoupling and ARCHITECTURE privacy of Data Model, we are imitating an Inversion of By following MVC design patterns, we have inferred that Control in the Controller by applying the DI pattern [11] which Controller is an ESB container. In our current research of e- ensures an abstraction wrapper over Model. Both View and Learning systems, we are developing an e-Learning

1016 Computational Cloud (eLC2) [14,15] using Sun Java 2 Platform Enterprise Edition (J2EE) framework. Since, a substance of ESB is SOA implementation and agile integration, the proposed ESB is a backbone for the Cloud architecture powered by SOA. The eLC2 as shown in Fig. 2, has both Business To Client (B2C) and Business To Business (B2B) modes of communication. The eLC2 contains both Controller and Model built over a Virtual Machine Cluster (VM Cluster). As the View is decoupled from Model, the eLC2 has outsourced the View part and renders only XML response to the View over Internet protocols such as Simple Object Access Protocol (SOAP) [14,15]. The outer Computational Cloud is explored for B2C and the inner Controller Cloud is explored for B2B transactions. Both the Clouds are exposed by using proxy endpoint Enterprise Java Beans (EJB) as a WS interface. In Fig. 2, Service Pool, Formula engine, Grading engine, Human language engine, and Alert engine are part of Service and Data Models, while the other components are part of Controller. Figure 2. e-Learning Computational Cloud (eLC2) Architecture Both Computational and Controller Cloud use common Controller Service Bus (CSB) for communication backbone. The CSB is a single point of contact between Controller Cloud uses internal proprietary Plug-in Service Bus Computational Cloud and the outside world. We are expanding (PSB) for seamless scaling and integration of reusable the CSB to form ESB in order to further enhance CSB for applications as a service to the Service Model. CSB is a protocol transformation, both synchronous and asynchronous common platform for communication with Controller mode of communication, complex event processing, message components e.g. Session Controller for correlation (or session) routing and transformation and service virtualization. All id generation, allocation and verification. This correlation id is components communicating with CSB are embedded into ESB locally stored in the Data Model along with a corresponding along with other ESB components. The ESB is required for service object to preserve the state of subsequent transactions robust communication, intelligent routing, sophisticated over a given connection. This object serialization is used to translation and transformation of services. The Composability hold the service request message into Data Model till the [17,18] of services in ESB deals with the inter-relationship of corresponding correlation or session id is alive. Thereby, components. The ESB works on the DI pattern for Inversion of overhead on service request/response traffic and messaging control. Components can be replaced and deployed across channel is minimized. Hence, stateless Message independently. Exchange Patterns and stateless protocols can be used for better performance. The View Model Service Request Binder [14,15] (VMSRB) is used for message transformation between View IV. ENTERPRISE SERVICE BUS AND DEPENDENCY and Model as shown in Fig. 1. Object Serializer/Deserializer INJECTION does the data format transformation by marshalling and Dependency Injection (DI) Pattern was initiated by Martin unmarshalling Service Model's DTO. The VMSRB accesses Fowler in 1996 and further extended in 2004. Fowler dates the the Controller Cloud services by invoking Controller Cloud idea back to Johnson and Foote's proposal on Inversion of endpoint EJB over Java Remote Method Invocation (RMI) Control [5,8,11]. The crux of the DI pattern is that high-level using Internet Inter-ORB Protocol (IIOP). modules should not depend upon low-level modules and both The Service Verification and Authentication & should depend upon abstractions. DI is a useful alternative to Authorization Engines perform the role of security and guard service locator. Even in the traditional object oriented the Model. The Service Event Controller and Business paradigm, if there is a sequence of flow across many different Delegate are parts of Orchestration Engine and follow the class objects, every object should have the knowledge of the mediation pattern [6,12]. Orchestration Engine is the central next object in the sequence. Such collaboration leads to the component in the eLC2. By using Orchestration Engine, the tight coupling between objects and sequence amendment workflow logic [17,18] is abstracted and easily maintained than requires retrofitting across all objects. when is embedded within individual solution components. The Therefore, we introduce DI on top of service Mediation and workflow logic encapsulated by an orchestration can be Observer patterns [6]. The key benefit of a DI is that it removes modified or extended in a central location. Orchestration the dependency from concrete implementation. By introducing establishes a means of centralizing and controlling a great deal DI with [8,11], the managed object gets of inter and intra-application logic through a standardized decoupled from any hard-coded dependencies on its Service Model. The Transaction Controller manages collaborators including expensive initialization logic and transactions across distributed systems including Database, thereby objects can be easily tested in isolation. As the Message Queues, external Clouds etc. for two-phase atomic managed object is decoupled from the overhead of commitment and concurrency control. collaborator's lookup, object does not have to bother about

1017 reference of the collaborator. We are using Java implementation for wiring of dependency externalization. As discussed in section III, the CSB is expanded to device the ESB. DI pattern is induced in ESB to form a connectivity channel for processing engines that choreograph the flow of activities between loosely coupled services [10]. The various processing engines e.g. service mediation, repository and registry, event controller, service orchestration, protocol transformation and message transformation engine are responsible for ensuring that the appropriate service capabilities are scheduled and coordinated in the correct order. DI enables the ESB to grow or shrink as required by the network and workload which it is supporting. The proposed ESB holds DI in the form of Orchestration Engine as discussed in section III. The Orchestration engine mainly uses mediation, proxy and to form an abstraction layer between service requester and service responder. Service Virtualization is the main function of the Orchestration Engine. The Fig. 3 shows ESB building blocks in terms of their Figure 3. Enterprise Service Bus (ESB) Architecture respective functionalities. The ESB acts as a container [10] for instantiating objects as well as keeping the references of those Service virtualization [7] is a service plumbing that enables objects in the service pool and for injecting dependencies. The the developers to focus on building new functionality without clients declare the description of its dependency on services. worrying about how the functionality will be exposed, The ESB compliant external code is interfaced at client end. consumed or managed. The low level service constraints like This offers the dynamic service references to the clients versioning, protocol mapping, monitoring, routing and run-time whenever it is required. The ESB responses to the message policy enforcement are abstracted. Virtual services are events and required services are identified from the Repository represented by models on top of the main service metadata in and Registry [10]. service Repository and Registry. These models are translated by Service Mediation Engine into service behaviors that are In Controller layer, there are certain operations to be interpreted by the ESB Orchestration Engine to execute the performed before the request is handed over to the Service service without any need to change service code. Hence, Model (that is a pool of objects which implements actual Orchestration Engine normalizes messages by using Service business processing logic) for task specific processing. This Mediation [12] as well as Repository and Registry [12]. Service operations to be performed in the sequential manner like object Virtualization provides transparent service lookup. It decouples marshalling/unmarshalling, service verification, transaction service invocation from implementation irrespective of context management etc. Therefore, every respective programming language and without the performance component is dependent on other component in a sequence. implications of a proxy based approach [7]. This leverages the Such kind of one to one dependency needs a rework in dynamic service provisioning. development and debugging whenever a new component is introduced in a sequence. Therefore, the proposed service bus As shown in Fig. 3, the ESB offers B2B and B2C modes of will inverse the one to one invocation control into the many to communication to Business Process Management (BPM) layer one where all components from Controller only knows the which is a View in MVC design patterns. The first step of ESB service bus and service bus knows all registered components. communication is the transformation of Protocol and Message. The Protocol Transformation engine [10] provides transport As shown in Fig. 3, ESB has an Internal Message Bus bindings for invoking services over HyperText Transfer which is a proprietary standard for event driven message Protocol (HTTP), SOAP, File Transfer Protocol (FTP), Java passing across distributed systems. All ESB components use Message Service (JMS) etc. The Message Transformation this channel for information interchanges over clustered engine [10] acts as an interpreter to map the request parameters network. The Plug-in Service Bus from Controller Cloud, as with corresponding DTOs of Service Model. As discussed in discussed in section III, is incident to the Internal Message Bus section II, we have adopted XSLT based message of ESB. The Internal Message Bus has inbuilt Message Queue transformation which decouples View from Model. ESB uses data structure to hold messages if anything fails to achieve XML standard for exchanging messages. reliability [10]. Such Message Oriented Middleware (MOM) is defined at the core of the ESB to ensure the message delivery. Instead of Namespace based service lookup, we use Because of MOM, Asynchronous mode of communication is message routing to invoke services dynamically. It is also used since only synchronous systems heavily oppose the provisioned with the message and events chaining in the form high degree of scalability. of abstract message flow that result into the workflow. There are two types of message routing, namely, Content based routing and Itinerary based routing [10]. ESB uses Itinerary based message routing which is based on pre-defined sequence of activities.

1018

Figure 4. Enterprise Service Bus (ESB) Collaboration of Services in MVC Design Patterns

The message based on Itinerary is routed to desired service containing the collection of independently standardized and by Orchestration Engine. By using Event Controller and governed services. The real time service implementation is Service Mediation engines, service Orchestration Engine binds executed within the perimeter of the Model. The registry of WSDL interfaces of services. The Service Model maintains the such services is maintained within Service Inventory forming pool of endpoint service objects which are invoked by the ESB service composition [3,18]. The service Registry is the main container. After the interface binding the Transaction building block of Service Virtualization. Controller generates transaction context for the coordination The Auditing and Logging engines as well as Monitor between ESB container and participating (endpoint) services as well as its partner services. Hence, as shown in Fig. 3, engine perform reporting for tracking the data and ensuring the Transaction Controller, Service Mediation, Repository/Registry availability of the service by monitoring the health of the ESB and Service Model are main components of Service container. The audit trail logs are important means for Virtualization approach. debugging and failure detection of system. In case of failure condition, ESB container also uses log reports as a checkpoint The ESB decouples Model from direct remote invocations to perform compensation and rollback transactions. Monitor and therefore, ESB applies potential security to the underlying raises an event to notify an action event to the ESB container. Model. The Verification and Authentication/Authorization Monitor also measures the heart beat of the network for engines of Controller Cloud are encapsulated as Security availability of the services across channel. engine in the ESB. The ESB also provides integrity of data and encryption of messages. In this way, ESB secures the Data The Service Model uses Data Model to define Model and business Service Model from remote access and configuration pattern of service processing. Hence, any provides configurable interoperability with secured brokering modifications in the service behavior require changes only at capabilities. The Security engine functionalities are further service configuration which is stored in the Data Model. The categorized into three types as following [10]: configuration pattern of service processing includes service definition, transaction definition, service session (or Transport-level security ensures the confidentiality and correlation) definition, service verification and integrity of messages exchanged at transit by configuring authorization/authentication definition. Secure Sockets Layer (SSL) The Fig. 4 shows the collaboration of various services Message-level security removes the overhead on transport associated with the ESB. The DI pattern is induced in the layer by defining policies to secure the message payload Service Orchestration Engine which is also acting as an Internal Message Bus. The View Cloud and External Systems Custom-level security enables inception of ad-hoc security can consume the Services using B2C and B2B interfaces. This metrics depending on service consumer and providers invocation is made through Web services interface with XML priorities. message over SOAP. According to the request message, the The service Repository and Registry manages [17] ESB implements the Itinerary based Message Routing and metadata that includes service contracts, XML Schema thereby invokes the appropriate service components including Definition (XSD), interface descriptions, endpoint address and Protocol and Message Transformation, Ad-hoc Service Stack policies according to the Service Level Agreements (SLA) etc. etc. The service repository forms a so called Service Inventory

1019 The Ad-hoc Service Stack is the pool of auxiliary services REFERENCES which are non-mandatory. However, these services can be used to further enrich and filter the service request for customized [1] C.P. Chu, C.P. Chang, C.W. Yeh, and Y.F. Yeh, "A Web-Service requirement. Service Virtualization mediates the service Oriented Framework for building SCORM Compatible Learning request in order to invoke and execute the desired service in the Management Systems," International Conference on Information Model. In this way, the integration logic is separated out from Technology: Coding and Computing (ITCC'04), vol. 1, pp.156–161, the business logic of the e-Learning services that are deployed 2004. at the Model end. Therefore, a wide variety of e-Learning [2] Cisco, “Hyperconnectivity and the Approaching Zettabyte Era”, White applications or clients can access the e-Learning services paper, June 2009. URL: http://www.cisco.com/en/US/solutions/collateral/ns341/ns525/ns537/ns7 through the ESB design patterns irrespective of the platform or 05/ns827/VNI_Hyperconnectivity_WP.html framework heterogeneity. [3] D. Chappell, "Theory In Practice Enterprise Service Bus", California, US, O'Reilly Media Inc., June 2004 pp 2–98. V. CONCLUSIONS [4] D. Dagger, A. O’Connor, S. Lawless, E. Walsh, and V.P. Wade, “Service-Oriented E-Learning Platforms from Monolithic to Flexible The ESB bolstered with DI pattern has reinforced service Services”, IEEE Internet Computing, vol. 11, no. 3, pp. 28–35, loose coupling, global service contract, service implementation May/June 2007. autonomy, service reusability, service modularity, statelessness [5] D. Nene, “A beginners guide to Dependency Injection”, July 2005, and dynamic discoverability of the services. Since the ESB URL: http://www.theserverside.com/news/1321158/A-beginners-guide- separates the business logic from the integration logic and to-Dependency-Injection. process routing logic, applications and services are decoupled [6] E. Gamma, R. Helm, R. Johnson, and John Vlissides, “Desing Patterns from each other and can connect together through the bus as Elements of Reusable Object Oriented Software”, Addison-Wesley, New York, 1994, pp. 4–9, 273–303. the event driven services. [7] F. Cohen, and B. Bartel, “Service Governance and Virtualization For Service details like metadata managed by a service registry SOA”, PushToTest, November 2006, URL: allows integration specialists and administrators to create and http://www.tibco.com/multimedia/wp-pushtotest_tcm8-709.pdf manage service-oriented solutions. The service virtualization [8] H.Y. Yang, E.Tempero, H. Melton, “An Empirical study into use of Dependency Injection in Java”, 19th Australian Conference on Software has abstracted peer services for transparent service lookup. The Engineering, ASWEC 2008. , pp.239–247, 26–28 March 2008. event driven service invocation enabled the asynchronous [9] J. Yin, H. Chen, S. Deng, Z. Wu, and C. Pu “A dependable ESB communication that can further extend high degree of service Framework for Service Integration”, IEEE Internet Computing, vol. 12, reliability and availability. Hence, the ESB can be no. 2, pp. 26–34, 2009. contemplated as a standardized way of service integration in [10] K. Doshi, “Enterprise Service Bus”, white paper, Mphasis, February highly distributed systems. Security is embedded into ESB that 2009, URL: http://www.mphasis.com/pdfs/EnterpriseServiceBus.pdf wraps the sensitive Data Model and thereby, provides better [11] M. Fowler, “Inversion of Control Containers and the Dependency solution for data privacy which is a crucial hindrance for an Injection pattern”, January 2004, URL: adaptation of Cloud Computing driven applications. “http://martinfowler.com/articles/injection.html” [12] M.T. Schmidt, B. Hutchison, P. Lambros, and R. Phippen, "The Simultaneously, the Custom-level security option enables Enterprise Service Bus: Making Service-Oriented Architecture real," the service client to define the required security levels as per IBM Systems Journal, vol.44, no.4, pp.781–797, 2005. client's priorities and service provider implements those URL:http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=538670 6&isnumber=5386693. security levels by negotiating certain performance throughput. [13] M.T. Su, C.S. Wong, C.F. Soo, C.T. Ooi, and S.L. Sow, “Service Therefore, the risk associated with security is now jointly borne Oriented E-Learning System”, Information Technologies and by both service provider and service consumer. Such security Applications in Education, ISITAE '07, pp. 6–11. Nov 2007. customization induces a high esteem into the adoption of Cloud [14] R. Cortez, S. Rajam, A. Vazhenin, S. Bhalla, “E-Learning Distributed driven economy. Cloud Build on MVC Design Patterns for Service Task Management”, Euro-American Conference on Telematics and Information Systems, Data exchange across Web services happens over the open Panama EATIS, in press, 2010. standards. Therefore, ESB can be connected to any BPM [15] S. Rajam, R. Cortez, A. Vazhenin, S. Bhalla, "E-Learning including e-Learning, e-Business, e-Governance and it protects Computational Cloud (eLC2): Web Services Platform to Enhance Task communication flow. The ESB also seamlessly integrates Collaboration", 2010 IEEE/WIC/ACM International Conference on Web disparate services and ensures reliability, reuse and availability Intelligence and Intelligent Agent Technology, Toronto, Canada, pp 350–355, 2010. of those services. In a nutshell, the agility that SOA promises [16] T. Oka, D. Vazhenin, and A. Vazhenin, “WEB-based Task Management can be fulfilled by using ESB. Tools in e-Learning Environment”, In Proceedings of the International Conference on Computational Technologies in Electrical and Electronics ACKNOWLEDGMENT Engineering Sibircon, IEEE Region 8, Novosibirsk, Russia, pp. 100– 105, July 2008. This work is supported by the Japanese Society for the [17] T. Erl, “Service-Oriented Architecture Concepts, Technology, and Promotion of Science, Grant-in-Aid for Scientific Research: Design”, Indiana, US, Prentice Hall, December 2006 pp 31–180. 21500948, 2009-2011. [18] T. Erl, "SOA Design Patterns", Indiana, US, Prentice Hall, June 2009 pp 112–189, 531–715.

1020