0 0 Thread Management in Application Servers Wednesday, October 11, 2006 Nicolas DOLET Philippe MERLE

Slides:



Advertisements
Similar presentations
When Applications can Roam Freely OSGi Service Platform R4 Peter Kriens Technical Director OSGi
Advertisements

1 1 Fractal Deployment Framework Monday, December 11, 2006 Philippe MERLE Nicolas DOLET Jacquard Project.
System Management Model and Fractal Author: WP2 System Management group Identification: WP2-TaskSM Partner: Telefonica I+D, UPM, Telvent Date: 07.
1 1 Fractal Deployment Framework Thursday, April 12, 2007 Nicolas DOLET ADAM Project - INRIA Futurs, Laboratoire d‘Informatique.
ARCHIMÈDE Presented by Guy Teasdale Directeur, Services soutien et développement Bibliothèque de l’Université Laval CARL Workshop on Institutional Repositories.
Deployment and administration of SOA / SCA distributed systems Grand Colloque STIC 2007, La Villette – Cité des sciences et de l’industrie Damien Fournier,
Threads Clients Servers Code Migration Software Agents Summary
Scheduler Activations Effective Kernel Support for the User-Level Management of Parallelism.
Monitoring OSGi platforms with ProActive Virginie Legrand OASIS Team - INRIA Sophia Antipolis.
Denis Caromel1 Denis Caromel, et al. OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis, IUF 3 rd ProActive User Group, Nov Model.
JSLEE. What is JSLEE ? is an event oriented application middleware. Its main job is to receive events from external resources and deliver these events.
OpenCCM: The Open CORBA Components Platform OSMOSE WP3 CCM Meeting 14th November 2003, LIFL, Lille, France Philippe Merle Jacquard Project.
1/26/2007CSCI 315 Operating Systems Design1 Processes Notice: The slides for this lecture have been largely based on those accompanying the textbook Operating.
SIMULATING ERRORS IN WEB SERVICES International Journal of Simulation: Systems, Sciences and Technology 2004 Nik Looker, Malcolm Munro and Jie Xu.
Spring Dynamic Modules. Startlocation: Documentation: /1.2.1/reference/html/
Understanding and Managing WebSphere V5
GSI Operating Software – Migration OpenVMS to Linux Ralf Huhmann PCaPAC 2008 October 20, 2008.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 18 Slide 1 Software Reuse 2.
ESB Guidance 2.0 Kevin Gock
SSI-OSCAR A Single System Image for OSCAR Clusters Geoffroy Vallée INRIA – PARIS project team COSET-1 June 26th, 2004.
JOnAS developer workshop – /02/2004 status Emmanuel Cecchet
Introducing Axis2 Eran Chinthaka. Agenda  Introduction and Motivation  The “big picture”  Key Features of Axis2 High Performance XML Processing Model.
Optimized Java computing as an application for Desktop Grid Olejnik Richard 1, Bernard Toursel 1, Marek Tudruj 2, Eryk Laskowski 2 1 Université des Sciences.
/11/2003 C-JDBC: a High Performance Database Clustering Middleware Nicolas Modrzyk
95-843: Service Oriented Architecture 1 Master of Information System Management Service Oriented Architecture Lecture 10: Service Component Architecture.
OpenCCM: The Open CORBA Components Platform 3rd ObjectWeb Conference 20th November 2003, INRIA Rocquencourt, France Philippe Merle INRIA.
Bologna, September 2003 Giorgia Lodi Department of Computer Science University of Bologna V.Ghini, F. Panzieri.
|Tecnologie Web L-A Anno Accademico Laboratorio di Tecnologie Web Introduzione ad Eclipse e Tomcat
第十四章 J2EE 入门 Introduction What is J2EE ?
1 22 August 2001 The Security Architecture of the M&M Mobile Agent Framework P. Marques, N. Santos, L. Silva, J. Silva CISUC, University of Coimbra, Portugal.
The Grid Component Model and its Implementation in ProActive CoreGrid Network of Excellence, Institute on Programming Models D.PM02 “Proposal for a Grid.
1 1 JEE and Deployment Thursday, August 30th ADAM Seminar Cap Hornu – Baie de Somme France.
Lecturer: Prof. Piero Fraternali, Teaching Assistant: Alessandro Bozzon, Advanced Web Technologies: Struts–
Margherita Forcolin (Insiel S.p.A.) Thessaloniki, 13 October 2011.
Contents 1.Introduction, architecture 2.Live demonstration 3.Extensibility.
Comparing JavaBeans and OSGi Towards an Integration of Two Complementary Component Models HUMBERTO CERVANTES JEAN-MARIE FAVRE 09/02.
Jan Hatje, DESY CSS ITER March 2009: Technology and Interfaces XFEL The European X-Ray Laser Project X-Ray Free-Electron Laser 1 CSS – Control.
OpenCCM MdC Philippe Merle LIFL - INRIA (soon)
Abstraction of Transaction Demarcation in Component-Oriented Middleware Romain Rouvoy - Philippe Merle Jacquard INRIA Project LIFL –
Dynamic Architectures (Component Reconfiguration) with Fractal.
Dream A Fractal-based communication framework ObjectWeb Architecture Meeting July, 8th 2004 M. Leclercq, V. Quéma, J.-B. Stefani Sardes.
SOA initiative 2 nd ObjectWeb V2 Workshop Meeting October, 3 rd Bruxelles François Letellier, ObjectWeb Gaël Blondelle, CTO.
Core Java Introduction Byju Veedu Ness Technologies httpdownload.oracle.com/javase/tutorial/getStarted/intro/definition.html.
ProActive components and legacy code Matthieu MOREL.
© 2006, National Research Council Canada © 2006, IBM Corporation Solving performance issues in OTS-based systems Erik Putrycz Software Engineering Group.
Getting Started with the Open Services Gateway Initiative (OSGi) CNT 5517 Dr. Sumi Helal, Ph.D. Professor Computer & Information Science & Engineering.
1 Cooperative Open Workflow Yvan Peter, Thomas Vantroys Laboratoire TRIGONE – Equipe Noce Université des Sciences et Technologies de Lille
Plug-in Architectures Presented by Truc Nguyen. What’s a plug-in? “a type of program that tightly integrates with a larger application to add a special.
Jan Hatje, DESY CSS GSI Feb. 2009: Technology and Interfaces XFEL The European X-Ray Laser Project X-Ray Free-Electron Laser 1 CSS – Control.
1 OS Review Processes and Threads Chi Zhang
OpenCCM: Status and Work plan Dr. Philippe Merle LIFL - INRIA ObjectWeb Architecture Meeting, Grenoble, 21 – 22.
Session Beans Based on: Patel, Brose, Silverman, Mastering Enterprise JavaBeans 3.0.
VERIFYING THE CORRECT COMPOSITION OF DISTRIBUTED COMPONENTS: FORMALISATION AND TOOL Ludovic Henrio 1, Oleksandra Kulankhina 1,2, Dongqian Liu 3, Eric Madelaine.
1 Java Server Pages A Java Server Page is a file consisting of HTML or XML markup into which special tags and code blocks are inserted When the page is.
Impala A dynamic module framework for Java web development Phil Zoio Realsolve Solutions Devoxx 12 December, 2008.
ITEA S4ALL project, 20th June 2007 S4ALL: Services For ALL ITEA S4ALL Demonstration 4 and 5 Deploying any ITEA S4ALL Infrastructure Automatically Nicolas.
EJB Enterprise Java Beans JAVA Enterprise Edition
Glink for Java: applet, application and an API for integrating access to Bull, IBM, UNIX and Minitel systems with your Java based e-business applications.
Apache Geronimo Open Source J2EE Application Server Getting up to speed with Apache Geronimo - Copyright 2005 Tom McQueeney 1 Getting up to speed with.
Architecture Review 10/11/2004
Chapter 2 Processes and Threads Today 2.1 Processes 2.2 Threads
Introduction to J2EE Architecture
Presented by Jinpeng Zhou
Distributed Systems - Comp 655
Multithreading.
ESIS Consulting LLC (C) ESIS Consulting LLC. All rights reserved
Prof. Leonardo Mostarda University of Camerino
The Grid Component Model and its Implementation in ProActive
EKSE: A Command Line Interface for EGS-CC based Systems
Presentation transcript:

