powering the next generation services with java platform - spark it 2010

48
Powering the Next Generation Services with Java TM Platform Arun Gupta, GlassFish Guy Oracle Corp blogs.sun.com/arungupta, @arungupta

Upload: arun-gupta

Post on 16-May-2015

2.849 views

Category:

Technology


1 download

DESCRIPTION

Powering the Next Generation Services with Java Platform - Spark IT 2010

TRANSCRIPT

Page 1: Powering the Next Generation Services with Java Platform - Spark IT 2010

Powering the Next Generation Services with JavaTM Platform

Arun Gupta, GlassFish GuyOracle Corpblogs.sun.com/arungupta, @arungupta

Page 2: Powering the Next Generation Services with Java Platform - Spark IT 2010

#sparkitIndian Top-10trends ontwitter

Page 3: Powering the Next Generation Services with Java Platform - Spark IT 2010

'95 '96 '97 '98 '99 '00 '01 '02 '03 '04 '05 '06 '07 '08 '09 '10

Java released onwicked.neato.org

JDK 1.0

JDK 1.1

J2SE 1.2

JDK 1.3(Hotspot)

JDK 1.4(NIO)

J2SE 1.5(Generics, Annotation)

JDK 1.6(Rhino, JAX-WS)

J2SE 1.7(Modularity,Dyn Langs,

Coin)

'11

JSP /Servlets

J2EE 1.2

J2EE 1.3(Connectors)

J2EE 1.4(Web Services)

Java EE 5(Ease-of-use)

Java EE 6Jini

JavaCard2.0

JavaFX 1.0

Evolution of Java

Page 4: Powering the Next Generation Services with Java Platform - Spark IT 2010

The Java Eco-System

Digital TVs &Set-Top Boxes

> 2.6 BillionJava Powered

Phones

> 6 BillionJava CardsDeployed

Blu-ray DiscDevices

Multi-FunctionPrinters

850+ KGlassFishDownloadsPer month

850+ MPCs with

Java

$2.8BIn Java

App Servers$3BJava Mobile

Game Market

6.5+ MJava Dev.world wide

> 40.0 Million

250+ MJavaFXruntime

Page 5: Powering the Next Generation Services with Java Platform - Spark IT 2010
Page 6: Powering the Next Generation Services with Java Platform - Spark IT 2010

Standards-based

Page 7: Powering the Next Generation Services with Java Platform - Spark IT 2010

Role specialization: Communication, Enterprise, BPM, Web 2.0, ..

Page 8: Powering the Next Generation Services with Java Platform - Spark IT 2010

Converged Applications

Page 9: Powering the Next Generation Services with Java Platform - Spark IT 2010

Credits: http://scrapetv.com/News/News%20Pages/Business/images-2/one-billion-dollars.jpg

Page 10: Powering the Next Generation Services with Java Platform - Spark IT 2010

Robust

Page 11: Powering the Next Generation Services with Java Platform - Spark IT 2010

http://langpop.com/

Page 12: Powering the Next Generation Services with Java Platform - Spark IT 2010

12

ServiceComposition

Page 13: Powering the Next Generation Services with Java Platform - Spark IT 2010

• Enterprise Service Bus• Service engines: BPEL, Intelligent Event Processing,

XSLT, Data Mashup, Encoding, etc• Wide range of adapters: communications, databases,

EIS, etc.• Very easy to use through Netbeans IDE

Page 14: Powering the Next Generation Services with Java Platform - Spark IT 2010

SOAP Web Services

• High-performance, extensible, easy-to-use Web services stack

• Secure, Reliable and Transactions Web services• Interoperable with .NET• Transport agnostic• Very easy to use through IDEs support• https://metro.dev.java.net/

Page 15: Powering the Next Generation Services with Java Platform - Spark IT 2010
Page 16: Powering the Next Generation Services with Java Platform - Spark IT 2010

RESTful Web Services

• Annotation-driven API to build RESTful Web services> Resources / Methods / Representations

