Providing Load Balancing and Fault Tolerance in the OSGi Service Platform



Similar documents
High Availability and Clustering

In Memory Accelerator for MongoDB

LOAD BALANCING TECHNIQUES FOR RELEASE 11i AND RELEASE 12 E-BUSINESS ENVIRONMENTS

Chapter 1 - Web Server Management and Cluster Topology

High Availability: Evaluating Open Source Enterprise Service Buses

Chapter 10: Scalability

Oracle WebLogic Server 11g Administration

Exploring Oracle E-Business Suite Load Balancing Options. Venkat Perumal IT Convergence

High Availability with Elixir

WEBAPP PATTERN FOR APACHE TOMCAT - USER GUIDE

Chapter 2 TOPOLOGY SELECTION. SYS-ED/ Computer Education Techniques, Inc.

CHAPTER 1 - JAVA EE OVERVIEW FOR ADMINISTRATORS

SCALABILITY AND AVAILABILITY

Creating new university management software by methodologies of Service Oriented Architecture (SOA)

Glassfish Architecture.

LinuxWorld Conference & Expo Server Farms and XML Web Services

Building a Highly Available and Scalable Web Farm

Operations and Monitoring with Spring

Oracle SOA Infrastructure Deployment Models/Patterns

HUAWEI OceanStor Load Balancing Technical White Paper. Issue 01. Date HUAWEI TECHNOLOGIES CO., LTD.

Ecomm Enterprise High Availability Solution. Ecomm Enterprise High Availability Solution (EEHAS) Page 1 of 7

IBM Proof of Technology Discovering business application services, featuring IBM WebSphere Application Server Network Deployment V8

The IBM Cognos Platform for Enterprise Business Intelligence

International Journal of Engineering Research & Management Technology

ABSTRACT. KEYWORDS: Cloud Computing, Load Balancing, Scheduling Algorithms, FCFS, Group-Based Scheduling Algorithm

A REVIEW PAPER ON THE HADOOP DISTRIBUTED FILE SYSTEM

S y s t e m A r c h i t e c t u r e

White Paper. Cloud Native Advantage: Multi-Tenant, Shared Container PaaS. Version 1.1 (June 19, 2012)

Clustering with Tomcat. Introduction. O'Reilly Network: Clustering with Tomcat. by Shyam Kumar Doddavula 07/17/2002

Code:1Z Titre: Oracle WebLogic. Version: Demo. Server 12c Essentials.

Purpose-Built Load Balancing The Advantages of Coyote Point Equalizer over Software-based Solutions

Reference Model for Cloud Applications CONSIDERATIONS FOR SW VENDORS BUILDING A SAAS SOLUTION

Standardization in Cloud Computing

EWeb: Highly Scalable Client Transparent Fault Tolerant System for Cloud based Web Applications

FUSE-ESB4 An open-source OSGi based platform for EAI and SOA

OSGi Technology for System and Network Architects DECEMBER 2013

DevOps with Containers. for Microservices

Oracle Collaboration Suite

Feature Comparison. Windows Server 2008 R2 Hyper-V and Windows Server 2012 Hyper-V

The Service Availability Forum Specification for High Availability Middleware

IMPROVEMENT OF RESPONSE TIME OF LOAD BALANCING ALGORITHM IN CLOUD ENVIROMENT

USING VIRTUAL MACHINE REPLICATION FOR DYNAMIC CONFIGURATION OF MULTI-TIER INTERNET SERVICES

Building a Modular Server Platform with OSGi. Dileepa Jayakody Software Engineer SSWSO2 Inc.

Cloud Based Application Architectures using Smart Computing

