1 / 46

Prepared by: Fadi Elfaleet ID:120090687 Supervisor: Dr. Hatem Hamad

ISLAMIC UNIVERSITY OF GAZA Faculty of Engineering (Graduate Studies) Computer Engineering Department Distributed Systems The Glassfish Application Server. Prepared by: Fadi Elfaleet ID:120090687 Supervisor: Dr. Hatem Hamad Monday, August 25, 2014. Outline.

gamma
Download Presentation

Prepared by: Fadi Elfaleet ID:120090687 Supervisor: Dr. Hatem Hamad

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ISLAMIC UNIVERSITY OF GAZAFaculty of Engineering (Graduate Studies)Computer Engineering Department Distributed Systems The Glassfish Application Server Prepared by: Fadi Elfaleet ID:120090687 Supervisor: Dr. HatemHamad Monday, August 25, 2014

  2. Outline • The Glassfish Application Server • Introduction • Application server • What is the main difference between the Application server and web server • Main Features of a Application Servers • Glassfish Server • Introduction • Glassfish Architecture • Glassfish Clustering • Glassfish Mobility • Case Study • Summary

  3. Glassfish Application Server

  4. Introduction • Application servers • An application server, or appserver, is software that typically interfaces one or more databases to convey processed data to and from a user interface. • 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

  5. Three-Tier Architecture

  6. Cont. • What is the difference between an application server and a Web server? • Web server serves pages for viewing in a Web browser, while an application server provides methods that client applications can call. • A Web server exclusively handles HTTP requests, whereas an application server serves business logic to application programs through any number of protocols.

  7. Cont. • Main Features of a Application Servers • Data integrity • Load balancing • Centralised configuration • Security • Code integrity • High performance • Robustness • Scalability

  8. Glassfish Server • What is Glassfish Server • GlassFish is an open source application server project led by Sun Microsystems for the Java EE platform. • Source code released by Sun and Oracle Corporations • GlassFish is free software, dual licensed under two free software licences: • The Common Development and Distribution License (CDDL) • The GNU General Public License (GPL) • It is a highly configurable server that is capable of delivering high quality of service. • It uses a derivative of Apache Tomcat as the servlet container for serving Web content, with an added component called Grizzly which uses Java NIO for scalability and speed.

  9. Cont. • The GlassFish community describes the design goal of GlassFish as: • To make an open, modular, extensible platform • A fast, easy, reliable application server • An enterprise-ready application server with massive scalability and sophisticated administration • Product updates and add-ons through the industry-strength Update Centre 2.0 • Support for OSGi • Support for dynamic languages such as PHP and Groovy • Support for Java EE 6

  10. Cont. • What are the main features of glassfish server? • Fastest open source application server . • Support for: • Java EE • Ruby on Rails • PHP • AJAX • CORBA • Many many different frameworks • Centralized management of clusters and instances distributed across multiple servers. • Grouping • Load-Balancing • Data Replication • Microsoft .NET 3.0 interoperability • Session retention on application redeploy • Call flow analysis for diagnosing performance problems • High performing message queue implementation (Open Message Queue), with a highly available message store. • Complete Web GUI Administration • Integration with NetBeans and Eclipse

  11. Cont. • What are making the technical features the more appealing? • Out-of-the-box experience - Download to "sample app" in 10 minute • Good support on the forums. • Update Center for downloading additional features, samples, blueprints, etc. • Outstanding documentation • Domain structure is nice, easy to upgrade the server and keep your configs in place. • You don't have to be an expert on Glassfish and how its built or designed to get good value out of it. • The other application servers are certainly powerful and flexible architectures, but they expose that complexity to you as a user.

  12. Cont. • Runtime • The GlassFish Application server is designed as a set of modules. • It has no main class for its start up. • It has a bootstrap module that is first loaded by the Class Loader. • The bootstrap module loads other modules that are required. • The bootstrap module does not load all the modules at the start time. • GlassFish uses a concept of service. • These services are classes that implement an interface. • Programmers are encouraged to program on these well-defined services instead of programming with modules.

  13. Glassfish-Architecture Glassfish Architecure

  14. Cont. • Web Based Administration Console • To access the Web Console, point a browser to http://IP_ ADDRESS:PORT/. • By default the port number is 4848 and the listener listens on all available network interfaces of the server machine. • Create JDBC connection pools, JMS destinations, configure listeners and thread pools, some security related Configuration, containers configuration, cluster-wide configuration and management, and so on. • GlassFish uses a separate Virtual Server for Web Console for independent configuration.

  15. Cont. • Command Line Administration Console • This is the preferred approach for experienced administrators who choose to use CLI for administration purposes. • Some tasks like creating/removing/backing up and restoring a domain are only possible using the CLI. • The CLI also enables automation of routine tasks through shell scripts, as well as integration with provisioning tools. • The administration CLI is accessible through the asadmin utility located at gf_home/bin directory. • It is either a batch file named asadmin.bat for Windows or a shell script named asadmin for Linux and UNIX. • The asadmin script has two modes invoking schema, is more suitable for creating custom scripts or for executing only one command

  16. Cont. • Common Administration Tasks in CLI

  17. Cont. • Container pluggability • Containers are the heart of an application server because they are the entities that run an application • Containers are always created as pluggable units, such that they can be installed or removed from the application server. • EJB container in an application server is responsible for running Java EJB applications. • EJB container provides various additional features for Bean developers like security, scalability, client interaction and a messaging service. • An application programmer is only concerned with implementing the business logic.

  18. Cont. • Web Container • Implements the web component contract of the Java EE architecture • This contract specifies a runtime environment for web components that includes security, concurrency, lifecycle management, transaction, deployment, and other services. • Tomcat as an example of web container • Making the application server processing Web requests in a more efficient way and will result in higher throughput. • Factors for Web container performance are: • HTTP listener thread pool attributes( memory consumers, process consumers, IO bound and so on) • File cache support in HTTP Protocol of each HTTP listener. • Disabling the access log. • Disabling monitoring.

  19. Cont. • EJB Container • An Enterprise JavaBeans (EJB) container provides a run-time environment for enterprise beans within the application server. • Affects on performance more than the Web container if deployed applications use EJBs extensively for business logic processing.

  20. Cont. • An application server ideally should be an assembly of modular sub-components. • OSGI: • The OSGi framework is a module system and service platform for the Java programming language that implements a complete and dynamic component model, something that does not exist in standalone Java/VM environments. • Applications or components (coming in the form of bundles for deployment) can be remotely installed, started, stopped, updated and uninstalled without requiring a reboot. • The service registry allows bundles to detect the addition of new services, or the removal of services, and adapt accordingly.

  21. Cont. • The modular subsystem for GlassFish is based upon the Hundred KiloByte Kernel (HK2). • Is based on two technologies: • Modules Subsystem • Is responsible for instantiating various classes to provide application functionality. • Component Model • Is working very closely with Modules Subsystem and it configures the various objects created by the Modules Subsystem • For example, bringing in other objects that are required by the newly created object, providing the newly-created objects to other existing objects, etc.

  22. Cont. • GlassFish architecture with the developer profile • The two essential components of GlassFish • The server instance • The administrative domain

  23. Cont. • Server instances • Server Instance :Is the Java EE server process (the GlassFish application server) that hosts your Java EE applications. • Implements containers for Java EE components, including the web container for web application modules and EJB container for EJB modules. • Provides the capability necessary for enabling client access and resource management. For example, • HTTP capability of the server instance • The server instance hosts enterprise applicationsand resources. • The server instance is fully Java EE compliant • EJB container is always part of the server instance even if none of the deployed applications use EJB modules.

  24. Cont. • Administrative Domains • An administrative domain (or domain) is a group of one or multiple server instances that are administered together. • A server instance always belongs to a single domain, and server instances in a single domain can run on different physical hosts. • Each domain has one domain administration server, and one or multiple server instances. • A domain maintains its own confguration, log files, andapplication deployment areas. • From the administration and confguration perspective, a domain represents a complete GlassFish Server runtime environment, which is responsible for hosting andmanaging applications and resources.

  25. Clustering • Glassfish allows for the clustering of application server instances. • Clusters in an application server enhance scalability and availability • 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 scalable.

  26. Cont. • Node agents, server instances, and clusters can be created at GlassFish installation time. • Clusters and instances are organized into administrative domains, that are characterized by the Domain Administration Server (DAS).

  27. Cont. Domain Administration Architecture

  28. Cont. • An administrative domain is a dual-natured entity: • Used by a developer, it provides a fully featured Java EE process in which to run your applications and services. • Used in a real-world enterprise deployment, it provides a process that is dedicated to configuration and administration of other processes. • Each domain has a Domain Administration Server (DAS) • Managing Java EE Server instances in the domain • The configuration information managed by the DAS is known as the configuration central repository.

  29. Cont. • Each domain process must run on a physical host. • When running, the domain manifests itself as a DAS. • Every server instance must run on a physical host and requires a Java Virtual Machine. • The GlassFish application server must be installed on each machine that runs a server instance. • The DAS delegates the actual life cycle management of each instance to its corresponding node agent. • A node agent is a lightweight process that does not itself run Java EE applications. • Node agent monitors ("watchdogs") the server instances • If a server instance fails, its node agent brings it back up — without requiring administrator or DAS intervention.

  30. Cont. • The administrative infrastructure in the DAS is based on Java Management Extensions (JMX) technology.

  31. Clustering Architecture Clustering Architecture Overview

  32. Cont. • Custom resources, such as enterprise information systems, connect to the load balancer through resource adapters in the Java connector architecture. • All of the transports can be load balanced across the cluster, both for scalability and for fault tolerant strategies implemented by redundant units available upon single-point failure. • High-Availability Application State Repository, an abstraction of session state storage. • The repository stores session state, including HTTP session state and stateful EJB session state • The state information can be stored either by means of memory replication or a database.

  33. Memory Replication in clusters • The memory replication feature takes advantage of the clustering feature of GlassFish to provide most of the advantages of the HADB strategy with much less installation and administrative overhead. • cluster instances are organized in a ring topology. Each member in the ring sends memory state data to the next member in the ring, its replica partner, and receives state data from the previous member. As state data is updated in any member, it is replicated around the ring.

  34. Cont. Typical Cluster Topology

  35. Cont. Typical Cluster Topology with Load Balancer

  36. Glassfish Mobility • GlassFish Mobility Platform supports synchronization of enterprise data between Open Mobile Alliance Data Synchronization (OMA DS) enabled mobile phones and a database system. • The main features of mobility platform are • Based on open industry standards • Highly scalable • Fault-tolerant environment tightly integrated with the existing infrastructure. • Automatic failover • Load-balancing

  37. Cont. • The client Sync App uses the APIs in the client library to communicate with the Gateway Engine Enterprise Connector, and the Sun JCA Adapter. The adapter communicates with the EIS/EAI system.

  38. Glassfish Mobility Architecture • Mobile Client Business Object API • The Mobile Client Business Object (MCBO) API provides an easy-to-use programming interface. • It is provided as a Java ME library that the client application developer can use to develop a Sun GlassFish Mobility Platform Client application. • Enterprise Connector Business Object API • The Enterprise Connector Business Object (ECBO) API provides an easy-to-use programming interface that makes it easy to build Enterprise Connectors. • Glassfish Mobility Platform Gateway • Is the server component that interprets the incoming OMA DS messages and translates them into commands and data for Enterprise Connectors.

  39. Cont. • Sync Database • The sync database contains the tables required by the Sun GlassFish Mobility Platform Gateway to store • Synchronization timestamps for client devices • Mappings between client and server items, user information, configuration information, and synchronization message digest data. • Sun JCA Adapters • Sun JCA Adapters are Java EE Connector Architecture-based resource adapters that read and write data in the native format of specific databases or EIS/EAI systems.

  40. Cont. • Two-Tier Sun GlassFish Mobility Platform Architecture

  41. Glassfish Disadvantage • The use of OSGi in Glassfish is misleading. • Glassfish is using OSGi internally for the server • OSGi is not available to the applications deployed in Glassfish.

  42. Comparison (Glassfish & Jboss) • GlassFish Server provides the ability to centrally manage an HA cluster and load balancer agent configuration out-of-the-box, a feature currently not offered by JBoss. • GlassFish Server supports remote deployment and per-project resource configuration. JBoss does not provide these capabilities. • GlassFish Server provides extensive configuration support (CLI/GUI/Mbeans ) and extensive monitoring support for connection pools. JBoss provides only partial support for these capabilities.

  43. Case Study • The Wotif.com site and its volume are impressive. • Want concurrent traffic? • Australia's No 1 Hotel Booking Site • Rapidly Growing elsewhere • >2.75 million user sessions/month • >10,000 concurrent users • >2m bookings per year • > 10,000 hotels

  44. Cont. • Why Wotif.com chose Glassfish? • Needed to move off Orion • Wanted JEE 5, open source or cheap • Easy to use • Wanted commercial support • Path to the future • Evaluated by doing a small test port of the busiest pages and running it in our performance and stress test environment • Worked Great!

  45. Summary • Production quality • Robust • Scalable • Secure • Has load balancing • Delivers more work with less code • Issue tracking • Service-oriented architecture • Tools integration • Ease of container pluggability

  46. Any Question ???????

More Related