Learning GlassFish for Tomcat Users



Similar documents
An Oracle White Paper May Ready for Business: Oracle GlassFish Server

Oracle WebLogic Foundation of Oracle Fusion Middleware. Lawrence Manickam Toyork Systems Inc

Introduction to Sun ONE Application Server 7

Migrating Applications From IBM WebSphere to Apache Tomcat

<Insert Picture Here> GlassFish v3 - A Taste of a Next Generation Application Server

Architectural Overview

GlassFish v3. Building an ex tensible modular Java EE application server. Jerome Dochez and Ludovic Champenois Sun Microsystems, Inc.

What Is the Java TM 2 Platform, Enterprise Edition?

CHAPTER 1 - JAVA EE OVERVIEW FOR ADMINISTRATORS

Glassfish Architecture.

GlassFish. Developing an Application Server in Open Source

Oracle WebLogic Server 11g Administration

This training is targeted at System Administrators and developers wanting to understand more about administering a WebLogic instance.

MagDiSoft Web Solutions Office No. 102, Bramha Majestic, NIBM Road Kondhwa, Pune Tel: /

NetBeans IDE Field Guide

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

Operations and Monitoring with Spring

Oracle WebLogic Server 11g: Administration Essentials

Why IBM WebSphere Application Server V8.0?

applications. JBoss Enterprise Application Platform

Learn Oracle WebLogic Server 12c Administration For Middleware Administrators

Project SailFin: Building and Hosting Your Own Communication Server.

IBM WebSphere Server Administration

WebSphere Server Administration Course

Glassfish, JAVA EE, Servlets, JSP, EJB

FileMaker Server 14. FileMaker Server Help

WEBLOGIC ADMINISTRATION

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

The Java EE 6 Platform. Alexis Moussine-Pouchkine GlassFish Team

FileMaker Server 13. FileMaker Server Help

Oracle WebLogic Server

WELCOME TO Open Source Enterprise Architecture

Apache Jakarta Tomcat

White Paper: 1) Architecture Objectives: The primary objective of this architecture is to meet the. 2) Architecture Explanation

Choose an IBM WebSphere Application Server configuration to suit your business needs

ITG Software Engineering

HPC Portal Development Platform with E-Business and HPC Portlets

Blackboard Learn TM, Release 9 Technology Architecture. John Fontaine

Course Description. Course Audience. Course Outline. Course Page - Page 1 of 5

Oracle im Open Source Kontext Abgrenzung GlassFish vs. JBoss und wozu noch WebLogic?

JBS-102: Jboss Application Server Administration. Course Length: 4 days

Case Studies of Running the Platform. NetBeans UML Servlet JSP GlassFish EJB

Workshop for WebLogic introduces new tools in support of Java EE 5.0 standards. The support for Java EE5 includes the following technologies:

Enterprise Applications

Understanding Application Servers

ServletExec TM 6.0 Installation Guide. for Microsoft Internet Information Server SunONE Web Server Sun Java System Web Server and Apache HTTP Server

GlassFish Security. open source community experience distilled. security measures. Secure your GlassFish installation, Web applications,

WebLogic Server 11g Administration Handbook

CHAPTER 2 BACKGROUND AND OBJECTIVE OF PRESENT WORK

WebSphere Training Outline

Chapter 4. Architecture. Table of Contents. J2EE Technology Application Servers. Application Models

2012 LABVANTAGE Solutions, Inc. All Rights Reserved.

OpenAM All-In-One solution to securely manage access to digital enterprise and customer services, anytime and anywhere.

JReport Server Deployment Scenarios

Server-side OSGi with Apache Sling. Felix Meschberger Day Management AG 124

Internet Engineering: Web Application Architecture. Ali Kamandi Sharif University of Technology Fall 2007

Converting Java EE Applications into OSGi Applications

1Z Oracle Weblogic Server 11g: System Administration I. Version: Demo. Page <<1/7>>

Developing modular Java applications

Client-Server Architecture & J2EE Platform Technologies Overview Ahmed K. Ezzat

WebSphere Application Server - Introduction, Monitoring Tools, & Administration

Tomcat 5 New Features

Application Servers - BEA WebLogic. Installing the Application Server

Ruby on Rails in GlassFish Sun Microsystems

