Updated after review Removed paragraph mentioned java source code.

Similar documents
1 Introduction This document describes the solution for handling number normalization and URI aliasing in Sailfin.

1 Introduction This document describes the solution for handling number normalization and URI aliasing in Sailfin.

Functional Specification Converged Load Balancer Author(s): Version: 1.3

web.xml Deployment Descriptor Elements

Document: CLB specification. Reviewer: Binod Review Date: 11/9/2007. Response Author: Pankaj Jairath Date: 12/09/2007, 28/09/2007

Reference Location Review Comments Author's response Status

SAP Edge Services, cloud edition Edge Services Predictive Analytics Service Guide Version 1803

Semantic Analysis. Outline. The role of semantic analysis in a compiler. Scope. Types. Where we are. The Compiler so far

1. Functional Specification for SailFin Administration Author(s): Contributors: Irfan A, Vijay G Version:0.5 1.

CS506 Web Design & Development Final Term Solved MCQs with Reference

Network Programmability with Cisco Application Centric Infrastructure

Project SailFin Functional Specification for Sip Application Routing Author(s):

Functional Specification for Deployment Author(s):

The role of semantic analysis in a compiler

Management Tools. Management Tools. About the Management GUI. About the CLI. This chapter contains the following sections:

Converged Load Balancer Functional Test Specification. Author(s): Andreas Nyberg. Contributor(s): Joel Binnquist. Version 0.2

SAS 9.2 Foundation Services. Administrator s Guide

Semantic Analysis. Outline. The role of semantic analysis in a compiler. Scope. Types. Where we are. The Compiler Front-End

InsECTJ: A Generic Instrumentation Framework for Collecting Dynamic Information within Eclipse

Customizing the WebSphere Portal login and logout commands

Description of CORE Implementation in Java

Advanced Java Programming

Rhino SIP Servlet Overview and Concepts

Vision of J2EE. Why J2EE? Need for. J2EE Suite. J2EE Based Distributed Application Architecture Overview. Umair Javed 1

Tapestry. Code less, deliver more. Rayland Jeans

Tutorial ipojo. 2. Preparation

Getting. Started with. smash. IBM WebSphere. Ron Lynn, Karl Bishop, Brett King

BEAAquaLogic. Service Bus. Interoperability With EJB Transport

SAS 9.4 Foundation Services: Administrator s Guide

Setting Up the Development Environment

Voice Foundation Classes

WFCE - Build and deployment. WFCE - Deployment to Installed Polarion. WFCE - Execution from Workspace. WFCE - Configuration.

Cisco Unified Application Designer 2.4

Europe on a Disk Geodata Processing with Eclipse and OSGi. Harald Wellmann 10 Nov 2008

Type of Classes Nested Classes Inner Classes Local and Anonymous Inner Classes

Sip Session Replication Test Specification

I Got My Mojo Workin'

API Knowledge Coding Guide Version 7.2

Servlets by Example. Joe Howse 7 June 2011

Distributed Multitiered Application

Page 1

Active Endpoints. ActiveVOS Platform Architecture Active Endpoints

Introduction to Programming Using Java (98-388)

COPYRIGHTED MATERIAL

vrealize Operations Management Pack for vrealize Hyperic Release Notes

1.2. Name(s) and address of Document Author(s)/Supplier: Sahoo: 1.3. Date of This Document: 12 July 2008

High-Level Wrapper for CloudKeeper. Architecture Configuration

Anatomy of a Compiler. Overview of Semantic Analysis. The Compiler So Far. Why a Separate Semantic Analysis?

AccuRev Plugin for Crucible Installation and Release Notes

Lightweight J2EE Framework

<Insert Picture Here> Hudson Web Architecture. Winston Prakash. Click to edit Master subtitle style


Scripting Languages in OSGi. Thursday, November 8, 12

Class Dependency Analyzer CDA Developer Guide