• Rapid creation of RESTful WS from JPA entity classes and patterns

• Generation of JavaScript client stubs• Test client generation for testing RESTful web services• Very easy to use through IDEs support• Jersey, RESTEasy, Restlet, CXF, ...

Page 17: Powering the Next Generation Services with Java Platform - Spark IT 2010

• Standard (JSR 116, 289) for developing and deploying communications applications

• Adds SIP servlet support on top of Java EE / GlassFish• Allows Converged Java EE, SIP applications• Test client generation for testing SIP services.• Very easy to use through IDEs support• https://sailfin.dev.java.net/

SIP Applications

Page 18: Powering the Next Generation Services with Java Platform - Spark IT 2010

Java EE is a monolithOne size fits all

Page 19: Powering the Next Generation Services with Java Platform - Spark IT 2010

Java EE 6 Web Profile 1.0

●Fully functional mid-sized profile● Actively discussed in the Java EE 6 Expert Group and

outside it● Technologies

● Servlets 3.0, JSP 2.2, EL 2.2, Debugging Support for Other Languages 1.0, JSTL 1.2, JSF 2.0, Common Annotations 1.1, EJB 3.1 Lite, JTA 1.1, JPA 2.0, Bean Validation 1.0, Managed Beans 1.0, Interceptors 1.1, Context & Dependency Injection 1.0, Dependency Injection for Java 1.0

Page 20: Powering the Next Generation Services with Java Platform - Spark IT 2010

Extensible

Page 21: Powering the Next Generation Services with Java Platform - Spark IT 2010
Page 22: Powering the Next Generation Services with Java Platform - Spark IT 2010

Java EE 6 Ease-of-use

• More annotations• More POJOs• Less XML

> Optional “web.xml”, “faces-config.xml”

• Simplified packaging

Page 23: Powering the Next Generation Services with Java Platform - Spark IT 2010

Ajax

• Java Server Faces 2.0> Integrated Ajax support> Facelets as templating language

Page 24: Powering the Next Generation Services with Java Platform - Spark IT 2010

Reverse Ajax / Comet

• Comet> Techniques that enable a server to push data to client browsers

through an HTTP open line of communication• Atmosphere: POJO-based portable framework

Page 25: Powering the Next Generation Services with Java Platform - Spark IT 2010

JVM

Page 26: Powering the Next Generation Services with Java Platform - Spark IT 2010
Page 27: Powering the Next Generation Services with Java Platform - Spark IT 2010

Co-hosting Java EE & Dynamic Langs

• GlassFish runs dynamic language applications along side Java EE apps with security, scalability, Java language and APIs benefits.

Page 28: Powering the Next Generation Services with Java Platform - Spark IT 2010

Pluggable Web Framework

JVM

V3 Kernel

Django ...

Jython Container

Grizzly

WSGI

JSF

Web Container

Servlet Spec

Grails ...

GlassFish v3 Modules

Web Framework Interface

GlassFish v3 Modules Java Framework

Ruby Framework

Python Framework

JRuby Container

Rack

Rails Merb ...

Key

Page 29: Powering the Next Generation Services with Java Platform - Spark IT 2010
Page 30: Powering the Next Generation Services with Java Platform - Spark IT 2010

JavaFX Vision

JavaFX is the platform for creating and delivering Rich Internet Applications

across all the screens of your life

JavaFX is Powered by Java

Page 31: Powering the Next Generation Services with Java Platform - Spark IT 2010

Java FX

• http://javafx.com/• Declarative Scripting Language

> Syntax Java-like with shades of JavaScript> For content designers and media engineers

• Facilitates rapid GUI development• Runs on the Java Virtual Machine• Richness of Java development

Page 32: Powering the Next Generation Services with Java Platform - Spark IT 2010

JavaFX Authoring Tool

Page 33: Powering the Next Generation Services with Java Platform - Spark IT 2010
Page 34: Powering the Next Generation Services with Java Platform - Spark IT 2010