Basic TCP/IP networking knowledge of client/server concepts Basic Linux commands and desktop navigation (if don't know we will cover it )

Eclipse Summit Europe 2008

Swordfish SOA Runtime Framework

High Availability Essentials

BUILDING HIGH-AVAILABILITY SERVICES IN JAVA

Developing modular Java applications

Cognos8 Deployment Best Practices for Performance/Scalability. Barnaby Cole Practice Lead, Technical Services

How To Build A Clustered Storage Area Network (Csan) From Power All Networks

Learn Oracle WebLogic Server 12c Administration For Middleware Administrators

Load Balancing using Pramati Web Load Balancer

Effective Virtual Machine Scheduling in Cloud Computing

HRG Assessment: Stratus everrun Enterprise

Evolution from the Traditional Data Center to Exalogic: An Operational Perspective

Oracle Exam 1z0-599 Oracle WebLogic Server 12c Essentials Version: 6.4 [ Total Questions: 91 ]

Converting Java EE Applications into OSGi Applications

Spectrum Technology Platform Version Tutorial: Load Balancing Spectrum Spatial Services. Contents:

CS 188/219. Scalable Internet Services Andrew Mutz October 8, 2015

BASICS OF SCALING: LOAD BALANCERS

IaaS Cloud Architectures: Virtualized Data Centers to Federated Cloud Infrastructures

VMware Infrastructure and IBM WebSphere Software

Web Application Hosting Cloud Architecture

Real Time Network Server Monitoring using Smartphone with Dynamic Load Balancing

Equinox Framework: A Happier OSGi R6 Implementation

High Performance Cluster Support for NLB on Window

HA for Enterprise Clouds: Oracle Solaris Cluster & OpenStack

Memory-to-memory session replication

Network Attached Storage. Jinfeng Yang Oct/19/2015

An Approach to Load Balancing In Cloud Computing

SAN Conceptual and Design Basics

ELIXIR LOAD BALANCER 2

Using Tomcat with CA Clarity PPM

PES. High Availability Load Balancing in the Agile Infrastructure. Platform & Engineering Services. HEPiX Bologna, April 2013

Web DNS Peer-to-peer systems (file sharing, CDNs, cycle sharing)

JOB ORIENTED VMWARE TRAINING INSTITUTE IN CHENNAI

Virtual Machine in Data Center Switches Huawei Virtual System

Auto-Scaling, Load Balancing and Monitoring As service in public cloud

Understanding Storage Virtualization of Infortrend ESVA

Performance Analysis of Web based Applications on Single and Multi Core Servers

A Brief Analysis on Architecture and Reliability of Cloud Based Data Storage

High Availability for Citrix XenApp

OpenFlow Based Load Balancing

Open Source Cloud Software Made in Switzerland. Michael Eichenberger CEO stepping stone GmbH Open Cloud Day 19th of June 2012

Planning the Migration of Enterprise Applications to the Cloud

Cloud Computing Disaster Recovery (DR)

This paper defines as "Classical"

Architecting ColdFusion For Scalability And High Availability. Ryan Stewart Platform Evangelist

PaaS Cloud Migration Migration Process, Architecture Problems and Solutions. Claus Pahl and Huanhuan Xiong

IRF2000 IWL3000 SRC1000 Application Note - Develop your own Apps with OSGi - getting started

Virtual Infrastructure Security

No.1 IT Online training institute from Hyderabad URL: sriramtechnologies.com

HDFS Federation. Sanjay Radia Founder and Hortonworks. Page 1

Cluster Computing. ! Fault tolerance. ! Stateless. ! Throughput. ! Stateful. ! Response time. Architectures. Stateless vs. Stateful.

NetIQ Access Manager 4.1

Disaster Recovery Design Ehab Ashary University of Colorado at Colorado Springs

Active-Active and High Availability

Transcription:

Providing Load Balancing and Fault Tolerance in the OSGi Service Platform ARNE KOSCHEL, THOLE SCHNEIDER, JOHANNES WESTHUIS, JÜRGEN WESTERKAMP Faculty IV, Department of Computer Science University of Applied Sciences and Arts Hannover Ricklinger Stadtweg 120, 30459 Hannover GERMANY arne.koschel@fh-hannover.de IRINA ASTROVA InVision Software OÜ Lõõtsa 2A, 11415 Tallinn ESTONIA irinaastrova@yahoo.com ROMAN ROELOFSEN WeigleWilczek GmbH 73728 Esslingen GERMANY roelofsen@weiglewilzek.com Abstract: - This paper examines several design options how to provide load balancing and fault tolerance in OSGi. The aim of this provision is to make OSGi applications more scalable and highly available. Key-Words: - OSGi, load balancing, fault tolerance, scalability, high availability 1 Introduction The OSGi Service Platform [2] (or just OSGi for short) has made its way to numerous applications and systems, ranging from embedded systems like invehicle software systems up to enterprise systems like popular Java EE application servers. However, Quality of Service (QoS) is an area where OSGi still requires some extensions and where this paper comes into play. In particular, we will focus on one aspect of QoS high availability by means of load balancing and fault tolerance. Consequently, in this paper we will explain some fundamentals of OSGi, load balancing and fault tolerance. We will also explain some common approaches to load balancing and fault tolerance, and how they can be implemented in OSGi. 2 OSGi OSGi is a Java platform that has arisen in the context of embedded systems. The platform is freely available and constantly developed by the OSGi Alliance. There are several commercial and non-commercial implementations of OSGi, including Eclipse Equinox [3], Apache Felix [4], Knopflerfish [5], and ProSyst s mbedded server [11]. Well-known applications that are based on the platform include the Eclipse IDE and Apache Service Mix [12]. The core of OSGi is the OSGi Framework. This framework simplifies the development and deployment of extensible applications called bundles, by decoupling the bundle s specification from its implementation. This means that a bundle is accessed by the framework through an interface, which is by definition separate from the bundle s implementation. This separation enables changing the bundle s implementation without changing the environment itself and other bundles. The OSGi Framework makes it possible to run multiple applications simultaneously within a single Java Virtual Machine (JVM), by dividing applications into bundles that can be loaded at runtime and also removed. For communication within the JVM, the framework provides a service registry to register services, so that services can be found and used by other bundles. Although OSGi was originally designed for embedded systems, it is finding more and more usage in enterprise systems. Recently, OSGi has been extended with support of remote services. This extension is aggregated under the name D-OSGi (Distributed OSGi) [13]. D-OSGi is important for ISBN: 978-1-61804-046-6 426

load balancing because it enables to distribute an application across more than one OSGi instance. Fig. 1. Horizontal scalability. Fig. 2. Vertical scalability. 3 Load Balancing Load balancing is the ability of a system to distribute requests across multiple resources. Load balancing has the effect of providing a virtual resource pool, which unifies all resources. A request is sent to the virtual resource pool and then forwarded to a real resource. Resources can be, for example, servers or processes running on a server. Load balancing can be performed by hardware or software components [9, 10]. Load balancing can be used to eliminate bottlenecks in a system. If, for example, one resource is temporally not available, a request can be processed by other resources from the virtual resource pool. With load balancing, it is also possible to provide scalability. When requests are transmitted to an overloaded server, other servers can be added to the virtual resource pool. Without load balancing, an overloaded server, which cannot handle the request, has to be replaced by a more powerful server. This type of scaling by distributing the request to multiple servers is called horizontal scalability (see Fig. 1). Alternatively, scalability can be provided by distributing the requests across multiple processes running on a single application server. In this case, the resources are the processes and not the servers. This type of scaling over multiple processes is called vertical scalability (see Fig. 2). Load balancing algorithms are used for mapping requests to resources. These algorithms get access to information about the resources in the virtual resource pool and the incoming requests. With this information, a load balancing algorithm selects a resource, which can handle the request. In practice, different load balancing algorithms are used for different tasks. All algorithms have the common goal of the effective resource utilization. Other goals of load balancing algorithms include a minimal response time and a maximal throughput. Some examples of load balancing algorithms are: Round robin algorithm: This algorithm was originally designed as a scheduling algorithm. It forwards incoming requests in a circular order to all available resources. The algorithm is easy to implement because it does not assign any priority to the resources. Weight-based algorithm: This algorithm can be used when one or more resources in the virtual resource pool handle requests differently than other resources, for example, faster ones. A weight is a priority, which is assigned to all resources. Resources with higher priorities are preferred at the requestto-resource mapping. Dynamic algorithm: The weight-based algorithm uses constant priorities for the resources. But it is also possible to set the priorities for the resources dynamically. Such an algorithm is called a dynamic algorithm. For example, a measurement of the priority could be the actual load of the resources. Sticky algorithm: This algorithm is viable for stateful applications only. In this mode of operation of an application, a request is sent to the same resource every time. The decision which of the resources handles the request will be made on the basis of a session ID. In OSGi vertical scalability can be achieved with replicated bundles, which provide the same functionality. These bundles will vary in the symbolic bundle names only. A load balancing component implemented as an OSGi service can be used to distribute the request to the replicated bundles. Such a central load balancing component can also be used ISBN: 978-1-61804-046-6 427

for other tasks, for example, monitoring of services or bundles to provide fault tolerance. A common way for achieving horizontal scalability is to add an external load balancing component, which distributes the requests across the servers. This component can be implemented, for example, with DNS load balancing or web controllers. Alternatively, an OSGi instance can be created to spread the client s load over the replicated servers. This instance has to use D-OSGi methods in order to distribute the requests to services or bundles on the replicated servers. 4 Fault Tolerance Fault tolerance is another important aspect of high availability. Load balancing only assures that a system can be used even though a part of the system is not available. But the question is what happens to the information, which is handled by a failed part? For example, how should the system react when a user request fails? Is that information lost or can it be restored? Is the system able to discover the failure or is the user just waiting for a response? 4.1 Replication It is important to avoid single points of failure. A single point of failure represents a bottleneck in the system. If one of components in a system fails, the whole system will go down. Therefore, every critical part of the system should be fault tolerant. Otherwise, the single point of failure is just shifted to another component of the system. To provide fault tolerance in a system, the first step to do is to make critical parts of the system redundant. Replication is one of the main techniques to achieve this goal. In addition to holding one or more copies of a state, there is often a requirement to share data between different replicas to keep the identical state. If a replica receives an update, all other replicas will have to be informed about that update. Techniques to keep the states of all the replicas identical are called replication techniques. One such a technique is to use shared memory. This memory can be implemented by saving the state persistently in a file system or a database management system. For replicas on multiple servers, the state has to be available globally. This could be a database management system or a special software product like Terracotta [6]. Another replication technique is based on the primary. One primary replica is selected to accept write requests from clients and to publish state updates to the other backup replicas. When a backup replica failed, this replica will be discarded by the primary. When the primary failed, the request is taking over by another backup replica. In OSGi we recommend to use shared memory. The service registry makes it simple to integrate a bundle, which offers services for storing and loading data. This bundle can preserve the information in memory, a file system or a database management system. Instead of using services, the communication can also be done by events. 4.2 Management Tool The next step to do is to discover failures. This could be done by management tools. A management tool can be an extra server or just a program on the server, where an application is running on. This tool can react when an exception comes up. It can also monitor resources on its own. For example, monitoring could be done by the management tool, which pings the application server in a specified period of time. This way the management tool can discover a failure even though the application never admits an exception. This would be the case when the application was crashed without the ability to admit an exception. Another approach to monitoring is passive checking. In this approach, all application servers send pings in periodic intervals. The management tool is listening to all incoming pings. An application server, which does not send a ping, is considered to be failed. Yet another approach to monitoring is based on a proxy. This proxy forwards all requests from the clients to the application servers. In this approach, the proxy has the opportunity to monitor the status of the requests and the replicas. Once a failure has been discovered, the management tool can start a specified action to handle this failure. When an application or its server is crashed, it should be isolated. Otherwise, this failure can spread to other components in the system. Next, the failed component can be restarted and, if necessary, recovered. This could be done by the management tool itself. But often after a crash, there is information or unacknowledged request, which has to be handled as well. The complexity of handling a failure depends on the mode in which the application is operating: Stateless: In this mode of operation, the application does not store any information on a request. All requests are independent from each other. Stateful: In this mode of operation, the application stores information on different requests in a session. Handling a failure in a stateless application is easy because there are no dependencies between different requests. There is no loss of information and an ISBN: 978-1-61804-046-6 428

unacknowledged request can easily be repeated or redirected to another server by the load balancing component or the client itself. This implies that the unacknowledged request is stored until it is acknowledged. The handling of a failure, however, becomes much more complex in case of a stateful application, where information on earlier requests has to be recovered (in order to be available to future requests), after the failure has occurred. In OSGi a management tool can easily be implemented as a separate bundle. In addition to a ping-based approach to discovering failures, the management tool can use the life cycle functionality of the OSGi Framework. With this functionality, it becomes much easier to monitor other bundles and restart them in case of failures. The proxy-based monitoring of replicated bundles or services is also feasible in OSGi. A service can act as a proxy, which provides access to a monitored bundle or service. Here the proxy has the capability to check, for example, the correctness of the results and the response time. In addition to general application exceptions, the OSGi specific bundle exceptions could be used to discover failures. An alternative to bundle exceptions is the event functionality of OSGi. The management tool (implemented as a bundle) could consume special failure events, which are published by other bundles, instead of exceptions. This helps to prevent dependencies between the management tool and other components of the application. After a failure has been discovered, the corresponding bundle has to be isolated. In OSGi a bundle can be isolated just by stopping it. If a bundle or service has a permanent failure, the bundle will have to be uninstalled and checked manually. All the solutions above assume that all parts of the application are running in the same OSGi instance. For solutions with more than one instance, for example, in a horizontally scalable environment, D- OSGi can be used. But D-OSGi does not cover monitoring with the life cycle functionality; either events over different instances. As a possible solution to this problem, a management tool agent could be used. This agent could communicate over D-OSGi with a central server. But this solution would become much more difficult to implement. 5 Related Work Ahn, Oh and Hong [1] proposed a proxy-based approach to fault tolerance in Service-Oriented Architecture (SOA) systems. They used a proxy, which wrapped a service object, intercepted service requests and routed the requests to the best service at runtime. To provide fault tolerance, the proxy monitored failures. When a failure was discovered, the proxy isolated the failed service and recovered it. This approach is also applicable to OSGi. Papageorgiou [8] provided fault tolerance and scalability in the Virtual OSGi Framework. In particular, he presented a global OSGi Framework, which acted as a virtualization layer on the top of local OSGi Frameworks. The global OSGi Framework connected two or more local OSGi Frameworks running on different nodes, and thus could handle dynamic changes in the network. Maragkos [7] described the replication and migration mechanisms of bundles in the Virtual OSGi Framework. These mechanisms can also be used to provide fault tolerance in OSGi. 6 Conclusion In this paper, we have described different approaches to providing OSGi applications with high availability. In particular, we have examined several design alternatives how load balancing and fault tolerance can be implemented in OSGi. 7 Future Work To demonstrate and test the approaches we have described, we are going to implement some of them in a demo application running on OSGi. The basic user scenario for our demo will be a vertically scalable environment with more than one application server. Each server will run in the OSGi Framework and offer a service for users from outside. Therefore, there should be a component (either internal or external) to handle load balancing of different servers. Furthermore, another component, which provides fault tolerance, will also be needed. The challenge will be to implement a highly available application by means of load balancing and fault tolerance in OSGi. In addition to the demo application, we are going to examine whether the implementation works in real-world applications. For example, some issues might occur due to a particular JVM s threading implementation. Also, vertical scalability from within a single OSGi instance (that runs on a single JVM) might not always help. So we need to conduct further experiments in order to address such issues. Furthermore, checking vertical scalability of OSGi in cloud environments could also be an interesting topic for the future work. References: [1] Ahn, H.; Oh, H.; Hong, J.: Towards Reliable OSGi Operating Framework and Applications. In: ISBN: 978-1-61804-046-6 429

Journal of Information Science and Engineering 23 (2007), Nr. 5, S. 1379-1390 [2] OSGi Alliance: OSGi The Dynamic Module System for Java, last accessed: June 2010, http://www.osgi.org [3] McAffer, J.; VanderLei, P.; Archer, S.: OSGi and Equinox: Creating Highly Modular Java Systems, Addison-Wesley, 2010 [4] Apache Community, Felix OSGi framework, last accessed: June 2010, http://felix.apache.org/site/index.html [5] MakeWave, Knopflerfish OSGi, last accessed: June 2010, http://www.knopflerfish.org/ [6] Koschel, A.: Verteilte und Mobile Systeme 2. Vorlesungsskript, 2009 [7] Maragkos, Damianos: Replication and Migration of OSGi Bundles in the Virtual OSGi Framework. http://e- collection.ethbib.ethz.ch/eserv/eth:30549/eth- 30549-01.pdf [8] Papageorgiou, D.: The Virtual OSGi Framework. 2008 [9] PLC, I.T.: Orbix E2A Application Server Load Balancing and Fault Tolerance. 2002 [10] Schlossnagle, T.: Scalable internet architectures. Sams Indianapolis, IN, USA, 2006 [11] ProSyst, mbs Mobile SDK, last accessed: June 2010, http://www.prosyst.com, http://www.prosyst.com/index.php/de/html/conten t/64/mbs-mobile-sdk/ [12] Apache Community, ServiceMix 4.2, last accessed: June 2010, http://servicemix.apache.org/2010/04/27/servicem ix-420-released.html, http://servicemix.apache.org/home.html [13] Apache Software Foundation. Apache CXF Distributed OSGi Web, last accessed: June 2010, http://cxf.apache.org/distributed-osgi.html ISBN: 978-1-61804-046-6 430