What s NetBeans? Like Eclipse:

J2EE Development. Course Detail: Audience. Duration. Course Abstract. Course Objectives. Course Topics. Class Format.

Mobile Application Workbench. SAP Mobile Platform 3.0 SP02

ADT: Eclipse development tools for ATL

Writing Servlets and JSPs p. 1 Writing a Servlet p. 1 Writing a JSP p. 7 Compiling a Servlet p. 10 Packaging Servlets and JSPs p.

MarkLogic Server. Content Processing Framework Guide. MarkLogic 9 May, Copyright 2018 MarkLogic Corporation. All rights reserved.

Cisco Unified Presence 8.0

Working with a Module

Chapter 6 Introduction to Defining Classes

DTP Help-Helper for Dynamic Context-Sensitive Help

Qlik Sense Cmdlet for PowerShell. Sokkorn CHEAV

Module 5 Developing with JavaServer Pages Technology

Announcements. Java Graphics. Exceptions. Java Odds & Ends

FINALTERM EXAMINATION Spring 2009 CS506- Web Design and Development Solved by Tahseen Anwar

Adobe Experience Manager

Functional Specification for SailFin Administration

NetBeans IDE Field Guide

ECM-VNA Convergence Connector

BEAWebLogic. Server. Programming WebLogic Deployment

Oracle Fusion Middleware 12c

Plug-ins, Modules, and Extensions

Syllabus- Java + Android. Java Fundamentals

Virtual Services Container

1.2. Name(s) and address of Document Author(s)/Supplier: Tim Quinn Hong Zhang

OSGi on the Server. Martin Lippert (it-agile GmbH)

Standard. Number of Correlations

Release Notes. Lavastorm Analytics Engine 6.1.3

Web Application Architecture (based J2EE 1.4 Tutorial)

Java SE7 Fundamentals

P2: Collaborations. CSE 335, Spring 2009

vsphere Web Client Extensions Programming Guide vsphere 5.1

xcp: Custom Java Function To Access DFC IDfSession

Deploying Applications to Oracle WebLogic Server g Release 1 (10.3.6)

RenderMonkey SDK Version 1.71

Sip Message Inspection Adapter One Pager

Fluenta DITA Translation Manager. Copyright Maxprograms

Yahoo Search ATS Plugins. Daniel Morilha and Scott Beardsley

Cisco UCS Director API Integration and Customization Guide, Release 5.4

Testing Exceptions with Enforcer

Upon completion of the second part of the lab the students will have:

SailFin/SJSCAS1.0. AdminGUI Test Specification. Please send comments to : Author(s): Sujatha Chintalapati

Netalyzr Updates. Christian Kreibich (ICSI), Nicholas Weaver (ICSI), and Vern Paxson (ICSI & UC Berkeley) Netalyzr Updates

Google GCP-Solution Architects Exam

SLI Learning Search Connect For Magento 2

File: SimpleB2BUAProxyServlet.java

The Compiler So Far. Lexical analysis Detects inputs with illegal tokens. Overview of Semantic Analysis

Transcription:

Functional Specification for DCR Plug-in Support Author(s): joel.binnquist.xc@ericsson.com Version: 1.3 Version Date Comment 0.1 2009-01-20 First version 1.0 2009-04-02 Updated after review. - Removed support for annotations 1.1 2009-04-02 Updated API section. - Removed support for runtime compilation 1.2 2009-04-03 Removed paragraph mentioned java source code. 1.3 2009-04-02 Added link to FSD for number normalization. 1 Introduction The Data Centric Rules (DCR) is a part of the Converged Load Balancer making it possible to configure how the key, used as input to the consistent hash, is extracted from a request. The rules for a specific CLB configuration can currently be specified using a proprietary language in XML. However, this language is somewhat limited, and moreover, it is hard to understand. The Presence and Group Management application (PGM) has put on a requirement that Sailfin shall support the ability to specify DCR rules where one can write a condition on a specific SIP method. Something like: if req.method equals REGISTER then extract key from req.uri else extract key from req.myheader Today one cannot specify a comparison condition on a request method; the only entity that one can express a comparison condition on is the session case. This could be solved by enhancing the existing language.

