Mobicents JSLEE progress and roadmap - Mobicents Summit 2011

Post on 08-Jun-2015

836 views 3 download

Tags:

Transcript of Mobicents JSLEE progress and roadmap - Mobicents Summit 2011

Name of PresentationRed HatPresenter

Mobicents JAIN SLEESochi, RussiaDecember 2011

1.1 JAIN SLEE: Introduction Low latency and high throughput application/service

environment for event processing

Designed for stringent requirements of core network signalling application, and to support scalability and availability through clustering

The environment provides common behaviour to all services:

Managing component life-cycle (install/activate/deactivate/uninstall,…)

Generating traces & alarms, managing resources, user statistics;

Common behaviour is not re-developed for each and every service, the service developer only cares about service logic

The necessity to introduce SLEE as a standard:

Components cannot be reused / dependency on vendor

Components developed / deployed on one proprietary SLEE can't communicate with components developed/deployed in other proprietary SLEE

JAIN SLEE is the standardized JAVA SLEE

1.2 JBCP JAIN SLEE 2.x: Overview JAIN SLEE 1.1

JBoss EAP 5

High Availability + Fault Tolerance with JBoss Cache 3.x

High Performance (1100+ SIP UAS cps in a low class server)

Low Latency

Fault Tolerant Resource Adaptor API

JAIN SLEE 1.1 Profiles Mapped to JPA on Hibernate

Full control on how the data is persisted / loaded

Management beyond JMX (Web Console, Twiddle CLI, JBoss ON Plugin)

Misc Features

Congesture Control

Event Router Statistics

Simplified Logging Configuration

JAIN SLEE 1.1 Extensions

1.3 Tools JBoss AS JMX Console

GWT Management Console

JBoss Operations Network Console

Twiddle Command Line Interface

1.4 Development Tools Eclipse SLEE Plugin

Apache Maven2 Plugins, Repositories, Dependency Management, Archetypes

Apache Ant Scripts

1.5 Resource Adaptors JAIN SIP (with Early Dialog Failover)

(Apache) HTTP Client

HTTP Servlet (requests on a specific servlet are transformed in JSLEE events)

JAIN MGCP

XCAP Client (proprietary API)

XMPP Component & Client (Extended Smack API)

Diameter Base, Sh Client, Sh Server, CCA, Rf, Ro, Cx/Dx, Gq, Gx, Rx

SMPP v5

JCC

MAP

JDBC

TFTP Server

1.6 Application Enablers

Reusable components (SBBs), which provide high level and easy to use interfaces

HSS ClientREST ClientSIP Event Publication ClientSIP Event Subscription ClientXDM Client

1.7 Added Value Remote SLEE Connection Tool (Remote Java EE event firing

into SLEE)

Media Server 2.x

SIP Load Balancer

Fault Tolerant Diameter Stack

SS7 Framework

2.1 Achievements Mobicents SLEE 2.x

Smooth Cluster Management (e.g. add/remove nodes)Zero Downtime Service Upgrades30% Performance Increase (compared with 2.2)ChildRelationExt & SbbLocalObjectExt (JAIN SLEE 1.1 Extensions)5 New Resource Adaptors + 1 New Application EnablerEclipSLEE 2.x

6 Releases

50+ Major Features Developed100+ Minor Features & Fixes

Around 7000 Downloads

2010/11 to 2011/11

2.2 Shortcomings

Mobicents 3.x Slow Progress

JBoss AS7 Late Release JBoss Infinispan not ready for primetime

Code Contributions

Almost nullWeak developer documentation does not helps

RHQ/JON Console

UI LimitationsWeak PerformanceNot ready to run

3.1 Smooth Service Upgrade

SLEE standard management interfaces includes an operation to deactivate and activate 2 services in a single step

Services are not active at same time

Services are not inactive at same time

Supported also by Persistent File Deployer

When activating a service, if there is currently a service with same ID, but different version, then smooth upgrade is performed

3.2 Persistent RA Entity Management Users may use the deploy-config.xml to define Resource

Adaptor Entity and Resource Adaptor Links

When installing/uninstalling a Resource Adaptor, SLEE reads a deploy-config.xml file in its deploy directory, searching for additional RA Entities or Links related to the RA, to be created/removed

<?xml version="1.0" encoding="UTF-8"?>

<deploy-config>

<ra-entity

resource-adaptor-id="ResourceAdaptorID[name=JainSipResourceAdaptor,vendor=net.java.slee.sip,version=1.2]"

entity-name="SipRA">

<properties>

<property name="javax.sip.PORT" type="java.lang.Integer" value="5070" />

<property name="org.mobicents.ha.javax.sip.BALANCERS"

type="java.lang.String" value="10.34.0.1:5065" />

</properties>

<ra-link name="SipRA" />

</ra-entity>

</deploy-config>

<?xml version="1.0" encoding="UTF-8"?>

<deploy-config>

<ra-entity

resource-adaptor-id="ResourceAdaptorID[name=JainSipResourceAdaptor,vendor=net.java.slee.sip,version=1.2]"

entity-name="SipRA">

<properties>

<property name="javax.sip.PORT" type="java.lang.Integer" value="5070" />

<property name="org.mobicents.ha.javax.sip.BALANCERS"

type="java.lang.String" value="10.34.0.1:5065" />

</properties>

<ra-link name="SipRA" />

</ra-entity>

</deploy-config>

3.3 Fault Tolerant RA Timer

// ra code retrieving the timer, configuring it and submiting a task

public void setFaultTolerantResourceAdaptorContext(

FaultTolerantResourceAdaptorContext<SipActivityHandle, String> context) {

FaultTolerantTimer timer = context.getFaultTolerantTimer();

timer.config(new FaultTolerantTimerTaskFactoryImpl(this), 4);

FaultTolerantTimerTaskDataImpl data = new FaultTolerantTimerTaskDataImpl("xyz");

FaultTolerantTimerTaskImpl task = new FaultTolerantTimerTaskImpl(this, data);

timer.schedule(task, 30, TimeUnit.SECONDS);

}

// ra code retrieving the timer, configuring it and submiting a task

public void setFaultTolerantResourceAdaptorContext(

FaultTolerantResourceAdaptorContext<SipActivityHandle, String> context) {

FaultTolerantTimer timer = context.getFaultTolerantTimer();

timer.config(new FaultTolerantTimerTaskFactoryImpl(this), 4);

FaultTolerantTimerTaskDataImpl data = new FaultTolerantTimerTaskDataImpl("xyz");

FaultTolerantTimerTaskImpl task = new FaultTolerantTimerTaskImpl(this, data);

timer.schedule(task, 30, TimeUnit.SECONDS);

}

The standard Resource Adaptor Context provides a java.util.Timer, which can be used by the Resource Adaptor to schedule the execution of tasks

The Fault Tolerant Resource Adaptor Context provides org.mobicents.slee.resource.cluster.FaultTolerantTimer, an alternative scheduler which is able to fail over tasks scheduled.

Interface similar to JDK's ScheduledExecutorService, with a few changes to allow a proper interaction in a cluster environment

3.4 ChildRelation Extension

Extension to JAIN SLEE 1.1, introduces the org.mobicents.slee.ChildRelationExt interface, which extends javax.slee.ChildRelation with methods to create and retrieve SBB entities by name.

package javax.slee;

public interface ChildRelation extends Collection {

public SbbLocalObject create() throws CreateException,

TransactionRequiredLocalException, SLEEException;

}

package javax.slee;

public interface ChildRelation extends Collection {

public SbbLocalObject create() throws CreateException,

TransactionRequiredLocalException, SLEEException;

} package org.mobicents.slee;

public interface ChildRelationExt extends ChildRelation {

public SbbLocalObjectExt create(String name) throws CreateException,

TransactionRequiredLocalException, SLEEException;

public SbbLocalObjectExt get(String name)

throws TransactionRequiredLocalException, SLEEException;

}

package org.mobicents.slee;

public interface ChildRelationExt extends ChildRelation {

public SbbLocalObjectExt create(String name) throws CreateException,

TransactionRequiredLocalException, SLEEException;

public SbbLocalObjectExt get(String name)

throws TransactionRequiredLocalException, SLEEException;

}

3.5 SbbLocalObject Extension Extension to JAIN SLEE 1.1, introduces the

org.mobicents.slee.SbbLocalObjectExt interface, which extends javax.slee.SbbLocalObject with methods to retrieve the parent SBB, if any, and to also retrieve information such as the child name, and the parent child relation name.

public interface SbbLocalObject {

public boolean isIdentical(SbbLocalObject obj)

throws TransactionRequiredLocalException, SLEEException;

public void setSbbPriority(byte priority)

throws TransactionRequiredLocalException,

NoSuchObjectLocalException, SLEEException;

public byte getSbbPriority() throws TransactionRequiredLocalException,

NoSuchObjectLocalException, SLEEException;

public void remove() throws TransactionRequiredLocalException,

TransactionRolledbackLocalException, SLEEException;

}

public interface SbbLocalObject {

public boolean isIdentical(SbbLocalObject obj)

throws TransactionRequiredLocalException, SLEEException;

public void setSbbPriority(byte priority)

throws TransactionRequiredLocalException,

NoSuchObjectLocalException, SLEEException;

public byte getSbbPriority() throws TransactionRequiredLocalException,

NoSuchObjectLocalException, SLEEException;

public void remove() throws TransactionRequiredLocalException,

TransactionRolledbackLocalException, SLEEException;

}

public interface SbbLocalObjectExt extends SbbLocalObject {

public String getChildRelation()

throws TransactionRequiredLocalException, SLEEException;

public String getName() throws NoSuchObjectLocalException,

TransactionRequiredLocalException, SLEEException;

public SbbLocalObjectExt getParent() throws NoSuchObjectLocalException,

TransactionRequiredLocalException, SLEEException;

}

public interface SbbLocalObjectExt extends SbbLocalObject {

public String getChildRelation()

throws TransactionRequiredLocalException, SLEEException;

public String getName() throws NoSuchObjectLocalException,

TransactionRequiredLocalException, SLEEException;

public SbbLocalObjectExt getParent() throws NoSuchObjectLocalException,

TransactionRequiredLocalException, SLEEException;

}

3.6 JDBC Resource Adaptor Allows efficient interaction with JDBC Datasources

Asynchronous execution of JDBC statements, using RA’s own thread pool

Applications provides not only the logic used to interact with JDBC, but also the result SLEE event

… which means that applications become truly event oriented, as everything else in SLEE

// build taskSimpleJdbcTask task = new SimpleJdbcTask() {

@Override public Object executeSimple(JdbcTaskContext context) {

try { Connection connection = context.getConnection(); PreparedStatement preparedStatement = connection .prepareStatement("INSERT INTO TestTable VALUES(?)"); preparedStatement.setString(1, "Mobicents"); return true; } catch (Exception e) { tracer.severe("faile to execute task", e); return false; } }};

// requests execution of the task on the jdbc activity jdbcActivity.execute(task);

// build taskSimpleJdbcTask task = new SimpleJdbcTask() {

@Override public Object executeSimple(JdbcTaskContext context) {

try { Connection connection = context.getConnection(); PreparedStatement preparedStatement = connection .prepareStatement("INSERT INTO TestTable VALUES(?)"); preparedStatement.setString(1, "Mobicents"); return true; } catch (Exception e) { tracer.severe("faile to execute task", e); return false; } }};

// requests execution of the task on the jdbc activity jdbcActivity.execute(task);

public void onSimpleJdbcTaskResultEvent(SimpleJdbcTaskResultEvent event,ActivityContextInterface aci) {

tracer.info("Received a SimpleJdbcTaskResultEvent,” + task = “ + event.getTask() + ", result object = " + event.getResult());

}

public void onSimpleJdbcTaskResultEvent(SimpleJdbcTaskResultEvent event,ActivityContextInterface aci) {

tracer.info("Received a SimpleJdbcTaskResultEvent,” + task = “ + event.getTask() + ", result object = " + event.getResult());

}

3.7 REST Client Application Enabler (1)

Allows SLEE applications to integrate logic for easy interaction with REST web services

Hides the complexity of dealing with HTTP Client Resource Adaptor

Relies on Signpost API to handle OAuth authentication and authorization procedures

3.7 REST Client Application Enabler (2)

/** * Event handler for the service activation event. * @param event * @param aci */public void onServiceStartedEvent(ServiceStartedEvent event,

ActivityContextInterface aci) {tracer.info("Mobicents SLEE REST Client Enabler Example service activation.");try {

RESTClientEnablerChild child = (RESTClientEnablerChild) getChildRelation().create(ChildRelationExt.DEFAULT_CHILD_NAME);

String uri = twitterStatusUpdateBaseURI+ URLEncoder.encode(

"Mobicents SLEE REST Client Application Enabler Example ACTIVATED - "+ new Date(), "UTF-8");

RESTClientEnablerRequest request = new RESTClientEnablerRequest(RESTClientEnablerRequest.Type.POST, uri).setOAuthConsumer(consumer);

child.execute(request);} catch (Exception e) {

tracer.severe("failed to post service activation to twitter", e);}

}

@Overridepublic void onResponse(RESTClientEnablerChildSbbLocalObject child,

RESTClientEnablerResponse response) {

// process the rest service response// …

}

/** * Event handler for the service activation event. * @param event * @param aci */public void onServiceStartedEvent(ServiceStartedEvent event,

ActivityContextInterface aci) {tracer.info("Mobicents SLEE REST Client Enabler Example service activation.");try {

RESTClientEnablerChild child = (RESTClientEnablerChild) getChildRelation().create(ChildRelationExt.DEFAULT_CHILD_NAME);

String uri = twitterStatusUpdateBaseURI+ URLEncoder.encode(

"Mobicents SLEE REST Client Application Enabler Example ACTIVATED - "+ new Date(), "UTF-8");

RESTClientEnablerRequest request = new RESTClientEnablerRequest(RESTClientEnablerRequest.Type.POST, uri).setOAuthConsumer(consumer);

child.execute(request);} catch (Exception e) {

tracer.severe("failed to post service activation to twitter", e);}

}

@Overridepublic void onResponse(RESTClientEnablerChildSbbLocalObject child,

RESTClientEnablerResponse response) {

// process the rest service response// …

}

3.8 EclipSLEE 2.0

Updated Eclipse Plugin for Mobicents JAIN SLEE 2.x, which targets experienced developers too!

Fully supports JAIN SLEE 1.1 Components

EclipSLEE 1.x.y created a mix of SLEE 1.0 and SLEE 1.1 components

Fully supports the Mobicents JAIN SLEE 1.1 Extensions

Create projects using Maven structure as currently used in Mobicents developed components and examples

Easy to integrate the Resource Adaptors and Application Enablers bundled in Mobicents JAIN SLEE distribution

Easy build and deployment/undeployment by using the Eclipse M2 support

3.9 SLEE Management Console The new Web Console, based on the old GWT console lost in

Mobicents JAIN SLEE 1.x

Pre-deployed in Mobicents JAIN SLEE

Much faster and simple interface, compared with JON console

4.1 Roadmap

2.6.0.FINAL (15th Dec 2011)

JSR 309 Resource Adaptor & Demo Application BETA

GWT Management Console

EclipSLEE 2.0 FINAL

Persistent RA Entity Management

SIP JDBC Registrar Example Application

2.7.0.FINAL (31st Mar 2012)

SNMP Monitoring (Traces, Alarms, Usage Stats)

SS7 Demo Application

SS7 CAP Resource Adaptor

2.8.0.FINAL (31st Jun 2012)

Enhanced Sync Cluster Replication

Clustered Usage Stats

XMPP Server Resource Adaptor

4.2 What about 3.x?

AS7 difficult to extend

Distributed mode Memory Caches too “young” (Infinispan, Hazelcast, etc.)

JAIN SLEE specification revision about to begin

Short on SLEE developers

28

Thanks!