SW5706 Application deployment problems

FileMaker Server 11. FileMaker Server Help

enterprise^ IBM WebSphere Application Server v7.0 Security "publishing Secure your WebSphere applications with Java EE and JAAS security standards

How to Build an E-Commerce Application using J2EE. Carol McDonald Code Camp Engineer

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

1z0-102 Q&A. DEMO Version

WebLogic Server: Installation and Configuration

Oracle EXAM - 1Z Oracle Weblogic Server 11g: System Administration I. Buy Full Product.

A Beginners Guide to Fusion Middleware

Version Overview. Business value

Testing and Deploying IBM Rational HATS 8.5 Applications on Apache Geronimo Server 3.1

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

Tuning Your GlassFish Performance Tips. Deep Singh Enterprise Java Performance Team Sun Microsystems, Inc.

WebSphere Product Family Overview

FileMaker Server 15. Getting Started Guide

Contents. Client-server and multi-tier architectures. The Java 2 Enterprise Edition (J2EE) platform

GlassFish Server Open Source Edition 3.1 Quick Start Guide

Java EE 6 development with Eclipse, Netbeans, IntelliJ and GlassFish. Ludovic Champenois Oracle Corporation

Cost Savings with Tcat

Adobe ColdFusion 11 Enterprise Edition

FileMaker Server 12. FileMaker Server Help

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

Intro to Load-Balancing Tomcat with httpd and mod_jk

What can DDS do for You? Learn how dynamic publish-subscribe messaging can improve the flexibility and scalability of your applications.

Apache Tomcat. Load-balancing and Clustering. Mark Thomas, 20 November Pivotal Software, Inc. All rights reserved.

HPC PORTAL DEVELOPMENT PLATFORM

TIBCO Runtime Agent Domain Utility User s Guide Software Release November 2012

Maximum Availability Architecture. Oracle Best Practices For High Availability. Backup and Recovery Scenarios for Oracle WebLogic Server: 10.

Transcription:

Learning GlassFish for Tomcat Users White Paper February 2009 Abstract There is a direct connection between the Web container technology used by developers and the performance and agility of applications. This paper demonstrates the alignments and differentiators between GlassFish and Tomcat, allowing Tomcat users to make an informed decision about which is right for their environment.

Table of Contents Executive Summary... 3 Overview: GlassFish and Tomcat... 3 GlassFish Web Container Advantages vs. Tomcat Web Container... 4 Usability/Productivity... 4 Reliability and Availability... 5 Security... 5 Performance and Scalability... 5 Web Container Feature Alignment: GlassFish and Tomcat... 6 Conclusion... 8 For More Information... 8

3 Executive Summary For Web 2.0 start-ups, application service providers, and ISVs offering dynamic Web based applications, the application is the business and the Web container technology used in the application server can impact business results. The Web container is the part of an app server that manages servlets, JavaServer Pages (JSPs), and other Web-tier components. Web container technology plays a vital role in determining the performance and adaptability of Web-tier software components, so there is a direct connection between the Web container technology used by developers and the performance and agility of applications. Sun asserts that the Web container features of GlassFish application server are far more extensible, modular, easy to use, and adaptable than those of Apache Tomcat while offering comparable performance. With support for clustering, persistence, messaging, and other key features that Tomcat lacks, as well as enterprise-class service and support from Sun and the backing of a large and thriving community, GlassFish is a superior alternative for those who wish to move beyond Web-tier application development. Overview: GlassFish and Tomcat GlassFish is the open source application server delivered by the GlassFish Community, which was originally launched by Sun in 2005. GlassFish v2 has notched nearly nine million downloads and 300,000 product registrations in 2008. The current version, GlassFish v3 Prelude, features an architecture that is modular by default, allows for rapid, iterative Java Web development, and supports dynamic languages. It is an excellent platform for deploying rich Internet applications backed by Java or dynamic languages such as jruby. Sun GlassFish Enterprise Server v2 is a commercially supported, Java Enterprise Edition (EE) 5 compatible offering. The commercial version adds an enterprise-quality app server to the options available to the open source community and builds on the foundation set by Sun Java System AppServer. Tomcat was started at Apache by a group that included Sun and JServ developers; the initial code drop came from Sun. It became the Reference Implementation (RI) for early versions of the Java Servlets and JSP specifications (the RI for the latest specs is GlassFish Server). Tomcat was critical to the early adoption of server-side Java, was available under an open source license, and contributed to the popularity of open source software within enterprise organizations. In general, applications that run on Tomcat will also run unchanged on GlassFish. However, there are important differences between Tomcat and GlassFish that impact application performance and scalability, usability, and developer productivity.