Space is big. Really big. You just won’t believe how vastly, hugely, mind bogglingly big it is. I mean, you may think it’s a long way down the road to the chemist, but that’s just peanuts to space.

— Douglas Adams, The Hitchhiker’s Guide to the Galaxy

Page 35: Powering the Next Generation Services with Java Platform - Spark IT 2010

Project Jigsaw

Page 36: Powering the Next Generation Services with Java Platform - Spark IT 2010

JDK 7 #1: Modularity

• Address the “jar hell”• Enables scale down• Improve performance

> Download & Startup Time• Dependencies can now be more clearly defined

Logging NIO

JMXJavaBeans

JNDI

RMI

CORBA

AWT, ...

Applet

JDBC

Page 37: Powering the Next Generation Services with Java Platform - Spark IT 2010

Declaring that a class belongs to a module

module M;package P;

public class Foo { ... }

Defining a module in module-info.java file

module M @1.0 { requires N @2.1; requires L @0.5;}

Page 38: Powering the Next Generation Services with Java Platform - Spark IT 2010

JDK 7 #2: Multi-Lingual VM

• InvokeDynamic / JSR 292• New bytecode for Dynamic languages• 2-3x more efficient code generation

Page 39: Powering the Next Generation Services with Java Platform - Spark IT 2010

JDK 7 - Other Key Features

• G1 GC: Lower pause times & better predictability• Project Lambda (aka Closures)• NIO.2: File system & Asynchronous APIs

> Directory search, Symbolic Links, Listen to changes in file system

• Some change ...

Page 40: Powering the Next Generation Services with Java Platform - Spark IT 2010

Credits: http://www.flickr.com/photos/joeshlabotnik/2143212474/

JDK 7 #3: Project Coin

Page 41: Powering the Next Generation Services with Java Platform - Spark IT 2010

Collection of Literals

final List<Integer> piDigits = Collections.unmodifiableList(Arrays.asList( 3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 9 ));

final List<Integer> piDigits = [3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 9];

final Set<Integer> primes = { 2, 7, 31, 127, 8191, 131071, 524287 };

Page 42: Powering the Next Generation Services with Java Platform - Spark IT 2010

String in “switch” statements

String s = ...switch(s) { case "foo": processFoo(s); break;}

Page 43: Powering the Next Generation Services with Java Platform - Spark IT 2010

String in “switch” statements

String s = ...switch(s) { case "quux": processQuux(s); // fall-through

case "foo": case "bar": processFooOrBar(s); break;

case "baz": processBaz(s); // fall-through

default: processDefault(s); break;}

Page 44: Powering the Next Generation Services with Java Platform - Spark IT 2010

Automatic Resource Management

static String readFirstLineFromFile(String path) throws IOException { BufferedReader br = new BufferedReader(new FileReader(path)); try { return br.readLine(); } finally { br.close(); } }

static String readFirstLineFromFile2(String path) throws IOException { try (BufferedReader br = new BufferedReader(new FileReader(path)) { return br.readLine(); } }

Page 45: Powering the Next Generation Services with Java Platform - Spark IT 2010

Improved Type Inference forGeneric Instance CreationMap<String, List<String>> anagrams = new HashMap<String, List<String>>();

Map<String, List<String>> anagrams = new HashMap<>();

Page 46: Powering the Next Generation Services with Java Platform - Spark IT 2010

NetBeans 6.9

• Visual JavaFX GUI Editing• JDK 7• Spring 3• Zend and CakePHP• Improved productivity with Java EE 6• . . .

http://wiki.netbeans.org/NetBeans_69

Page 47: Powering the Next Generation Services with Java Platform - Spark IT 2010

Development

• Team collaboration> Presence> Chat> Continuous integration> Issue Tracking> Team Member Status Resources

• Cloud Plug-In• Web on Web• . . .

Page 48: Powering the Next Generation Services with Java Platform - Spark IT 2010

Powering the Next Generation Services with JavaTM Platform

Arun Gupta, GlassFish GuyOracle Corpblogs.sun.com/arungupta, @arungupta

48