SlideShare una empresa de Scribd logo
1 de 53
Java EE 7 –
Embracing the Cloud and HTML 5
-AmitNaik
JavaOne 2012
About Me

          Principal Engineer with the R&D Incubation & Innovation Lab at BMC
          Software, Pune.
          Work on emerging technologies such as Cloud Computing and
          Monitoring, Big Data Analysis, Mobile Architectures, UI frameworks
          Systems management & Monitoring background
          Experience architecting and building performant and scalable
          enterprise solutions across a variety of domains
          Working (& playing) with Java from 1997



© Copyright 5/4/2012 BMC Software, Inc                                         2
Agenda

           Current “buzz”
           Java EE 7 – Overview
           HTML 5 Features
           Cloud Features
           Wrap-up and Q&A


© Copyright 5/4/2012 BMC Software, Inc   3
Current Buzz – Developer Edition

           Simplification of Tool set (& Polyglotism)
           BIG Data
           HTML 5
           Cloud


© Copyright 5/4/2012 BMC Software, Inc                  4
Simplification & Polyglotism
          Developers demand less boiler plate code
          The best tool that fits the task – Polyglotism!




© Copyright 5/4/2012 BMC Software, Inc                      5
JVM is a durable and popular platform

          The JVM itself has become a key part of many language strategies!




         “invokedynamic” introduced in Java SE 7 as a JVM level feature to better support dynamic
         languages
         Project Coin – Simplify and add some better syntactic constructs
                   Multi-catch
                   try-with-resources
                   Strings in Switch
                   Etc…



© Copyright 5/4/2012 BMC Software, Inc                                                          6
The Challenge of Big Data
                                         Webscale Data
                                         Terrabytes/day
                                         Tweets
                                         Geo Check-ins
                                         Web logs
                                         Social Data
                                         Atmospheric data
                                         Etc, Etc


© Copyright 5/4/2012 BMC Software, Inc                    7
Java to the Rescue (with help from Web 2.0 frameworks)

                                         Java has become the popular
                                           language of choice for
                                           implementation for many big
                                           data frameworks
                                           Apache Hadoop has become a very popular
                                           Java based implementation of the Map-
                                           Reduce Paradigm
                                           Multiple distributions of Hadoop (Cloudera,
                                           DataMeer, HortonWorks)
                                           Cassandra – Highly Available DB engine
                                           written in Java (Facebook)
                                           Column oriented “NoSQL” DB

© Copyright 5/4/2012 BMC Software, Inc                                                   8
Java EE 7 – Cloud & HTML 5

   Java EE 7 and further releases to address:
     - HTML 5
     - Cloud




© Copyright 5/4/2012 BMC Software, Inc          9
Java Enterprise Edition - Progression




© Copyright 5/4/2012 BMC Software, Inc   10
Java EE 7 - Overview

          Java SE 7 (Dolphin) released June-July 2011 -
          Java EE 7 to follow
   JSR 342: Umbrella JSR for Java EE 7
     Q3 2012 Public Review
          Q4 2012 Proposed Final Draft
          Q1 2013 Final Release (Pushed back from Q3
          2012)
© Copyright 5/4/2012 BMC Software, Inc                    11
Java EE 7 Overview - JSRs




© Copyright 5/4/2012 BMC Software, Inc   12
Four Key aspects

           Java EE 7 has a lot of JSRs!
           Already covered topics:
           - JSR 343: What's Coming in Java Message
             Service 2.0
           - Java API for JSON
           - JAX-RS 2.0: What's in JSR 339?
           - Enterprise JavaBeans Technology 3.2
           - Java Persistence API 2.1
© Copyright 5/4/2012 BMC Software, Inc                13
Focus of the presentation

   We will look at four key areas:
    - JSF enhancements HTML 5 – JSF 2.0 & 2.2
    - HTML 5 WebSockets – (JSR 356)
    - Concurrency Utils. for EE (JSR 236)
    - Cloud – Multiple JSRs




© Copyright 5/4/2012 BMC Software, Inc          14
JEE 7 and HTML 5
                                               JSF
© Copyright 5/4/2012 BMC Software, Inc                      15
HTML 5 – Future of Web Markup




© Copyright 5/4/2012 BMC Software, Inc   16
HTML 5 Features: HTML Elements

                                         HTML4                  HTML5




        Semantic elements for Structure
        <header>, <nav>, <article>, <section>, <aside>, <footer>, etc
        Cleaner Source – no more “div craziness”

© Copyright 5/4/2012 BMC Software, Inc                                  17
HTML 5 Elements: Audio & Video
          Audio Today
           -    Most audio played through flash plug-in
           -    Not all browsers have same plug-ins (& security risks)
          <audio> element:
           -    Standard way to include audio: sound files or audio stream
           -    3 supported formats: Ogg Vorbis, MP3, Wav (browsers may support subset)
          Usage example:
          <audio controls="controls">
               <source src="song.ogg" type="audio/ogg">
               <source src="song.mp3" type="audio/mpeg">
          </audio>
          Specify multiple audio file formats: browser will use first recognized format
          “controls” attribute: adds “play”, “pause”, and “volume” controls

© Copyright 5/4/2012 BMC Software, Inc                                                    18
Java EE 7 - Web Tier support

           HTML5 support
           Web socket support
           Standard JSON API
           NIO.2-based web container