While analyzing this it was suggested that applications should be able to configure DCR via plug-ins (written in Java) rather than enhancing the proprietary language. Thus when the CLB needs to extract the hash key from a request it calls the currently installed plug-in. The advantages with a plug-in solution would be: The language is well-known, which makes it easier for the application developer, who shall write the rules. The solution will be easier to maintain for the Sailfin development organization compared to a proprietary XML based language The solution will be much more flexible for the applications; the applications will be able to use the full power of the Java language when expressing the rules. It will be possible for the applications to verify and debug the rules using standard tools; today this is not possible. There will be no need to spend design hours for enhancement of a proprietary the language in the future. One important constraint is that Sailfin supports dynamic reconfiguration of the rules, which requires that the plug-in classes can be unloaded or reloaded. It shall be possible to install/download a new plug-in via the CLI and Admin GUI without having to copy it to the file system of Application Server (in a manner similar to deploying applications). The old solution with the XML-based language should be deprecated or discontinued, to minimize future costs for maintenance. 2 Function 2.1 Overview 2.1.1 Configuration The Data Centric Rules of the Converged Load Balancer will be configurable using an implementation of the interface org.glassfish.comms.api.datacentric.dcrplugin, which is supplied as a precompiled Java class packaged in a jar-file or. The application server determines how to interpret the file based on the file extension. The user provides the file using the existing interfaces for DCR configuration (Admin GUI and CLI). The execution of a set DCR file command (GUI or CLI) causes the admin framework to upload the file to an internal directory in the application server. (This mechanism is already implemented for the DCR XML.).

The admin framework generates an admin event into the CLB where the file name is supplied as an argument (note that the admin framework does not care about what kind of file this is, it is up to the CLB to decide how to process the file). The CLB then selects how to process the file based on file extension (case-insensitive): If it is a.xml file, then it is processed as a DCR XML file (the existing solution). If it is a.jar file, it is expected to be a jar-file containing a compiled implementation of the plugin interface (and perhaps other application specific helper classes) and where the manifest specifies the class name of this class. The CLB then loads the plugin class and creates on instance. 2.1.2 Message Routing When routing a request, the CLB calls the instantiated plug-in to extract the key from initial 1 SIP and HTTP requests. The CLB uses the result returned from the plug-in, to lookup the serving instance in the consistent hash. Note, if required the plug-in is responsible for resolving Tel-URI:s, normalize numbers and canonicalize URI:s (see Functional Specification for Number Normalization and URICanonicalization ). The API:s required for this are provided as arguments on the method call to the plug-in (see 2.4.1). 1 A request is initial if it is not part of an ongoing session/dialog.

2.2 Configuration Interface The file is supplied either via the CLI commands: create-converged-lb, createconverged-lb-config or set-dcr-file or via Converged Load Balancer configuration interface in the Admin GUI: 2.3 Configuration 2.4 API 2.4.1 DcrPlugin The org.glassfish.comms.api.datacentric.dcrplugin specifies two methods: String getkey(javax.servlet.sip.sipservletrequest request, javax.servlet.sip.sipfactory sipfactory, org.glassfish.comms.api.uriutils.uritools uritools, org.glassfish.comms.api.telurl.telurlresolver telurlresolver) String getkey(javax.servlet.http.httpservletrequest request, javax.servlet.sip.sipfactory sipfactory, org.glassfish.comms.api.uriutils.uritools uritools, org.glassfish.comms.api.telurl.telurlresolver telurlresolver)