0 0 Thread Management in Application Servers Wednesday, October 11, 2006 Nicolas DOLET Philippe MERLE Jacquard Project - INRIA Futurs, Laboratoire d‘Informatique Fondamentale de Lille (LIFL), Université des Sciences et Technologies de Lille (USTL), Villeneuve d’Ascq, France RNTL JOnES Meeting – Paris - France

1 1 Outline Context Problem & Motivation Objectives Control threading activity Our approach Thead Management Framework (TMF) Area Management Framework (AMF) Framework organization Conclusion Perspectives

2 2 Context Application servers host Application Components (AC): OSGi: –Bundles JOnAS: –EJBs –Servlets PEtALS: –JBI Binding Components –JBI Service Components

3 3 Context Application servers are composed of Middleware Components (MC): JOnAS = Web and EJB containers for application components + ( JacORB & Axis & JORAM for communication ) + ( JORM & JOTM/MEDOR/Speedo & C-JDBC for services ) + … PEtALS = Enterprise Service Bus (ESB), JBI compliant + JBI containers + JORAM for communication

4 4 Context MC2AC1AC3 hosted by composed of AC2MC3MC1 Application Server  Both AC & MC components can create Threads !

5 5 Problem & Motivation Problem: Creation of a large number of threads can cause: –Performance degradation due to thread context switches –Partial crash of the JVM / Application Server Motivation: need to control Thread allocation Ensure the property: “Never more than X threads simultaneously”