© Copyright 5/4/2012 BMC Software, Inc   19
JSF Composite Components

          Truly Reusable component
          Turns page markup into a JSF UI component with attached validators,
          converters, listeners
   <html xmlns=http://www/w3/org/1999/xhtml
     xmlns:h=http://java.sun.com/jsf/html
     xmlns:f=http://java.sun.com/jsf/core
     xmlns:my=”http://java.sun.com/jsf/composite/comp”>
   …………….
   <my:out value=”yes”/>
   On disk:
   <context root>/resources/comp/out.xhtml>
          JSF Composite components can leverage the HTML 5 JavaScript API!
© Copyright 5/4/2012 BMC Software, Inc                                       20
JSF support – HTML 5 with composite components
   <html... xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h=http://java.sun.com/jsf/html
      xmlns:f="http://java.sun.com/jsf/core" xmlns:cc="http://java.sun.com/jsf/composite">

   <h:head> ... </h:head> …
   <h:body>
      <cc:interface>
              <cc:attribute name=”src” required=”true” ”/>
              <cc:attribute name=”controls” required=”false” />
      </cc:interface>
   <cc:implementation>
   <h:outputScript library=”js” name=”audio.js” target=”head”/>
   <audio src="#{cc.attrs.src}" controls="#{cc.attrs.controls}"></audio>
   <input type=”button” value=”Play” onclick=”play()”/>
   <input type=”button” value=”Pause” onclick=”pause()”/>
   </cc:implementation>
   </h:body>




© Copyright 5/4/2012 BMC Software, Inc                                                         21
JSF support – HTML 5 with composite components
     audio.js:
   function play() {
   var audio = document.getElementsByTagName("audio")[0];
   audio.play();
   var display =
     document.getElementsByTagName("input")[0];
   display.value = audio.src; }

   function pause() {
   var audio = document.getElementsByTagName("audio")[0];
   audio.pause(); }

© Copyright 5/4/2012 BMC Software, Inc                  22
JSF Support for HTML 5 to be enhanced

   JSF 2.2 enhancements for HTML5 support
           -    Semantic tags, browser feature detection
           -    Use of HTML5 by components
           -    Audio and Video usage enhancements
           JSR-276 (tool support)
           Mobile renderkits
          Page resolver and application context manager
          API
© Copyright 5/4/2012 BMC Software, Inc                     23
JEE 7 and HTML 5
                                           WebSockets
© Copyright 5/4/2012 BMC Software, Inc                      24
WebSocket – Bidirectional TCP
          Way for multiplexing bi-directional, full-duplex communications channels
          over a single TCP connection
          Real-time, bidirectional web communication with low overhead (compared
          to technologies such as COMET)
          Standardized way for the server to send content to the browser without
          being solicited by the client
          TCP port 80 – no need for additional firewall port rules
          TCP based, uses HTTP 'handshake' to initiate & terminate WebSocket session
          Defines two new URI schemes -
          ws: and wss: for unencrypted and encrypted connections
          Supported Chrome 16, Firefox 11 and Internet Explorer 10
          Blessed by IETF – Tracked by RFC 6455
© Copyright 5/4/2012 BMC Software, Inc                                            25
WebSocket – HTTP connection Handshake

          Client Request:
   GET /mychat HTTP/1.1
   Host: server.example.com
   Upgrade: websocket
   Connection: Upgrade
   Sec-WebSocket-Key: x3JJHMbDL1EzLkh9GBhXDw==
   Sec-WebSocket-Protocol: chat
   Sec-WebSocket-Version: 13

          Server response:
   HTTP/1.1 101 Switching Protocols
   Upgrade: websocket
   Connection: Upgrade Sec-WebSocket-Accept:
   HSmrc0sMlYUkAGmm5OPpG2HaGWk=
   Sec-WebSocket-Protocol: chat

© Copyright 5/4/2012 BMC Software, Inc           26
Java API for WebSocket support JSR – JSR 356

          Creating components to handle bi-directional WebSocket
          conversations
          Initiating and intercepting WebSocket events
          Creation and consumption of WebSocket text and binary messages
          Abililty to define WebSocket protocols & content models
          Configuration and management of WebSocket sessions,
           -    timeouts,
           -    retries,
           -    connection pooling
          Define how WebSocket applications within Java EE security model
© Copyright 5/4/2012 BMC Software, Inc                                      27
Web Socket Sample (w/Grizzly WebSocket API)

   public class ChatApplication extends WebSocketApplication<ChatWebSocket>
   {
   protected ChatWebSocket createWebSocket(Connection c,
   ServerWebSocketMeta m)
   { return new ChatWebSocket(c, m, this); }

   public void onMessage(ChatWebSocket s, DataFrame frame) {
   String msg = frame.getAsText();
   s.sendJson(s.getUser(), msg);
   }

   public void onClose(ChatWebSocket s)
   { s.sendJson(“system”, s.getUser() + “ left the chat”); }
   }



© Copyright 5/4/2012 BMC Software, Inc                                    28
Concurrency Utils for Managed
                             code

© Copyright 5/4/2012 BMC Software, Inc           29
Concurrency Utils – not for managed code!

          Java.util.concurrent is a great set of libraries for
          managing concurrent executions – makes writing
          multi-threaded code (somewhat) simple
          Cannot (should not) be used in managed
          environments!
          Server containers provide runtime support for Java EE
          application components (Servlets and EJBs)
          Layer between the App code and Platform resources
          Multi-threaded code is discouraged in “Managed”
