210 likes | 513 Views
The Glassfish Application Server. Carlton Northern CS775 4/22/08. Overview. Introduction Application Servers 101 Web Application Demo Glassfish Features Netbeans and Glassfish Integration Demo Glassfish Web GUI Administration Demo Questions References. Introduction.
E N D
The Glassfish Application Server Carlton Northern CS775 4/22/08
Overview • Introduction • Application Servers 101 • Web Application Demo • Glassfish Features • Netbeans and Glassfish Integration Demo • Glassfish Web GUI Administration Demo • Questions • References
Introduction • Glassfish is an open-source, Java Enterprise Edition (EE) compliant application server. • The Sun Java System Application Server is Sun’s commercial offering of Glassfish. • Glassfish V1 is the reference implementation of J2EE 1.4. • Glassfish V2 is the reference implementation of Java EE 5 (in other words J2EE 1.5). • But what is an application server?
Application Servers 101 • Application servers deliver applications to client-computers through HTTP. • They differ from web servers in their extensive use of server-side dynamic content and integration with databases. • Typically, application servers perform the business logic and data access for web applications. • Example: Apache Tomcat, JBOSS
Three-Tier Architecture • http://en.wikipedia.org/wiki/Image:Overview_of_a_three-tier_application.png
Why Use an Application Server? • Question: Web servers can perform all the functionality of a an application server through extensions like Apache Axis, so why are application servers necessary? • Answer: Application servers provide the necessary abstraction and decoupling from web servers to allow for greater interoperability and portability. • App servers have standard ways to communicate to web servers, called servlets. • App servers use containers to deploy applications.
Web App Deployment Demo • http://localhost:8080/LastFlickrGWT/
Glassfish Features • Support for: • Java EE • Ruby on Rails • PHP • AJAX • Metro (a web services stack) • CORBA • Many many different frameworks • Multiple levels of use. • Clustering • Grouping • Load-Balancing • Data Replication • Complete Web GUI Administration • Integration with NetBeans and Eclipse
Multiple Level Use • Glassfish separates functionality so that the user only uses what is needed. • Each profile builds upon the functionality of the previous. • Developer profile used for development of applications. • Enterprise profile used for deployment and high availability of applications without cluster support. • Cluster profile used for clustering support.
Clustering • Glassfish allows for the clustering of application server instances. • Instances can be on the same or different machines. • A cluster provides a runtime environment in which one or more Java EE applications can be run. • Clusters provide high availability by using failover and load-balancing. • Server instances can be added to a cluster, even while the application is running making clustering extremely scalable.
High Availability • The High Availability feature in Glassfish provides 99.999% availability for applications. • High Availability is offered through: • High Availability Session Persistence • High Availability Message Service • RMI-IIOP Load-Balancing and Failover
High Availability Session Persistence • Provides high availability of HTTP requests and session data. • Useful for mission critical web applications like shopping carts. • Provides this through: • In-memory replication of state data on other servers in the cluster • Using High Availability Database (HADB) (outside of scope of this presentation)
In-memory Replication of Session Data • Replicates HTTP session data and stateful session beans (SFSBs) in the memory of server instances on other machines. • Allows for preserving the state of an application over server failures. • This requires the Group Management Service (GMS) • GMS allows for notification of failures in a group and can take action.
High Availability Java Message Service (JMS) • JMS is an API that allow Java EE applications to create, send, receive and read messages. • JMS allows message delivery semantics like once and only once delivery and also message ordering. • JMS is made highly available through connection pooling, failover and clustering. • Connection pooling is the act of caching frequently used connections to a service rather than discarding them after each use. • JMS instances are clustered in a peer-to-peer relationship utilizing a common data store (HADB). • These clusters utilize GMS and therefore can take advantage of failover.
Netbeans Glassfish Integration • Demonstration in Netbeans
Web GUI Administration Demo • http://localhost:4848/
Questions • Q&A
References • http://docs.sun.com/app/docs/coll/1343.5 • http://en.wikipedia.org/wiki/Three-tier_(computing) • https://glassfish.dev.java.net/ • http://www.netbeans.org/