The implementor shall implement these to extract the key to be used for lookup in the consistent hash in the CLB, for initial requests. (If null is returned the CLB will fall back to the default behavior, i.e. create a key from the call-id and from-tag of the request). In order to facilitate implementation of the DcrPlugin the following entities are provided as method arguments: TelUrlResolver (to be able to resolve Tel-URI:s) UriTools (to be able to normalize and canonicalize URI:s) SipFactory (to be able to convert header values to URI:s and extract the various components from such a URI) 2.4.2 JAR-file The jar-file shall contain the plug-in-class and possibly other classes as needed by the plug-in-class. Note, that the class is loaded by a separate class loader which has the container classloader as parent, thus classes that are not part of the container, needed by the plug-in, must be provided in the jar-file. The manifest shall specify the plug-in-class using the attribute Dcr-Plugin-Class, as below: Manifest-Version: 1.0 Dcr-Plugin-Class: com.example.dcrplugin.exampledcrplugin 2.5 Constraints

3 Design Overview 3.1 Class Diagram Each time the configuration changes and the DCR-file changes the ConsistentHashRouter is triggered to re-configure. The ConsistentHashRouter reads the name of the DCR-file and instantiates a DcrPlugin using the DcrPluginLoader. The ConsistentHashRouter pushes the instantiated DcrPlugin onto the set of hashkeyextractors) The DcrPluginLoader handle loading of the DCR-plugin which is a jar-fil. 4 Quality and Availability N/A

5 Performance - 6 Management and Monitoring 6.1 Formal Interfaces See API Interfaces. 7 Packaging, Files, and Location 8 Documentation Requirements A user guide how to write a handler class, declare mappings and install the plug-ins is required. 9 Open Issues None.

10 API Interfaces 10.1 DcrPlugin package org.glassfish.comms.api.datacentric; import javax.servlet.http.httpservletrequest; import javax.servlet.sip.sipservletrequest; import javax.servlet.sip.sipfactory; import org.glassfish.comms.api.datacentric.dcrplugin; import org.glassfish.comms.api.telurl.telurlresolver; import org.glassfish.comms.api.uriutils.uritools; public interface DcrPlugin { String getkey(sipservletrequest request, SipFactory sipfactory, UriTools uritools, TelUrlResolver telurlresolver); String getkey(httpservletrequest request, SipFactory sipfactory, UriTools uritools, TelUrlResolver telurlresolver); 11 Example Plug-in The following is an example of a plug-in implementation: package com.example.dcrplugin; import org.glassfish.comms.api.datacentric.dcrplugin; import org.glassfish.comms.api.telurl.telurlresolver; import org.glassfish.comms.api.telurl.telurlresolverexception; import org.glassfish.comms.api.uriutils.uritools; import java.io.ioexception; import javax.servlet.http.httpservletrequest; import javax.servlet.sip.servletparseexception; import javax.servlet.sip.sipfactory; import javax.servlet.sip.sipservletrequest; import javax.servlet.sip.sipuri; import javax.servlet.sip.uri; public class ExampleDcrPlugin implements DcrPlugin { @Override public String getkey(sipservletrequest request, SipFactory sipfactory, UriTools uritools, TelUrlResolver telurlresolver) { URI uri; if (request.getmethod().touppercase().equals("register")) { String header = request.getheader("my-header"); try { uri = sipfactory.createuri(header); catch (ServletParseException e) { uri = request.getrequesturi();

else { uri = request.getrequesturi(); URI canonicalizeduri = uritools.canonicalize(uri); if (canonicalizeduri.issipuri()) { SipURI resolveduri; try { resolveduri = telurlresolver.lookupsipuri(canonicalizeduri); catch (IOException e) { return null; catch (TelUrlResolverException e) { return null; return resolveduri.getuser() + "@" + resolveduri.gethost(); else { return canonicalizeduri.tostring(); @Override public String getkey(httpservletrequest request, SipFactory sipfactory, UriTools uritools, TelUrlResolver telurlresolver) { return request.getrequesturl().tostring();