• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Java EE 與 雲端運算的展望
 

Java EE 與 雲端運算的展望

on

  • 1,633 views

 

Statistics

Views

Total Views
1,633
Views on SlideShare
1,633
Embed Views
0

Actions

Likes
1
Downloads
119
Comments
0

0 Embeds 0

No embeds

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Java EE 與 雲端運算的展望 Java EE 與 雲端運算的展望 Presentation Transcript

    • Java EE 7Reaching for the CloudLee Chuk Munnchuk-munn.lee@oracle.com
    • The following is intended to outline our generalproduct direction. It is intended for informationpurposes only, and may not be incorporatedinto any contract. It is not a commitment todeliver any material, code, or functionality, andshould not be relied upon in making purchasingdecisions.The development, release, and timing of anyfeatures or functionality described for Oraclesproducts remains at the sole discretion ofOracle.
    • Java EE 6 PlatformDecember 10, 2009
    • Great Tooling Support
    • Industry Wide Support
    • <Insert Picture Here>Java EE 6
    • What is New in Java EE 6?• Several new APIs• Web profile• Pluggability/extensibility• Dependency injection• Lots of improvements to existing API
    • New And Updated Components• EJB 3.1 (+Lite) • Managed Beans 1.0• JPA 2.0 • Interceptors 1.1• Servlet 3.0 • JSP 2.2• JSF 2.0 • EL 2.2• JAX-RS 1.1 • JSR-250 1.1• Bean Validation 1.0 • JASPIC 1.1• DI 1.0 • JACC 1.5• CDI 1.0 • JAX-WS 2.2• Connectors 1.6 • JSR-109 1.3
    • Java EE 6 Web Profile Web container JSP 2.2 extensions JSF 2.0 JSTL 1.2 CDI Bean Validation 1.0extensions Servlet 3.0 · EL 2.2 DI 1.0 · CDI 1.0 · Interceptors 1.1 · JSR-250 1.1 Managed Beans 1.0 EJB 3.1 Lite JPA 2.0 · JTA 1.1
    • Web Tier Updates• Annotations in Servlet 3.0• Automatic discovery and registration of libraries• web.xml is optional• Package static files in resource jars• Use EJBs directly inside web apps
    • Web Apps Simplified Packaging Web ApplicationWEB-INF/classes com/acme/MyServlet.class com/acme/MyFilter.classWEB-INF/lib someframework.jarWEB-INF/web.xmlindex.htmlmain.cssjquery-1.4.2.jsui/jquery.ui.core.jsui/jquery.ui.widget.js
    • Web Apps Simplified Packaging Web ApplicationWEB-INF/classes @WebServlet(urlPatterns=”/foo”) com/acme/MyServlet.class public class MyServlet { … } com/acme/MyFilter.classWEB-INF/lib @WebFilter(urlPatterns=”/foo”) someframework.jar public class MyFilter { … }WEB-INF/web.xmlindex.htmlmain.cssjquery-1.4.2.jsui/jquery.ui.core.jsui/jquery.ui.widget.js
    • Web Apps Simplified Packaging Web ApplicationWEB-INF/classes com/acme/MyServlet.class com/acme/MyFilter.class Framework JarWEB-INF/lib META-INF/web-fragment.xml someframework.jar com/fw/FwServlet.class com/fw/FwFilter.classindex.htmlmain.cssjquery-1.4.2.jsui/jquery.ui.core.jsui/jquery.ui.widget.js
    • Web Apps Simplified Packaging Web ApplicationWEB-INF/classes com/acme/MyServlet.class com/acme/MyFilter.classWEB-INF/lib someframework.jar jQuery Resource Jar jquery-ui-1.8.4.jar META-INF/resources/jquery-1.4.2.js META-INF/resources/ui/jquery.ui.core.js META-INF/resources/ui/jquery.ui.widget.jsindex.htmlmain.css
    • Web Apps Simplified Packaging Web Application • Self-containedWEB-INF/classes • Generic com/acme/MyServlet.class • Reusable com/acme/MyFilter.classWEB-INF/lib someframework.jar jquery-ui-1.8.4.jarindex.htmlmain.css
    • Java EE 6 Programming Model• Complementary declarative/programmatic layer• Annotations are additive• Code can evolve gradually• Managed beans as a common foundation
    • EJB 3.1 Lite• Session bean programming model• Stateless, singleton programming model• Annotation based declarative security and transactions• Deployment descriptors are optional
    • EJB 3.1 New First Class Construct@Singleton @Startuppublic class StartupBean { @PostConstruct public void doAtStartup() { … }}@Stateless public class BackupBean { @Schedule(dayOfWeek=”Fri”, hour=”3”, minute=”15”) public void performBackup() { … }}@Stateless public class BatchProcessor { @Asynchronous public Future<Result> submit(Task t){ … }}
    • Dependency Injection• Powerful type-safe model• Can be enabled per-module• Integrated with JSF, JSP, EJB, web tier• Friendly to pre-Java EE 6 resources and services• Event model• Highly extensible
    • Bean with Constructor Injection@RequestScopedpublic class CheckoutHandler { @Inject public CheckoutHandler( @LoggedIn User user, @Reliable @PayBy(CREDIT_CARD) PaymentProcessor processor, @Default ShoppingCart cart) {…}
    • Bean with Constructor Injection @RequestScoped public class CheckoutHandler { @Inject public CheckoutHandler( @LoggedIn User user, @Reliable @PayBy(CREDIT_CARD)Types PaymentProcessor processor, @Default ShoppingCart cart) {…}
    • Bean with Constructor Injection @RequestScoped public class CheckoutHandler { @Inject public CheckoutHandler( @LoggedIn User user, @Reliable @PayBy(CREDIT_CARD)Qualifiers PaymentProcessor processor, @Default ShoppingCart cart) {…}
    • Bean with Constructor Injection Request scoped@RequestScopedpublic class CheckoutHandler { @Inject public CheckoutHandler( @LoggedIn User user, @Reliable @PayBy(CREDIT_CARD) PaymentProcessor processor, @Default ShoppingCart cart) {…}
    • Bean with Constructor Injection @RequestScoped public class CheckoutHandler { @Inject public CheckoutHandler( @LoggedIn User user, @Reliable @PayBy(CREDIT_CARD)Session scoped PaymentProcessor processor, @Default ShoppingCart cart) {…}
    • Bean with Constructor Injection @RequestScoped public class CheckoutHandler { @Inject public CheckoutHandler( @LoggedIn User user, @Reliable @PayBy(CREDIT_CARD) PaymentProcessor processor, @Default ShoppingCart cart) {…}Applicationscoped
    • Bean with Constructor Injection@RequestScopedpublic class CheckoutHandler { @Inject public CheckoutHandler( @LoggedIn User user, @Reliable @PayBy(CREDIT_CARD) PaymentProcessor processor, @Default ShoppingCart cart) {…} Conversation scoped
    • Java EE 7 Cloudy Ahead
    • Layers of Cloud Software as a Service (SaaS) Platform as a Service (PaaS)Infrastructure as a Service (IaaS)
    • Java EE and the Cloud• Containers are back in vogue!• We have containers• We have services... injectable services...• We scale to large clusters...• We have a security model...
    • JSR 342 – Java EE for the Cloud• More easily operate on public/private cloud – Multi tenancy, elasticiy• Tighter requirements for resource and state management• Better isolation between applications• Potential standard APIs for NRDBMS, caching, etc.• Common management and monitoring interfaces• Evolving the platform
    • Better Packaging for the Cloud• Applications should be versioned• Multiple versions should be able to coexists• Dealing with data versioning, upgrades, etc.• Need the ability to specify QoS properties• Exposed and connected to services
    • Cloud Platform Application Java Persistence Queueing Service Service Service ... State Management Virtualization Layer
    • Cloud Platform Application Code Code Code QoSModule Module Module Schema Migration Security Information … Java Persistence Queueing Service Service Service ... State Management Virtualization Layer
    • Cloud PlatformApplication Application Application Application Application Java Persistence Queueing Service Service Service ... State Management Virtualization Layer
    • Cloud Platform Managed EnvironmentApplication Application Application Application Application Java Persistence Queueing Service Service Service ... State Management Virtualization Layer
    • Modularity• Build on JavaSE 8 modularity• Applications are composed of modules• Dependencies are explicit• Versioning is built-in• Additional metadata for JavaEE
    • JavaSE 8 Modules com.foo.appmodule-info.javamodule com.foo @ 1.0.0 { com.foo.extra class com.foo.app.Main requires com.foo.lib @ 2.1-alpha; com.foo.lib provides com.foo.app.lib @ 1.0.0; requires optional com.foo.extra;} org.bar.lib edu.baz.util
    • Packaging and Install• Compiling Java classes with modules$ javac -modulepath mods src/com.foo.app/...• Packaging classes into modules$ jpkg -modulepath mods jmod com.foo.app com.foo.extra com.foo.lib• Installing modules into library$ jmod -L mlib install $EXT/edu.baz.util@*.jmod $EXT/org.bar.lib@*.jmod
    • Modular Applications j1demo.app j1demo-1.0.3
    • Modular Applications j1demo.app twitter-client-2.3.0 j1demo-1.0.3 requires j1demo-persist-1.4.0
    • Modular Applications j1demo.app twitter-client-2.3.0 j1demo-1.0.3 j1demo-persist-1.4.0 javaee-web-7.0 jpa-2.1 jax-rs-2.0
    • Modular Applications j1demo.app twitter-client-2.3.0 j1demo-1.0.3 j1demo-persist-1.4.0 javaee-web-7.0 jpa-2.1 jax-rs-2.0 implements gf-appserv-4.01. ...
    • Modular Applications j1demo.app twitter-client-2.3.0 j1demo-1.0.3 j1demo-persist-1.4.0 javaee-web-7.0 jpa-2.1 jax-rs-2.0 implements gf-appserv-4.01. eclipselink- 2.1.3 ... jersey-2.0.5
    • Modular Applications j1demo.app twitter-client-2.3.0 jax-rs-2.1 j1demo-1.0.3 j1demo-persist-1.4.0 jersey-2.1.1 javaee-web-7.0 jpa-2.1 gf-appserv-4.01. eclipselink- 2.1.3 ...
    • Modular Applications j1demo.app twitter-client-2.3.0 jax-rs-2.1 j1demo-1.0.3 j1demo-persist-1.4.0 jersey-2.1.1 javaee-web-7.0 jpa-2.1 jax-rs-2.1 gf-appserv-4.01. eclipselink- 2.1.3 ... jersey-2.1.1
    • <Insert Picture Here>Status
    • Web Tier• Web socket support in Servlet container• Standard JSON API• HTML5 support in JSF• NIO2 based web container• Updates to Web Profile• JAX-RS 2.0 will be mandatory
    • New API• Concurrency Utilities – JSR 236 – Eg. transaction-, security- naming- aware ExecutorService• JCache – JSR 107 – Local cache API, key-value map – Needs to be aligned with JPA cache API• JMS 2.0 – Annotation based programming model to JMS• JSON 1.0• RESTful client API for JAX-RS 2.0
    • Java EE 7 JSRs Status Approved Ongoing• JPA 2.1 • Concurrency Utilities 1.0• JAX-RS 2.0 • JCache 1.0• Servlet 3.1• EL 3.0 Yet to be filed• Platform 7/Web Profile 7 • EJB 3.2• JMS 2.0 • CDI 1.1• JSF 2.2 • JSR-330 1.1 • Bean Validation 1.1 • JSON 1.0
    • Java EE 7 Schedule• First seven JSRs already filed• Remaining ones to be filed soon... – Stay tuned• Final release late 2012• Date driven release – Anything not ready will be deferred to Java EE 8
    • JavaEE 6 on the Cloud Today
    • JRockit Virtualized Edition • Oracle JRockit VE runs natively on hypervisor – Better performance – Improved security • Deterministic GC behaviour – “Soft” real-time • Simple administration – Console and scripting
    • Java EE 6 PlatformAvailable fromhttp://www.oracle.com/javaee
    • Java EE 7Reaching for the CloudLee Chuk Munnchuk-munn.lee@oracle.com