6 6 Objectives Monitor Thread allocation... of (embedded) Middleware Components of (user) Application Components... with several statistics: Number of active threads History of threads allocation List of classes using threads Protecting Application Servers against MC (e.g. JMS could create too many threads) –Thread pool solution drawback: ∑ MC thread pools > JVM Threads limit against AC (e.g. EJB should not create threads) –There is currently no solution for the control of AC threading activity –Future public Application Server could be hacked by a viral AC

7 7 Middleware Components Integration – The Pool Solution’s Drawbacks Application Server configures (in a property file) configures (via JMX) MC1 Configurable Thread Pool Thread how to configure ? MC2 Configurable Thread Control Thread MCn Thread Management ? Thread  Developpers have to implement the thread control for each new component...

8 8 Thread Management Framework with APIs Thread Management Framework MC2 Explicit Thread Management AC No Thread Management MC1 Configurable Thread Management MC2 Configurable Thread Management  Modify all MC for using TMF APIs Manual patches of source code of existing components Using Aspect Oriented Programming to modify existing components uses

9 9 Thread Management Framework TMF with the Thread Class Adaptation AC No Thread Management MC1 Configurable Thread Management MC2 Configurable Thread Management Java Thread Class Transparency: Do not have to change MC / AC Activation on demand

10 Our Approach Modification of the java.lang.Thread class Bytecode injection using the ASM tool Any thread includes these modifications and can be controlled by areas Area Management Framework Each thread is assigned to an area when it starts, according to a criterion –e.g., the package of the instance that create the thread Each area defines a manageable limit, and can trigger an alarm when the limit is reached

11 Area & Alarm Concepts An area is an entity for monitoring a pool of resources (eg. Threads) can support children areas counts the number of Threads for itself and each child recursively can block the execution of the thread can trigger alarms An alarm can have several behaviours: –save alarm messages in a log file –throw exceptions –send a mail to an administrator –composition of different features

12 Where to Adapt the Thread class ? Never more than X Threads After thread exits Before thread starts  Thread activity.

13 How to Rewrite the Thread Class ? Bytecode injection (ASM) org.objectweb.area.thread.AdaptThreadClass class Thread { public Area area; public void start(); private void exit(); } class Thread { public void start(); private void exit(); } ASM

14 Framework Organization API AreaProvider : management of the areas Area : management of the resources AreaProperties : management of the area features AreaStatistics : build statistics on the resources Alarm : send alerts Current implementation of TMF: lib –SingletonAreaProvider: JVM bootstrap –DefaultArea, DefaultAlarm, DefaultXXX,… : all interfaces default implementation –SAXHandler: area configuration –NoLimitArea, OutOfMemoryAlarm thread –AdaptThreadClass: ASM patch –ThreadManager: static class for the delegation of the management to AMF

15 TMF Default Implementation DefaultArea enter (resource) –parent.enter (resource) –If (counter == 0) –alarm.alert (this, resource) –wait () –counter = counter -1 exit (resource) –counter = counter + 1 –notify () –parent.exit (resource)

16 AMF Architecture Graph of Areas / Alarms Managed by an AreaProvider Configurable by users (XML) Global view from the root Area

17 Fractal Component Based Approach TMF can be built either in an Object version or in a Component one Area configuration via Fractal ADL

18 Integration into PEtALS Basic integration for monitoring Middleware Components (MC) activity Add TMF libraries in the java.endorsed.dirs property Fine grain integration for monitoring Application Components (AC) activity Modify the JBI Installer component in order to notify AMF for a reconfiguration of its Areas String componentClassName = componentDescription.getComponentClassName(); int lastSeparator = componentClassName.lastIndexOf('.'); String packageName = componentClassName.substring(0, lastSeparator + 1); PetalsService.addPackageInPetalsArea(packageName);

19 Conclusion Overhead < 1 sec Benchmark : + 20% when classical launch  + 4 % with a SingletonAreaProvider  Tested with RUBiS : non measurable overhead Threads allocation can be managed transparently inside the Application Server, for Middleware Components with minor modifications (of the Application Server source code) for Application Components Mean time is milliseconds milliseconds milliseconds.

20 Perspectives Other software monitoring  change the AreaProvider Integration into other middleware: JORAM DREAM Manage other resources, e.g. : Messages Sockets DBConnections  Requires ‘only’ to adapt the resource class, to use the Area Management Framework

21 Thank You Any questions ? TMF available at: TMF for JOnAS available at: TMF for PEtALS (soon) available at: