Migration toMobicents SIP Servlets       Mobicents Summit 2012        Rio de Janeiro, Brazil
● Founded in 2003● Privately held● Operations in 150 countries● Corporate headquarters in Miami, Florida● Technical facili...
Reasons to Migrate● Currently using the old BEAs WebLogic 3.1  ○ JSR116  ○ Old version of JRockit  ○ Bugs, etc.Looking for...
Now to the details of the migration...
Descriptor ChangesBEA is older and sip.xml doctype is from previous spec<!DOCTYPE sip-app     PUBLIC "-//Java Community Pr...
Descriptor Changesweb.xml doctype is from previous spec<!DOCTYPE web-app  PUBLIC "-//Sun Microsystems, Inc.//DTDWeb Applic...
Application code changes● In BEA HTTP sessions are eagerly created  so request.getSession().invalidate() is  required, but...
Database configuration● Add the mysql driver in the server/default/lib directory● JBoss has completely different datasourc...
JBoss 7 datasources● Completely different from JBoss 5  datasource descriptors● Still uses DBCP, but the configuration fil...
BEA IDE projectThe original inphonex project was Eclipse WTPproject with self-contained dependencies andsome BEA dependenc...
Moving to Maven● By far the most difficult task.● Swap the bea sip servlet api jar with the  mobicents sip servlet api jar...
Logging● Three completely different logging  configurations  ○ JBoss AS 5 (log4j xml)  ○ JBoss AS 7 (jboss logging + log4j...
Logging in JBoss 5● In Mobicents STDOUT logging is rendered  only as much as log4j allows, so application  logging was mov...
JBoss AS 7 Logging● Different from the JBoss 5 logging● Centralized configuration● https://community.jboss.  org/wiki/JBos...
How to isolate only the inphonexlogging into separate fileKnow your category and level<category name="com.inphonex">      ...
JRockit vs Hotspot● Most settings are portable between the  JVMs, but JRockit management  configuration is different and i...
JVM optionsHotspot 1.6 anyJAVA_OPTS="-Xms2g -Xmx2g -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=7091...
Management and Monitoring forMobicents● jconsole - JMX monitoring and management and JVM  stats● http://127.0.0.1:8080/jmx...
Management and Monitoring forJRockit and BEA● JRockit Mission Control - glorified jconsole● http://127.0.0.1:7001/console/...
Questions?
Thank you!
Upcoming SlideShare
Loading in …5
×

Mobicents Summit 2012 - Silvano Girardi - InPhonex's migration to Mobicents Sip Servlets

1,192 views
1,059 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,192
On SlideShare
0
From Embeds
0
Number of Embeds
12
Actions
Shares
0
Downloads
12
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Mobicents Summit 2012 - Silvano Girardi - InPhonex's migration to Mobicents Sip Servlets

  1. 1. Migration toMobicents SIP Servlets Mobicents Summit 2012 Rio de Janeiro, Brazil
  2. 2. ● Founded in 2003● Privately held● Operations in 150 countries● Corporate headquarters in Miami, Florida● Technical facilities in Virginia, Brazil, Argentina● Four primary lines of business ● InPhonex Business including ● InPhonex Resale ● InPhonex Personal ● InPhonex Platform Solutions
  3. 3. Reasons to Migrate● Currently using the old BEAs WebLogic 3.1 ○ JSR116 ○ Old version of JRockit ○ Bugs, etc.Looking for alternatives, we wanted a more dynamic solution.● Open Source● Active Maintainers● Active Community● Support● Response time for reported issues● Range of products ○ Mobicents SIP Servlets ○ RestComm ○ Media Server
  4. 4. Now to the details of the migration...
  5. 5. Descriptor ChangesBEA is older and sip.xml doctype is from previous spec<!DOCTYPE sip-app PUBLIC "-//Java Community Process//DTD SIPApplication 1.0//EN" "sip-app_1_0.dtd">● Moved from servlet-mapping to servlet-selection to allow further configuration from the management console● Overall refactoring to avoid having to rely on the BEA JNDI.
  6. 6. Descriptor Changesweb.xml doctype is from previous spec<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTDWeb Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">● Everything else is the same
  7. 7. Application code changes● In BEA HTTP sessions are eagerly created so request.getSession().invalidate() is required, but in JBoss it throws exception because it is lazy-created● Derived sessions are invalidated together in BEA, in Mobicents they continue separately● Change the datasource JNDI lookup code● MAX_LISTENER_RESPONSE_TIME because of long 183s● Can not bind object to session that has been invalidated!!
  8. 8. Database configuration● Add the mysql driver in the server/default/lib directory● JBoss has completely different datasource deployment descriptors and configuration (see route-ds.xml)● BEA connection pooling vs DBCP (overall 90% the same options with different names)● BEA connection load balancing vs mysql JDBC driver built-in load balancing vs JBoss load balancing (large topic)● In the end the mysql driver can do equivalent load balancing of the writes with jdbc:mysql:loadbalance: //host1,host2/database
  9. 9. JBoss 7 datasources● Completely different from JBoss 5 datasource descriptors● Still uses DBCP, but the configuration file syntax is different
  10. 10. BEA IDE projectThe original inphonex project was Eclipse WTPproject with self-contained dependencies andsome BEA dependencies.
  11. 11. Moving to Maven● By far the most difficult task.● Swap the bea sip servlet api jar with the mobicents sip servlet api jar● Hunting down the required dependencies with google● Must use mvn clean war:inplace war:war install to be sure the build is refreshed ○ simply doing war:war caches an older copy sometimes
  12. 12. Logging● Three completely different logging configurations ○ JBoss AS 5 (log4j xml) ○ JBoss AS 7 (jboss logging + log4j behind it) ○ Tomcat (log4j propeties)
  13. 13. Logging in JBoss 5● In Mobicents STDOUT logging is rendered only as much as log4j allows, so application logging was moved to log4j● Log4j configuration entries may need to be added to jboss-log4j.xml for the app● Of course the logging output is completely different than BEA and log4j must be mastered
  14. 14. JBoss AS 7 Logging● Different from the JBoss 5 logging● Centralized configuration● https://community.jboss. org/wiki/JBossAS7Logging● Use admin console at http://127.0.0.1:9990 to make quick edits that take effect immediately ○ Output handlers ○ Categories ○ Levels ○ Somewhat like Oracle/BEA
  15. 15. How to isolate only the inphonexlogging into separate fileKnow your category and level<category name="com.inphonex"> <priority value="DEBUG"/> <appender-ref ref="MY_OWN_APPENDER"/></category>Make sure the appender and root thresholdsallow your level of logging<appender name="MY_OWN_APPENDER" class="org.jboss.logging.appender.DailyRollingFileAppender"> <param name="File" value="/log/inphonex.log"/> <param name="Threshold" value="DEBUG"/>
  16. 16. JRockit vs Hotspot● Most settings are portable between the JVMs, but JRockit management configuration is different and it lacks some diagnostic options● The hotspot parallel garbage collection with incremental CMS seems just as capable as jrockits for the current load● The garbage collection patterns are different
  17. 17. JVM optionsHotspot 1.6 anyJAVA_OPTS="-Xms2g -Xmx2g -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=7091 -Dcom.sun.management.jmxremote.ssl=false-Dcom.sun.management.jmxremote.authenticate=false -XX:+HeapDumpOnOutOfMemoryError -XX:PermSize=128M -XX:MaxPermSize=256M -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000"JRockit R27.4.0-jdk1.5.0_12-server -Xms2048m -Xmx2048m -Xgc:gencon -XXnosystemgc -XXtlasize:min=3k -XXkeeparearatio=0-Xns:40m -Xmanagement:ssl=false,authenticate=false,port=7091 -XXdisableFatSpin -XX:+HeapDumpOnOutOfMemoryError -XX:-UseFatSpin -XX:+HeapDiagnosticsOnOutOfMemoryError(only available in R28, so no luck with those)
  18. 18. Management and Monitoring forMobicents● jconsole - JMX monitoring and management and JVM stats● http://127.0.0.1:8080/jmx-console - same with Web UI● http://127.0.0.1:8080/sip-servlets-management - Sip Servlets specific administration● http://127.0.0.1:8080/admin-console - JBoss global administration Web console● twiddle - command line tool for JMX management● http://127.0.0.1:9990 - JBoss 7 is much more like BEA, can configure the datasources in similar way● JBoss 7 suffers from https://issues.jboss. org/browse/JBAS-7427 ○ many hacks are needed to have a working JMX!
  19. 19. Management and Monitoring forJRockit and BEA● JRockit Mission Control - glorified jconsole● http://127.0.0.1:7001/console/console.portal ○ Unified Web UI for the BEA server, including SIP● Command line ○ Mission control from the command line (jrmc) ○ Application server administration from the command line ○ jrcmd - replaces the Hotspot JDK tools such as jps, jstack and so on
  20. 20. Questions?
  21. 21. Thank you!

×