4 It is important to note that while GlassFish is a collection of Java EE containers, one of which is a Web container, Tomcat is just a Web container. This crucial difference creates some key advantages for using GlassFish. Easier migration path. With GlassFish v2 there is a clear, straightforward way to take advantage of technologies such as Enterprise Java Beans (EJBs), the Java Persistence API (JPA), Java Message Service (JMS), and other capabilities. With Tomcat, these technologies must be added piecemeal, one at a time. It is the developer s responsibility to implement the capabilities and make sure it all works and works together. Out-of-the-box support for clustering and failover. GlassFish v2 can provide clustering and sophisticated high-availability capabilities enabling applications to meet stringent, enterprise-class service-level agreements (SLAs). GlassFish v3 Prelude can support clustering via a load balancer but does not yet have a clustering profile. Superior administration/monitoring. GlassFish v2 and v3 Prelude both support centralized administration through a management console and via a Command Line Interface (CLI). GlassFish v2 provides Callflow Monitoring, which enables an application developer or server administrator to determine where an application is spending most of its time. This feature will also be available in GlassFish v3. In addition, third-party vendors can make their software available via the GlassFish Update Center for easy setup on GlassFish. With Tomcat, new software must be configured in a piecemeal fashion. Update Center also provides early access to newer versions of technologies such as EJB 3.1, which allows for bundling EJB in a WAR rather than having to package the application as an EAR file. Support for scripting languages. GlassFish supports or soon will support Ruby/JRuby, Python/Jython, Groovy, PHP, JavaScript/Phobos, Scala, and other languages. GlassFish Web Container Advantages vs. Tomcat Web Container In addition to the overarching advantages of GlassFish compared with Tomcat, there are additional differentiators between GlassFish Web container and Tomcat Web container capabilities. The list below summarizes just a few examples of the advantages. Usability/Productivity The GlassFish Update Center (available in v2 and v3 Prelude) offers developers point-and-click access to additional features that can extend the GlassFish Server. Examples include Open ESB for building loosely coupled applications, and Jersey (JA-RS 1.0) for building RESTful Web Services. The ability to retain sessions across application redeployments (v3 Prelude) is a time saver for developers creating Java Web applications