© Copyright 5/4/2012 BMC Software, Inc                            30
Managed Code unfriendly APIs

           java.util.Timer
           java.lang.Thread
           java.util.concurrent.ExecutorService
           ThreadPoolExecutor
           ….


© Copyright 5/4/2012 BMC Software, Inc            31
javax.enterprise.concurrent for Managed code

           JSR 236: Concurrency Utilities for Java EE
           Created in 2003 Inactive till now
           Getting a Reboot now!
           Q4 2012: Release Public Review Draft
           Q1 2013: Final Release
           On-Track for Java EE 7
© Copyright 5/4/2012 BMC Software, Inc                  32
Preview of javax.enterprise.concurrent (JSR 236)

          ManagedExecutorService - Manageable version of a ExecutorService.
          ManagedScheduledExecutorService - Manageable version of a
          ScheduledExecutorService.
          ManagedTaskListener - ManagedTaskListener is used to monitor the
          state of a task's Future.
          ManagedThreadFactory - Manageable version of a ThreadFactory
          Etc…




© Copyright 5/4/2012 BMC Software, Inc                                   33
JEE 7 and Cloud


© Copyright 5/4/2012 BMC Software, Inc                     34
Cloud Introduction - Simple Cloud Model




© Copyright 5/4/2012 BMC Software, Inc    35
Cloud Introduction

          Service Delivery Models
           -    IaaS – Infrastructure as a Service – Amazon EC2, Rackspace
           -    PaaS – Platform as a Service – CloudFoundry, Heroku,
                Force.com, Google Apps, Amazon Beanstalk
           -    SaaS – Software as a Service – SalesForce, Workday
          Ownership/Deployment Flavors
           -    Public
           -    Private
           -    Hybrid
           -    Community
© Copyright 5/4/2012 BMC Software, Inc                                       36
Service Delivery Models

           IaaS
           Platform as a Service (PaaS)
           - Deploy customer created/acquired apps
           - Using languages and tools supported by PaaS
             Provider
           - No control of underlying cloud infrastructure
           - Control over deployed applications, hosting
             env. Configuration for owned apps
© Copyright 5/4/2012 BMC Software, Inc                       37
Cloud Offerings are vendor specific
          Taxonomies, APIs, Service Levels, Interconnections, etc are varied
          In the IaaS space: AWS is emerging as a de-facto standard (API adopted by
          Eucalyptus, CloudStack etc)




            In the PaaS space: Number
            of providers springing up
            that can provide support for
            Java Applications and
            services

© Copyright 5/4/2012 BMC Software, Inc                                                38
No Standards yet!




© Copyright 5/4/2012 BMC Software, Inc   39
Needs of a PaaS Ready app

          Application as a whole need to be versioned
          Multiple versions can coexist
          Must deal with data versioning, upgrades, etc.
          Need ability to specify QoS properties
          Apps both expose and connect to services simultaneously
          Tighter requirements for resource and state
          management
          Better isolation between applications
© Copyright 5/4/2012 BMC Software, Inc                         40
Less control over underlying services




© Copyright 5/4/2012 BMC Software, Inc   41
Java EE 7 Cloud Focus: Platform as a Service
          Next logical step for Java EE
          Java EE 7 : Evolves from Providing Services to Being one
          Define new platform roles to accommodate PaaS model
          Services become First Class citizens
          Add metadata
           - For service provisioning and configuration
           - For QoS, Elasticity
           - For sharing of applications and resources
           - For (re)configurability and customization
          Add useful APIs for cloud environment
           - JAX-RS client API, Caching API, State Management, JSON,…
          Extend existing APIs with support for multi-tenancy

© Copyright 5/4/2012 BMC Software, Inc                                  42
New PaaS Roles in Java EE 7

          PaaS Product Vendor
          PaaS Provider
          PaaS Account Manager
          PaaS Customer
          Application Submitter
          Application Administrator
          End-User
© Copyright 5/4/2012 BMC Software, Inc   43
Multi-tenancy in Java EE 7
          Support for separate isolated instances of the same
          app for different tenants
          - One application instance per tenant
          - Tenants correspond to units of isolation
          - Multitenant apps are declared as such
          - Each instance customized and deployed for a
            single tenant
          Mapping to tenant done by the container
          Tenant id available to application
          - E.g., under java:comp/tenantId or by injection

© Copyright 5/4/2012 BMC Software, Inc                     44
Multi-Tenancy Illustration

          Goal: Simple configuration
          Flexible tenant discriminator support
          Other areas impacted - JNDI, JMS, EJB …




© Copyright 5/4/2012 BMC Software, Inc              45
PaaS Impact on deployment – Traditional Deployment




© Copyright 5/4/2012 BMC Software, Inc               46
PaaS Impact on deployment – Cloud Deployment




© Copyright 5/4/2012 BMC Software, Inc         47
Wrap-up

          Java EE 7 is going to be a major step forward
          HTML 5 support being added incrementally thru
          number of JSRs
          Embracing the Cloud and focusing on PaaS space
          JVM continues to be a very popular part of
          Java Ecosystem
          Exciting times ahead!
           -    Modularity (Project Jigsaw), Closures, etc
