• No results found

GlassFish. Developing an Application Server in Open Source

N/A
N/A
Protected

Academic year: 2021

Share "GlassFish. Developing an Application Server in Open Source"

Copied!
36
0
0

Loading.... (view fulltext now)

Full text

(1)

1

GlassFish

Developing an Application Server in Open Source

Santiago Pericas-Geertsen

Sun Microsystems, Inc.

http://weblogs.java.net/blog/spericas/

[email protected]

(2)

Who am I ?

• BA from ITBA

• MA and PhD from Boston University

• With Sun for over 6 years

• Part of Glassfish team

> Worked on numerous projects: XSLTC (XSLT Compiler in JDK),

JAXP, Fast Web Services, Fast Infoset, JAX-WS, XML Performance, Japex, MEP, ...

(3)

3

Part I - Glassfish

Application Server and Community

(4)

What is GlassFish?

• A Community

> Users, Partners, Testers, Developers, ... > Started in 2005 on java.net

• Application Server (version 2)

> Enterprise Quality and Open Source (CDDL & GPL v2) > Java EE 5 Reference Implementation

> Full Commercial Support from Sun

• Growing organically into other Middleware Areas

• Leverages Sun's experience in other Java, Middleware, SDK

(5)

GlassFish – The Best Open Source Application Server 5

Glassfish Ecosystem

Project GlassFish Derby Open ESB Portal Server MQ Java EE RI & SDK Sun GlassFish Enterprise Server 2.x Java EE RI & SDK

Users and Other Groups

Open Data Sync

(6)

Frameworks and Applications

JSPwiki MyFaces ADF Integration ORB BIRT AJAX Shale Apache Httpd Facelets OSCache SiteMesh StringBeans Portal Tapestry jBPM WebDAV Project Tango OSWorkFlow CJUG-Classifieds MC4J DOJO Quercus PHP SEAM

(7)

GlassFish – The Best Open Source Application Server 7

GlassFish v2 Features

• Java EE 5 compliant

• Metro: .NET 3.0 web services interoperability

• Clustering Architecture

• Support for scripting languages

• Modular and ultra fast web tier

• Seamless IDE and tools integration

> NetBeans, Eclipse, IntelliJ, Ant, Maven

• Support for the latest technologies (e.g., JAX-RS)

(8)

Java EE 5 = (J2EE 1.4).next

• Java EE 5 Theme: Ease of Development

• POJO-based programming

> More freedom, fewer requirements

• Extensive use of annotations

> Reduced need for deployment descriptors > Annotations are the default

• Resource Injection

(9)

GlassFish – The Best Open Source Application Server 9

.NET Interoperability using Metro

• High level web services stack

• Fully interoperable with .NET 3.0

• Security, Reliability and Transactions

(10)

Metro Overview (.NET Interop)

Security

Metro – GlassFish Web Services Stack metro.dev.java.net

JAXB JAXP SAAJ

Transactions Reliability

SOAP

XML Processing Web Services Core

HTTP

. . .

. . .

(11)

GlassFish – The Best Open Source Application Server 11

Clustering Architecture

• Enhances scalability and availability

> Transparent failures

> Ability to add more nodes to cluster

• Runtime view of cluster

> Router/Failover/Load Balancing module > Management module

(12)

C lu st er ed In st an ce s

Clustering Architecture

Node A AS AS Node B AS AS Node C AS AS AS . . .

Message Routing / Failover / Load Balancing

M an ag em en t

HA Application State Repository

(13)

GlassFish – The Best Open Source Application Server 13

Ajax and Scripting Activities

• Dynamic Languages

> glassfish-scripting.dev.java.net

• jMaki - http://ajax.dev.java.net

> Very easily encapsulates Ajax widgets

• DynaFaces - http://jsf-extensions.dev.java.net

(14)

Web Tier

• JSP Container

> 10x perf. improvement in JSP compilation (JSR-199)

• Grizzly

> Easy-to-use, highly scalable and customizable HTTP

Framework

> Based on java.nio

(15)

GlassFish – The Best Open Source Application Server 15

World Record Performance

SpecjAppServer 2004

> July 2007: #1 score on T2000

>883.66 JOPS@Standard for GlassFish v2

>Improved in areas not covered by benchmark

>10% faster than BEA WebLogic

>30% faster than IBM WebSphere 6.1

Sun BEA IBM JBoss 0 100 200 300 400 500 600 700 800 900 SPECjAppServer 2004 Results

?

Disclaimers: SPEC and the benchmark name SPECjAppServer 2004 are registered trademarks of the Standard Performance Evaluation Corporation. Competitive benchmark results stated above reflect results published on www.spec.org as of 11/21/07. The comparison presented is based on GlassFish v2 UR1 run on 6 Sun SPARC Enterprise T5120 (1 chip, 8 cores/chip, 8 threads/core) 1.4GHz 8,439.36 SPECjAppServer2004 JOPS@Standard. For the latest SPECjAppServer 2004 benchmark results, visit http://www.spec.org/.