5 Alternate docroots at the virtual server and Web applications means Web applications no longer need to bundle resources as part of the Web app docroot; they may be shared by other Web applications. For example, common images such as icons no longer need to be packaged together, saving time and effort. Reliability and Availability GlassFish v2 and v3 Prelude provide support for dynamic reconfiguration of virtual servers and HTTP Listeners, with no server restart required. With Tomcat, if you make a change to a resource pool you typically have to restart the app server. GlassFish supports fine-grained associations between virtual servers and HTTP Listeners. A virtual server will receive only those requests that were received on any of the HTTP listeners that were associated with it. This is extremely useful for virtual hosting where one could run multiple Web sites on the same physical server machine. This feature also helps with better hardware resource utilization as compared to running each site on a separate machine. GlassFish v3 Prelude provides superior Comet/AJA Push compared to Tomcat. With Tomcat the developer needs to write a lot of code to get the same Comet functionality provided by GlassFish. Centrally manage high-availability cluster and load balancer agent configuration (v2). Security With virtual server security realms (available in GlassFish v2 and v3 Prelude), you can specify security in a file realm, a database realm, an LDAP realm, etc. Security realms are specified in the domain s configuration and referenced by Web applications with authentication requirements deployed to the domain. It is also possible to reference security realms at the virtual server level, in which case the security realm applies to all Web applications deployed to the virtual server (a Web application may still override the security realm at the virtual server level with its own). This allows a virtual hosting company to enforce homogeneous security requirements for all the web applications hosted by it. GlassFish v2 supports Java Authentication and Authorization JSRs 115 & 196. Various 118N enhancements in GlassFish v2 and v3 Prelude allow for HTTP request encoding detection (configurable in sun-web.xml). Performance and Scalability Default Web module support in v3 Prelude improves performance and reduces start-up times compared with previous versions of GlassFish. High-performance, highly scalable Grizzly connector in v2 and v3 Prelude improves request/response throughput. The lower layers of the Web Tier in Glass- Fish are implemented through the Grizzly Framework (https://grizzly.dev.java.net).

6 The framework is written in Java taking advantage of the NIO APIs (scalable network and file I/O) to provide scalability and is also highly customizable. GlassFish v2 and v3 Prelude include various performance optimizations, such as flattened valve invocation, a modification to the valve architecture that streamlines how each valve gets called, resulting in smaller stack depth and better performance. GlassFish v3 Prelude can support Tomcat-style valves as well. GlassFish now supports JSR 199, the Java Compiler API, for JSP compilations. Preliminary performance measurements show an order of magnitude improvement in raw Javac compilation speed, and a 3.5x improvement in overall execution when running JSP TCK tests. Sun has performed extensive scalability testing to compare the NIO connectors of Tomcat and Glassfish. These tests use a simple servlet to minimize the time spent in the container and measure how many operations/second the various containers can support for increasing numbers of users. For example, at 16,000 users, our benchmark gives these results: GLASSFISH TOMCAT Ops/Second 6988.9 6615.3 Avg. resp time 0.242 0.358 Max resp time 1.519 3.693 90% resp time 0.6 0.75 Full details are available at: http://weblogs.java.net/blog/sdo/archive/2007/05/how_to_test_con.html Web Container Feature Alignment: GlassFish and Tomcat Compounding the advantages of GlassFish Server and GlassFish Web Container over Tomcat, the GlassFish Community has provided support for well-known features of Tomcat within GlassFish. The table below summarizes the Tomcat features that are provided by GlassFish and the additional GlassFish capabilities not currently provided by Tomcat.

7 Feature Tomcat GlassFish v2 GlassFish v3 Prelude Tomcat valves mod_jk support Webdav support CGI support Tomcat bug fixes Java EE certified Servlet 2.5, JSP 2.1 JSF 1.2 Metro Web Services stack (.NET interoperability) jmaki (AJA framework) Jersey/JA-RS 1.0 (RESTful Web Services) Sophisticated Admin console and CLI JM Node Agent and Cluster Management Upgrade Tool Application client container Java Webstart support JDBC Connection Pooling JTA/JTS J2EE Connector Architecture 1.5 Native jruby/rails deployment no need for servlet container Dynamic resizing of jruby Runtime Pool Rapid redeployment maintain session state on redeploy Update Center Verification tools Image Packaging System (IPS) tools Grizzly (Java NIO) Comet (HTTP Push) CORBA Modular architecture based on OSGi Embeddable Server Centralized admin of load balancer plug-in High availability In-memory compilation of JSPs Integration with Identity Manager, Access Manager, Registry Server, and Java Business Integration Superior admin support for clustering and load balancing

8 Conclusion At all levels, GlassFish is simply a better option than Tomcat for developers and companies that want to expand beyond Web-tier applications. GlassFish is a collection of Java EE containers, not just a Web container GlassFish is much more extensible and modular than Tomcat, and can be easily expanded as developers take advantage of capabilities such as messaging, clustering, failover, and session management, and use more features such as EJBs, JMS, JSR, and Web services. GlassFish supports many powerful Web container capabilities that Tomcat does not, and support many of the best-known Tomcat features. The choice of an app server is highly strategic for businesses, and GlassFish has proven to be a superior strategic option for developers of next-generation applications. For More Information For additional details about GlassFish, visit https://glassfish.dev.java.net/ To download GlassFish software, visit http://java.sun.com/javaee/downloads/index.jsp To join the GlassFish Community, visit https://glassfish.dev.java.net/public/devindex.html

Learning GlassFish for Tomcat Users 4150 Network Circle, Santa Clara, CA 95054 USA Phone 1-650-960-1300 or 1-800-555-9SUN (9786) Web sun.com 2008 All rights reserved. Sun, Sun Microsystems, the Sun logo, GlassFish, and Java are trademarks or registered trademarks of in the United States and other countries. Information subject to change without notice. Printed in USA 12/08 553556-0/#K