© Copyright 5/4/2012 BMC Software, Inc                       48
Contact – Amit Naik




© Copyright 5/4/2012 BMC Software, Inc   49
Q&A




© Copyright 5/4/2012 BMC Software, Inc   50
References

          http://www.infoq.com/articles/twitter-java-use
          http://cloudopsmanagement.wordpress.com/2011/06/02/open-
          source-engine-powering-the-next-gen-cloud-stack-part-1/
          http://en.wikipedia.org/wiki/HTML5
          http://www.slideshare.net/keilw/java-ee-7-the-voyage-of-the-
          cloud-treader
          http://en.wikipedia.org/wiki/WebSocket
          http://www.rfc-editor.org/rfc/rfc6455.txt
          http://xkcd.com/927/

© Copyright 5/4/2012 BMC Software, Inc                              51
Learn more at www.bmc.com
© Copyright 5/4/2012 BMC Software, Inc                               52
Back-up Slides




© Copyright 5/4/2012 BMC Software, Inc   53

Más contenido relacionado

La actualidad más candente

Real world java_ee_patterns
Real world java_ee_patternsReal world java_ee_patterns
Real world java_ee_patterns
Alassane Diallo
 
[S lide] java_sig-spring-framework
[S lide] java_sig-spring-framework[S lide] java_sig-spring-framework
[S lide] java_sig-spring-framework
ptlong96
 

La actualidad más candente (20)

Designing JEE Application Structure
Designing JEE Application StructureDesigning JEE Application Structure
Designing JEE Application Structure
 
Jboss
JbossJboss
Jboss
 
Next-Generation Enterprise Application Development with SpringSource dm Serve...
Next-Generation Enterprise Application Development with SpringSource dm Serve...Next-Generation Enterprise Application Development with SpringSource dm Serve...
Next-Generation Enterprise Application Development with SpringSource dm Serve...
 
WebLogic 12c Developer Deep Dive at Oracle Develop India 2012
WebLogic 12c Developer Deep Dive at Oracle Develop India 2012WebLogic 12c Developer Deep Dive at Oracle Develop India 2012
WebLogic 12c Developer Deep Dive at Oracle Develop India 2012
 
Java Enterprise Edition 6 Overview
Java Enterprise Edition 6 OverviewJava Enterprise Edition 6 Overview
Java Enterprise Edition 6 Overview
 
Introducing WebLogic 12c OTN Tour 2012
Introducing WebLogic 12c OTN Tour 2012Introducing WebLogic 12c OTN Tour 2012
Introducing WebLogic 12c OTN Tour 2012
 
1812 icap-v1.3 0430
1812 icap-v1.3 04301812 icap-v1.3 0430
1812 icap-v1.3 0430
 
The Java EE 7 Platform: Developing for the Cloud (FISL 12)
The Java EE 7 Platform: Developing for the Cloud  (FISL 12)The Java EE 7 Platform: Developing for the Cloud  (FISL 12)
The Java EE 7 Platform: Developing for the Cloud (FISL 12)
 
Liberty dynacache ffw_iea_ste
Liberty dynacache ffw_iea_steLiberty dynacache ffw_iea_ste
Liberty dynacache ffw_iea_ste
 
Creating Quick and Powerful Web applications with Oracle, GlassFish and NetBe...
Creating Quick and Powerful Web applications with Oracle, GlassFish and NetBe...Creating Quick and Powerful Web applications with Oracle, GlassFish and NetBe...
Creating Quick and Powerful Web applications with Oracle, GlassFish and NetBe...
 
Real world java_ee_patterns
Real world java_ee_patternsReal world java_ee_patterns
Real world java_ee_patterns
 
Soccnx III - IBM Connections 3.0.1 Integration with Sametime
Soccnx III  - IBM Connections 3.0.1 Integration with SametimeSoccnx III  - IBM Connections 3.0.1 Integration with Sametime
Soccnx III - IBM Connections 3.0.1 Integration with Sametime
 
JavaOne Update zur Java Plattform
JavaOne Update zur Java PlattformJavaOne Update zur Java Plattform
JavaOne Update zur Java Plattform
 
JavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFacesJavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFaces
 
[S lide] java_sig-spring-framework
[S lide] java_sig-spring-framework[S lide] java_sig-spring-framework
[S lide] java_sig-spring-framework
 
Websphere Portal
Websphere PortalWebsphere Portal
Websphere Portal
 