(16)

GlassFish Adoption

• Millions of downloads

• Dozens of external committers

• Over 8,000 members

• Excellent analyst reviews

(17)

GlassFish – The Best Open Source Application Server 17

Some Adoption Indicators

• 2.5m+ hits in 13 months

• 310k+ different IPs

• 150k registrations in 7 months

(18)
(19)

GlassFish – The Best Open Source Application Server 19

(20)

GlassFish Deployment

(21)

GlassFish – The Best Open Source Application Server 21

(22)

So Why GlassFish?

Java EE 5 (vs. Tomcat, JBoss, Websphere)

Performance! (vs. JBoss)

Administration (vs. JBoss, Tomcat)

Enterprise-ready (vs. JBoss, Tomcat)

Enterprise support (vs. Tomcat)

Ecosystem: OpenSSO, OpenESB, etc...

Community (vs. Weblogic, Websphere)

(23)

GlassFish – The Best Open Source Application Server 23

Reference

• http://glassfish.org • http://blogs.sun.com/theaquarium • http://blogs.sun.com/stories • http://blogs.sun.com/glassfishforbusiness • http://wiki.glassfish.java.net

Fast, Easy & Reliable Modular, Embedable, Extensible

(24)

Part II – Technology

Highlight

(25)

GlassFish – The Best Open Source Application Server 25

Introduction to REST

Give everything an ID

Link things together

Use standard methods (HTTP)

Allow for multiple representations

(26)

Give Everything an ID

• ID is a URI

> http://mycompany.com/customers/corporationX > http://mycompany.com/products/125

(27)

GlassFish – The Best Open Source Application Server 27

Link Things Together

• Customer order #5455

<order self="http://mycompany.com/orders/5455">

<customer ref="http://mycompany.com/customers/corporationX"/> <product ref="http://mycompany.com/products/125"/>

<amount value="3"/> </order>

• New identifiers are created

http://mycompany.com/orders/5455/customer

(28)

Use Standard Methods

Method Purpose

GET

Read, possibly cached

POST

Create without a known ID

PUT

Update or create with a known ID

(29)

GlassFish – The Best Open Source Application Server 29

Multiple Representations

• Offer data in a variety of formats

> XML > JSON > (X)HTML

• Maximize reach

• Support content negotiation

> Accept header

GET /foo

Accept: application/json

> URI-based

(30)

Stateless Communications

• Long lived identifiers

• Avoid sessions

(31)

GlassFish – The Best Open Source Application Server 31

REST using JAX-RS

• Operations such as,

GET http://mycompany.com/orders/5455

PUT http://mycompany.com/customers/corporationX

are mapped to resource class methods

• Mapping is controlled using Java annotations

• Resource classes are deployed as web applications in Glassfish

(32)

Example Using JAX-RS

@Path("orders/{order_id}")

public class OrderResource { @GET

@ProduceMime(“application/xml”) String getOrder(

@PathParam("order_id") String id) {

return “<order> ... </order>”; }

(33)

GlassFish – The Best Open Source Application Server 33

Example Using JAX-RS (contd.)

@GET

@ProduceMime(“application/html”) String getOrderHtml(

@PathParam("order_id") String id) {

return “<html><h1>Order id:” + id + “</h1>...</html>”;

(34)

Example Using JAX-RS (contd.)

@Path(“customer”)

CustomerResource getCustomer(

@PathParam("order_id") String id) {

return new CustomerResource(

getOrder(id).getCustomer()); }

... }

(35)

GlassFish – The Best Open Source Application Server 35

Conclusions

• Glassfish community is growing rapidly

> And you should be part of it!

• World class performance and J2EE 5.0 compliance

• Glassfish v3 already under way

• All the latest technologies including RESTful web services are available in Glassfish and Netbeans

(36)

Thank You

Santiago Pericas-Geertsen

Sun Microsystems, Inc.

References

Related documents

Bitcoin and Liberty reserve has just shown that money laundering can be done in the process of exchange of virtual currency, with or without being realized by people.. This

Although many problems and constraints that may hinder the development of the dairy sector were identified in the area, the interviewed households of both study areas

If immigration is denied, the immigrating island is re-evaluated based on the Kalman filter, and it uses one call of the cost function.. Therefore in option two, two calls of the

electronic document and evidence are given equal value as ordinary documents. These rules are mainly intended to update the existing contract and evidence rules of the country to

In particular on multi(virtual)domain control, management and monitoring, including virtualization services and user oriented control in a federated environment • Pave the

Students desiring admission to the RN-BSN Program apply through Enrollment Services or the Centralized Application Service for Nursing Programs (Nursing CAS) and must meet the

‰ Office furniture for lawyer(s), staff, reception area, file cabinets, conference, room furniture, carpeting and area rugs, book shelves, art work/office decorating needs. ‰

At this point, we have constructed a xed point free action on a separable Hilbert space with a bounded orbit for any countable group containing a surface group.. The same