Hints and Tips for Modularizing Existing Enterprise Applications (OSGi Commun...
Hints and Tips for Modularizing Existing Enterprise Applications (OSGi Commun...Hints and Tips for Modularizing Existing Enterprise Applications (OSGi Commun...
Hints and Tips for Modularizing Existing Enterprise Applications (OSGi Commun...
 
Sail Fin Webinar Overview
Sail Fin Webinar OverviewSail Fin Webinar Overview
Sail Fin Webinar Overview
 
Magic Quadrant for On-Premises Application Platforms
Magic Quadrant for On-Premises Application PlatformsMagic Quadrant for On-Premises Application Platforms
Magic Quadrant for On-Premises Application Platforms
 
JBOSS Training
JBOSS Training JBOSS Training
JBOSS Training
 

Similar a Java EE 7 - Embracing the Cloud and HTML 5

10 Tips for Java EE 7 with PrimeFaces - JavaOne 2013
10 Tips for Java EE 7 with PrimeFaces - JavaOne 201310 Tips for Java EE 7 with PrimeFaces - JavaOne 2013
10 Tips for Java EE 7 with PrimeFaces - JavaOne 2013
Martin Fousek
 
Web Logic Jboss Final
Web Logic Jboss FinalWeb Logic Jboss Final
Web Logic Jboss Final
Mohamed Atef
 
Os Henrikson
Os HenriksonOs Henrikson
Os Henrikson
oscon2007
 
Meteor - Codemotion Rome 2015
Meteor - Codemotion Rome 2015Meteor - Codemotion Rome 2015
Meteor - Codemotion Rome 2015
Codemotion
 
OpenCms Days 2012 - OpenCms 8 as a JSR-286 compliant portlet server
OpenCms Days 2012 - OpenCms 8 as a JSR-286 compliant portlet serverOpenCms Days 2012 - OpenCms 8 as a JSR-286 compliant portlet server
OpenCms Days 2012 - OpenCms 8 as a JSR-286 compliant portlet server
Alkacon Software GmbH & Co. KG
 
Dennis Povshedny.Mediamosa intro.DrupalCamp Kyiv 2011
Dennis Povshedny.Mediamosa intro.DrupalCamp Kyiv 2011Dennis Povshedny.Mediamosa intro.DrupalCamp Kyiv 2011
Dennis Povshedny.Mediamosa intro.DrupalCamp Kyiv 2011
camp_drupal_ua
 
Netbeans65 Osum Slides
Netbeans65 Osum SlidesNetbeans65 Osum Slides
Netbeans65 Osum Slides
Abhishek Gupta
 

Similar a Java EE 7 - Embracing the Cloud and HTML 5 (20)

soft-shake.ch - Introduction to HTML5
soft-shake.ch - Introduction to HTML5soft-shake.ch - Introduction to HTML5
soft-shake.ch - Introduction to HTML5
 
Ramji
RamjiRamji
Ramji
 
10 Tips for Java EE 7 with PrimeFaces - JavaOne 2013
10 Tips for Java EE 7 with PrimeFaces - JavaOne 201310 Tips for Java EE 7 with PrimeFaces - JavaOne 2013
10 Tips for Java EE 7 with PrimeFaces - JavaOne 2013
 
Custom Runtimes for the Cloud
Custom Runtimes for the CloudCustom Runtimes for the Cloud
Custom Runtimes for the Cloud
 
WebBee rapid web app development teck stack
WebBee rapid web app development teck stackWebBee rapid web app development teck stack
WebBee rapid web app development teck stack
 
Web Logic Jboss Final
Web Logic Jboss FinalWeb Logic Jboss Final
Web Logic Jboss Final
 
Accelerate your digital transformation
Accelerate your digital transformationAccelerate your digital transformation
Accelerate your digital transformation
 
HTML5 Technical Executive Summary
HTML5 Technical Executive SummaryHTML5 Technical Executive Summary
HTML5 Technical Executive Summary
 
Camelone-2012 HTML5 WebSocket ActiveMQ/Camel
Camelone-2012 HTML5 WebSocket ActiveMQ/CamelCamelone-2012 HTML5 WebSocket ActiveMQ/Camel
Camelone-2012 HTML5 WebSocket ActiveMQ/Camel
 
Realizing Great Customer Experiences with Adobe® LiveCycle® ES3
Realizing Great Customer Experiences with Adobe® LiveCycle® ES3Realizing Great Customer Experiences with Adobe® LiveCycle® ES3
Realizing Great Customer Experiences with Adobe® LiveCycle® ES3
 
Os Henrikson
Os HenriksonOs Henrikson
Os Henrikson
 
Meteor - Codemotion Rome 2015
Meteor - Codemotion Rome 2015Meteor - Codemotion Rome 2015
Meteor - Codemotion Rome 2015
 
Meteor + Polymer
Meteor + PolymerMeteor + Polymer
Meteor + Polymer
 
[English version] JavaFX and Web Integration
[English version] JavaFX and Web Integration[English version] JavaFX and Web Integration
[English version] JavaFX and Web Integration
 
Helping Organizations Realize the Value of DevOps with Continuous Software De...
Helping Organizations Realize the Value of DevOps with Continuous Software De...Helping Organizations Realize the Value of DevOps with Continuous Software De...
Helping Organizations Realize the Value of DevOps with Continuous Software De...
 
OpenCms Days 2012 - OpenCms 8 as a JSR-286 compliant portlet server
OpenCms Days 2012 - OpenCms 8 as a JSR-286 compliant portlet serverOpenCms Days 2012 - OpenCms 8 as a JSR-286 compliant portlet server
OpenCms Days 2012 - OpenCms 8 as a JSR-286 compliant portlet server
 
Dennis Povshedny.Mediamosa intro.DrupalCamp Kyiv 2011
Dennis Povshedny.Mediamosa intro.DrupalCamp Kyiv 2011Dennis Povshedny.Mediamosa intro.DrupalCamp Kyiv 2011
Dennis Povshedny.Mediamosa intro.DrupalCamp Kyiv 2011
 
Keeping Current with ColdFusion - Adobe Max 2011
Keeping Current with ColdFusion - Adobe Max 2011Keeping Current with ColdFusion - Adobe Max 2011
Keeping Current with ColdFusion - Adobe Max 2011
 
Netbeans65 Osum Slides
Netbeans65 Osum SlidesNetbeans65 Osum Slides
Netbeans65 Osum Slides
 
Project report for final year project
Project report for final year projectProject report for final year project
Project report for final year project
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 

Java EE 7 - Embracing the Cloud and HTML 5

  • 1. Java EE 7 – Embracing the Cloud and HTML 5 -AmitNaik JavaOne 2012
  • 2. About Me Principal Engineer with the R&D Incubation & Innovation Lab at BMC Software, Pune. Work on emerging technologies such as Cloud Computing and Monitoring, Big Data Analysis, Mobile Architectures, UI frameworks Systems management & Monitoring background Experience architecting and building performant and scalable enterprise solutions across a variety of domains Working (& playing) with Java from 1997 © Copyright 5/4/2012 BMC Software, Inc 2
  • 3. Agenda Current “buzz” Java EE 7 – Overview HTML 5 Features Cloud Features Wrap-up and Q&A © Copyright 5/4/2012 BMC Software, Inc 3
  • 4. Current Buzz – Developer Edition Simplification of Tool set (& Polyglotism) BIG Data HTML 5 Cloud © Copyright 5/4/2012 BMC Software, Inc 4
  • 5. Simplification & Polyglotism Developers demand less boiler plate code The best tool that fits the task – Polyglotism! © Copyright 5/4/2012 BMC Software, Inc 5
  • 6. JVM is a durable and popular platform The JVM itself has become a key part of many language strategies! “invokedynamic” introduced in Java SE 7 as a JVM level feature to better support dynamic languages Project Coin – Simplify and add some better syntactic constructs Multi-catch try-with-resources Strings in Switch Etc… © Copyright 5/4/2012 BMC Software, Inc 6
  • 7. The Challenge of Big Data Webscale Data Terrabytes/day Tweets Geo Check-ins Web logs Social Data Atmospheric data Etc, Etc © Copyright 5/4/2012 BMC Software, Inc 7
  • 8. Java to the Rescue (with help from Web 2.0 frameworks) Java has become the popular language of choice for implementation for many big data frameworks Apache Hadoop has become a very popular Java based implementation of the Map- Reduce Paradigm Multiple distributions of Hadoop (Cloudera, DataMeer, HortonWorks) Cassandra – Highly Available DB engine written in Java (Facebook) Column oriented “NoSQL” DB © Copyright 5/4/2012 BMC Software, Inc 8
  • 9. Java EE 7 – Cloud & HTML 5 Java EE 7 and further releases to address: - HTML 5 - Cloud © Copyright 5/4/2012 BMC Software, Inc 9
  • 10. Java Enterprise Edition - Progression © Copyright 5/4/2012 BMC Software, Inc 10
  • 11. Java EE 7 - Overview Java SE 7 (Dolphin) released June-July 2011 - Java EE 7 to follow JSR 342: Umbrella JSR for Java EE 7 Q3 2012 Public Review Q4 2012 Proposed Final Draft Q1 2013 Final Release (Pushed back from Q3 2012) © Copyright 5/4/2012 BMC Software, Inc 11
  • 12. Java EE 7 Overview - JSRs © Copyright 5/4/2012 BMC Software, Inc 12
  • 13. Four Key aspects Java EE 7 has a lot of JSRs! Already covered topics: - JSR 343: What's Coming in Java Message Service 2.0 - Java API for JSON - JAX-RS 2.0: What's in JSR 339? - Enterprise JavaBeans Technology 3.2 - Java Persistence API 2.1 © Copyright 5/4/2012 BMC Software, Inc 13
  • 14. Focus of the presentation We will look at four key areas: - JSF enhancements HTML 5 – JSF 2.0 & 2.2 - HTML 5 WebSockets – (JSR 356) - Concurrency Utils. for EE (JSR 236) - Cloud – Multiple JSRs © Copyright 5/4/2012 BMC Software, Inc 14
  • 15. JEE 7 and HTML 5 JSF © Copyright 5/4/2012 BMC Software, Inc 15
  • 16. HTML 5 – Future of Web Markup © Copyright 5/4/2012 BMC Software, Inc 16
  • 17. HTML 5 Features: HTML Elements HTML4 HTML5 Semantic elements for Structure <header>, <nav>, <article>, <section>, <aside>, <footer>, etc Cleaner Source – no more “div craziness” © Copyright 5/4/2012 BMC Software, Inc 17
  • 18. HTML 5 Elements: Audio & Video Audio Today - Most audio played through flash plug-in - Not all browsers have same plug-ins (& security risks) <audio> element: - Standard way to include audio: sound files or audio stream - 3 supported formats: Ogg Vorbis, MP3, Wav (browsers may support subset) Usage example: <audio controls="controls"> <source src="song.ogg" type="audio/ogg"> <source src="song.mp3" type="audio/mpeg"> </audio> Specify multiple audio file formats: browser will use first recognized format “controls” attribute: adds “play”, “pause”, and “volume” controls © Copyright 5/4/2012 BMC Software, Inc 18
  • 19. Java EE 7 - Web Tier support HTML5 support Web socket support Standard JSON API NIO.2-based web container © Copyright 5/4/2012 BMC Software, Inc 19
  • 20. JSF Composite Components Truly Reusable component Turns page markup into a JSF UI component with attached validators, converters, listeners <html xmlns=http://www/w3/org/1999/xhtml xmlns:h=http://java.sun.com/jsf/html xmlns:f=http://java.sun.com/jsf/core xmlns:my=”http://java.sun.com/jsf/composite/comp”> ……………. <my:out value=”yes”/> On disk: <context root>/resources/comp/out.xhtml> JSF Composite components can leverage the HTML 5 JavaScript API! © Copyright 5/4/2012 BMC Software, Inc 20
  • 21. JSF support – HTML 5 with composite components <html... xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h=http://java.sun.com/jsf/html xmlns:f="http://java.sun.com/jsf/core" xmlns:cc="http://java.sun.com/jsf/composite"> <h:head> ... </h:head> … <h:body> <cc:interface> <cc:attribute name=”src” required=”true” ”/> <cc:attribute name=”controls” required=”false” /> </cc:interface> <cc:implementation> <h:outputScript library=”js” name=”audio.js” target=”head”/> <audio src="#{cc.attrs.src}" controls="#{cc.attrs.controls}"></audio> <input type=”button” value=”Play” onclick=”play()”/> <input type=”button” value=”Pause” onclick=”pause()”/> </cc:implementation> </h:body> © Copyright 5/4/2012 BMC Software, Inc 21
  • 22. JSF support – HTML 5 with composite components audio.js: function play() { var audio = document.getElementsByTagName("audio")[0]; audio.play(); var display = document.getElementsByTagName("input")[0]; display.value = audio.src; } function pause() { var audio = document.getElementsByTagName("audio")[0]; audio.pause(); } © Copyright 5/4/2012 BMC Software, Inc 22
  • 23. JSF Support for HTML 5 to be enhanced JSF 2.2 enhancements for HTML5 support - Semantic tags, browser feature detection - Use of HTML5 by components - Audio and Video usage enhancements JSR-276 (tool support) Mobile renderkits Page resolver and application context manager API © Copyright 5/4/2012 BMC Software, Inc 23
  • 24. JEE 7 and HTML 5 WebSockets © Copyright 5/4/2012 BMC Software, Inc 24
  • 25. WebSocket – Bidirectional TCP Way for multiplexing bi-directional, full-duplex communications channels over a single TCP connection Real-time, bidirectional web communication with low overhead (compared to technologies such as COMET) Standardized way for the server to send content to the browser without being solicited by the client TCP port 80 – no need for additional firewall port rules TCP based, uses HTTP 'handshake' to initiate & terminate WebSocket session Defines two new URI schemes - ws: and wss: for unencrypted and encrypted connections Supported Chrome 16, Firefox 11 and Internet Explorer 10 Blessed by IETF – Tracked by RFC 6455 © Copyright 5/4/2012 BMC Software, Inc 25
  • 26. WebSocket – HTTP connection Handshake Client Request: GET /mychat HTTP/1.1 Host: server.example.com Upgrade: websocket Connection: Upgrade Sec-WebSocket-Key: x3JJHMbDL1EzLkh9GBhXDw== Sec-WebSocket-Protocol: chat Sec-WebSocket-Version: 13 Server response: HTTP/1.1 101 Switching Protocols Upgrade: websocket Connection: Upgrade Sec-WebSocket-Accept: HSmrc0sMlYUkAGmm5OPpG2HaGWk= Sec-WebSocket-Protocol: chat © Copyright 5/4/2012 BMC Software, Inc 26
  • 27. Java API for WebSocket support JSR – JSR 356 Creating components to handle bi-directional WebSocket conversations Initiating and intercepting WebSocket events Creation and consumption of WebSocket text and binary messages Abililty to define WebSocket protocols & content models Configuration and management of WebSocket sessions, - timeouts, - retries, - connection pooling Define how WebSocket applications within Java EE security model © Copyright 5/4/2012 BMC Software, Inc 27
  • 28. Web Socket Sample (w/Grizzly WebSocket API) public class ChatApplication extends WebSocketApplication<ChatWebSocket> { protected ChatWebSocket createWebSocket(Connection c, ServerWebSocketMeta m) { return new ChatWebSocket(c, m, this); } public void onMessage(ChatWebSocket s, DataFrame frame) { String msg = frame.getAsText(); s.sendJson(s.getUser(), msg); } public void onClose(ChatWebSocket s) { s.sendJson(“system”, s.getUser() + “ left the chat”); } } © Copyright 5/4/2012 BMC Software, Inc 28
  • 29. Concurrency Utils for Managed code © Copyright 5/4/2012 BMC Software, Inc 29
  • 30. Concurrency Utils – not for managed code! Java.util.concurrent is a great set of libraries for managing concurrent executions – makes writing multi-threaded code (somewhat) simple Cannot (should not) be used in managed environments! Server containers provide runtime support for Java EE application components (Servlets and EJBs) Layer between the App code and Platform resources Multi-threaded code is discouraged in “Managed” © Copyright 5/4/2012 BMC Software, Inc 30
  • 31. Managed Code unfriendly APIs java.util.Timer java.lang.Thread java.util.concurrent.ExecutorService ThreadPoolExecutor …. © Copyright 5/4/2012 BMC Software, Inc 31
  • 32. javax.enterprise.concurrent for Managed code JSR 236: Concurrency Utilities for Java EE Created in 2003 Inactive till now Getting a Reboot now! Q4 2012: Release Public Review Draft Q1 2013: Final Release On-Track for Java EE 7 © Copyright 5/4/2012 BMC Software, Inc 32
  • 33. Preview of javax.enterprise.concurrent (JSR 236) ManagedExecutorService - Manageable version of a ExecutorService. ManagedScheduledExecutorService - Manageable version of a ScheduledExecutorService. ManagedTaskListener - ManagedTaskListener is used to monitor the state of a task's Future. ManagedThreadFactory - Manageable version of a ThreadFactory Etc… © Copyright 5/4/2012 BMC Software, Inc 33
  • 34. JEE 7 and Cloud © Copyright 5/4/2012 BMC Software, Inc 34
  • 35. Cloud Introduction - Simple Cloud Model © Copyright 5/4/2012 BMC Software, Inc 35
  • 36. Cloud Introduction Service Delivery Models - IaaS – Infrastructure as a Service – Amazon EC2, Rackspace - PaaS – Platform as a Service – CloudFoundry, Heroku, Force.com, Google Apps, Amazon Beanstalk - SaaS – Software as a Service – SalesForce, Workday Ownership/Deployment Flavors - Public - Private - Hybrid - Community © Copyright 5/4/2012 BMC Software, Inc 36
  • 37. Service Delivery Models IaaS Platform as a Service (PaaS) - Deploy customer created/acquired apps - Using languages and tools supported by PaaS Provider - No control of underlying cloud infrastructure - Control over deployed applications, hosting env. Configuration for owned apps © Copyright 5/4/2012 BMC Software, Inc 37
  • 38. Cloud Offerings are vendor specific Taxonomies, APIs, Service Levels, Interconnections, etc are varied In the IaaS space: AWS is emerging as a de-facto standard (API adopted by Eucalyptus, CloudStack etc) In the PaaS space: Number of providers springing up that can provide support for Java Applications and services © Copyright 5/4/2012 BMC Software, Inc 38
  • 39. No Standards yet! © Copyright 5/4/2012 BMC Software, Inc 39
  • 40. Needs of a PaaS Ready app Application as a whole need to be versioned Multiple versions can coexist Must deal with data versioning, upgrades, etc. Need ability to specify QoS properties Apps both expose and connect to services simultaneously Tighter requirements for resource and state management Better isolation between applications © Copyright 5/4/2012 BMC Software, Inc 40
  • 41. Less control over underlying services © Copyright 5/4/2012 BMC Software, Inc 41
  • 42. Java EE 7 Cloud Focus: Platform as a Service Next logical step for Java EE Java EE 7 : Evolves from Providing Services to Being one Define new platform roles to accommodate PaaS model Services become First Class citizens Add metadata - For service provisioning and configuration - For QoS, Elasticity - For sharing of applications and resources - For (re)configurability and customization Add useful APIs for cloud environment - JAX-RS client API, Caching API, State Management, JSON,… Extend existing APIs with support for multi-tenancy © Copyright 5/4/2012 BMC Software, Inc 42
  • 43. New PaaS Roles in Java EE 7 PaaS Product Vendor PaaS Provider PaaS Account Manager PaaS Customer Application Submitter Application Administrator End-User © Copyright 5/4/2012 BMC Software, Inc 43
  • 44. Multi-tenancy in Java EE 7 Support for separate isolated instances of the same app for different tenants - One application instance per tenant - Tenants correspond to units of isolation - Multitenant apps are declared as such - Each instance customized and deployed for a single tenant Mapping to tenant done by the container Tenant id available to application - E.g., under java:comp/tenantId or by injection © Copyright 5/4/2012 BMC Software, Inc 44
  • 45. Multi-Tenancy Illustration Goal: Simple configuration Flexible tenant discriminator support Other areas impacted - JNDI, JMS, EJB … © Copyright 5/4/2012 BMC Software, Inc 45
  • 46. PaaS Impact on deployment – Traditional Deployment © Copyright 5/4/2012 BMC Software, Inc 46
  • 47. PaaS Impact on deployment – Cloud Deployment © Copyright 5/4/2012 BMC Software, Inc 47
  • 48. Wrap-up Java EE 7 is going to be a major step forward HTML 5 support being added incrementally thru number of JSRs Embracing the Cloud and focusing on PaaS space JVM continues to be a very popular part of Java Ecosystem Exciting times ahead! - Modularity (Project Jigsaw), Closures, etc © Copyright 5/4/2012 BMC Software, Inc 48
  • 49. Contact – Amit Naik © Copyright 5/4/2012 BMC Software, Inc 49
  • 50. Q&A © Copyright 5/4/2012 BMC Software, Inc 50
  • 51. References http://www.infoq.com/articles/twitter-java-use http://cloudopsmanagement.wordpress.com/2011/06/02/open- source-engine-powering-the-next-gen-cloud-stack-part-1/ http://en.wikipedia.org/wiki/HTML5 http://www.slideshare.net/keilw/java-ee-7-the-voyage-of-the- cloud-treader http://en.wikipedia.org/wiki/WebSocket http://www.rfc-editor.org/rfc/rfc6455.txt http://xkcd.com/927/ © Copyright 5/4/2012 BMC Software, Inc 51
  • 52. Learn more at www.bmc.com © Copyright 5/4/2012 BMC Software, Inc 52
  • 53. Back-up Slides © Copyright 5/4/2012 BMC Software, Inc 53