javaone2015フィードバック @ 富山合同勉強会

70

Upload: takashi-ito

Post on 12-Apr-2017

458 views

Category:

Software


0 download

TRANSCRIPT

Page 1: JavaOne2015フィードバック @ 富山合同勉強会
Page 2: JavaOne2015フィードバック @ 富山合同勉強会

JavaOne 2015 フィードバック

日本オラクル株式会社 クラウド・テクノロジー事業統括 Fusion Middleware事業統括本部 伊藤 敬 Jan. 30th, 2016

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

#j1jp

Page 3: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

Safe Harbor Statement

The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.

3

本資料では櫻庭さんが公開されている画像をいくつか(たくさん)お借りしています。ありがとうございます。

Page 4: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

Agenda

JavaOne 2015 キーノートフィードバック & キーワード

Java EE 8 アップデート

1

2

Page 5: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 5

Java 20周年を祝う JavaOne 2015 San Francisco

Page 6: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 6

JavaOne Keynote Speakers: Georges Saab, VP of Development, Java Platform

Page 7: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 7

Mark Reinhold, Chief Architect

Page 8: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 8

Mike Lehmann, VP of Product Management

Page 9: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 9

Special Guest

Page 10: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 10

久々のJavaOne Keynote 日本からの登壇: 楽天株式会社 岩崎さん&Arshalさん

Page 11: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

Java開発者と市場の拡大

11

• 全世界で1,000万人のJava開発者

• 最も多くの開発者が選択するテクノロジー

• 130億のJavaデバイス

• 2億台の医療用デバイスでJavaが活用

• 100億台の車載デバイスでJavaが活用

• 全世界のデスクトップPCの97%でJavaが活用

Page 12: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 12

openjdk.java.net

136% 実際に活動する コミッターの増加 since 2010

Page 13: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 13

104% Javaユーザー・グループの増加 since 2010

55% Java Championの増加 since 2010

16% 非営利団体の増加 since 2014

Page 14: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

メンバーシップ JCPへの参画拡大 'If you want to go fast, go alone. If you want to go far, go together'

•誰でも参加可能

• アクティブなメンバーシップ数:約750

• jcp.orgのメーリングリストに登録しているユーザー数:約3,700

•会費

– 個人:無料

– Javaユーザー・グループ:無料

– 非営利団体:無料

– 営利団体:年間5,000ドル

会費を免除することが決定 JSR364で無償化する規定を策定中

14

Page 15: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

JavaOne 2015 キーワードご紹介

Oracle Confidential – Internal/Restricted/Highly Restricted 15

Page 16: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 16

番外: 11 Japanese Speakers!

Page 17: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 17

JavaOne2015 キーワード① : Internet of Things

Page 18: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 18

ラジコンカーによる車載Javaのデモ@展示会場

Page 19: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 19

ドローンとJavaのデモ

Page 20: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

Java ME Embedded 8: インテリジェント・エッジデバイスの実現 Java開発者によるイノベーションとIoTシステムの実現を加速

20

Embedded-Ready

Oracle IoT Cloud

Service

Java Developers

Intelligent Edge

Partners

Page 21: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 21

JavaOne 2015 キーワード②: DevOps

Page 22: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 22

Page 23: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 23

Page 24: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 24

Page 25: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 25

Page 26: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 26

Page 27: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 27

JavaOne キーワード③:Microservices

Page 28: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 28

Gilt.com

Page 29: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 29

Gilt.com 毎日昼12時からセールを実施:アクセスの集中

Page 30: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 30

2011まではJava EEベースのシステムを運用

Page 31: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

2015 – Microservices導入

31

Page 32: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 32

Page 33: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 33

Page 34: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 34

Page 35: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 35

Page 36: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

Java EE 8 アップデート

36

Page 37: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

Java Specification Request ステータス

JSR 366 – Java EE 8 Platform Early Draft Review (EDR)

JSR 369 – Servlet 4.0 – HTTP/2 EDR

JSR 365 – CDI 2.0 – CDI for Java SE, modularity & events EDR 完了

JSR 367 – JSON-B 1.0 – JSON Binding for Java Objects EDR 完了

JSR 371 – MVC 1.0 – Model View Controller, Action-Based, HTML framework EDR

JSR 368 – JMS 2.1 – MDB Improvements, CDI Managed Bean integration EDR

JSR 372 – JSF 2.3 – Integration with WebSocket, MVC, CDI, Java 8 DateTime EDR

JSR 374 – JSON-P 1.1 – Query enhancements, Java SE 8 improvements EDR 完了

JSR 375 – Security 1.0 – Simplifications, Cloud enhancements Early Draft策定中

JSR 370 – JAX-RS 2.1 – NIO, Server-Sent Events Early Draft策定中

JSR 373 – Management 2.0 – REST based Management Early Draft策定中

Java EE 8 仕様策定の状況 (as of 25/10/2015)

37

Page 38: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

Java EE 8 主要テーマ

• HTML5 / Web Tier 機能拡張

•開発をより容易に / CDI のさらなる活用

• クラウドの実行・管理環境化

As of today…

Page 39: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

HTML5のサポート / Web Tier機能拡張

• JSON Binding

• JSON Processing 機能拡張

• Action-based MVC

• HTTP/2のサポート – Servlet 4.0

• Server-sent Events

– JAX-RS 2.1

Page 40: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 40

Page 41: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

JSON-B

• Javaオブジェクト / JSON間のマーシャル/アンマーシャルを実現するAPI – XMLのJAXBランタイムAPIと類似

•既存のJSON Binding実装の成果を活用 – MOXy, Jackson, GSON, Genson, Xstream, …

– JSON Bindingプロバイダの変更を可能にする

41

Java API for JSON Binding

Page 42: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

JSON-B 1.0 @Entity public class Person { @Id String name; String gender; @ElementCollection Map<String,String> phones; ... // getters and setters } Person duke = new Person(); duke.setName("Duke"); duke.setGender("M"); phones = new HashMap<String,String>(); phones.put("home", "650-123-4567"); phones.put("mobile", "650-234-5678"); duke.setPhones(phones); Jsonb jsonb = JsonbBuilder.create(); jsonb.toJson(duke, System.out) ;

{

"name":"Duke",

"gender":"M",

"phones":{

"home":"650-123-4567",

"mobile":"650-234-5678"}

}

Page 43: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

JSON-P 1.1

• JSON-Pointer – IETF RFC 6901

– JSON文書の中の特定の値を参照するための文字列の構文を規定する

"/0/phones/mobile"

新しい標準への対応

Page 44: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

JSON-P 1.1 JsonArray contacts = Json.createArrayBuilder()

.add(Json.createObjectBuilder()

.add("name", "Duke")

.add("gender", "M")

.add("phones", Json.createObjectBuilder()

.add("home", "650-123-4567")

.add("mobile", "650-234-5678")))

.add(Json.createObjectBuilder()

.add("name", "Jane")

.add("gender", "F")

.add("phones", Json.createObjectBuilder()

.add("mobile", "707-555-9999")))

.build();

[

{

"name":"Duke",

"gender":"M",

"phones":{

"home":"650-123-4567",

"mobile":"650-234-5678"}},

{

"name":"Jane",

"gender":"F",

"phones":{

"mobile":"707-555-9999"}}

]

Page 45: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

JSON-P 1.1

JsonArray contacts = ...;

JsonPointer p =

new JsonPointer("/0/phones/mobile");

JsonValue v = p.getValue(contacts);

[

{

"name":"Duke",

"gender":"M",

"phones":{

"home":"650-123-4567",

"mobile":"650-234-5678"}},

{

"name":"Jane",

"gender":"F",

"phones":{

"mobile":"707-555-9999"}}

]

Page 46: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

JSON-P 1.1

JsonArray contacts = ...;

JsonPointer p =

new JsonPointer("/0/phones/mobile");

contacts = p.replace(contacts, "650-555-1212");

[

{

"name":"Duke",

"gender":"M",

"phones":{

"home":"650-123-4567",

"mobile":"650-234-5678"}},

{

"name":"Jane",

"gender":"F",

"phones":{

"mobile":"707-555-9999"}}

]

Page 47: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

JSON-P 1.1

JsonArray contacts = ...;

JsonPointer p =

new JsonPointer("/0/phones/mobile");

contacts = p.replace(contacts, "650-555-1212");

[

{

"name":"Duke",

"gender":"M",

"phones":{

"home":"650-123-4567",

"mobile":"650-555-1212"}},

{

"name":"Jane",

"gender":"F",

"phones":{

"mobile":"707-555-9999"}}

]

Page 48: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

JSON-P 1.1

• JSON-Patch – IETF RFC 6902

• Patch is a JSON document

– JSONドキュメントを修整するためのオブジェクト / 処理の配列

– add, replace, remove, move, copy, test

–必ず “op” フィールドと “path” フィールドが必要

[

{"op":"replace", "path":"/0/phones/mobile", "value":"650-111-2222"},

{"op":"remove", "path":"/1"}

]

新しい標準への対応

Page 49: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

JSON-P 1.1 JsonPatchBuilder builder = new JsonPatchBuilder();

JsonArray patch =

builder.replace("0/phones/mobile", "650-111-2222")

.remove("/1")

.build();

[

{

"name":"Duke",

"gender":"M",

"phones":{

"home":"650-123-4567",

"mobile":"650-234-5678"}},

{

"name":"Jane",

"gender":"F",

"phones":{

"mobile":"707-555-9999"}}

]

Page 50: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

JSON-P 1.1 JsonPatchBuilder builder = new JsonPatchBuilder();

JsonArray patch =

builder.replace("0/phones/mobile", "650-111-2222")

.remove("/1")

.build();

JsonArray result = patch.apply(contacts);

[

{

"name":"Duke",

"gender":"M",

"phones":{

"home":"650-123-4567",

"mobile":"650-111-2222"}},

{

"name":"Jane",

"gender":"F",

"phones":{

"mobile":"707-555-9999"}}

]

Page 51: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

JSON-P 1.1 JsonPatchBuilder builder = new JsonPatchBuilder();

JsonArray patch =

builder.replace("0/phones/mobile", "650-111-2222")

.remove("/1")

.build();

JsonArray result = patch.apply(contacts);

[

{

"name":"Duke",

"gender":"M",

"phones":{

"home":"650-123-4567",

"mobile":"650-111-2222"}}

]

Page 52: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

Model View Controller (MVC)

• Component-based MVC

–コンポーネントフレームワークを活用するタイプ

– Controller はフレームワークが提供する

– JSF, Wicket, Tapestry…

• Action-based MVC

– Controllerはアプリケーションで定義される

– Struts 2, Spring MVC…

2つのタイプ

Page 53: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

MVC 1.0

• アクション・ベースのModel-View-Controller アーキテクチャの追加

•既存のJava EEテクノロジーを組み合わせて実現: – Model

• CDI, Bean Validation, JPA

– View • Facelets, JSP

– Controller • JAX-RS リソースメソッド

Page 54: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 54

JSP, Facelets CDI Bean

JAX-RS Resource Methods

Bean Validation

Page 55: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

MVC 1.0

@Path("hello")

public class HelloController {

@Inject

private Greeting greeting;

@GET

@Controller

public String hello() {

greeting.setMessage("Hello there!");

return "hello.jsp";

}

}

JAX-RS controller

Page 56: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

MVC 1.0

@Path("hello")

public class HelloController {

@Inject

private Greeting greeting;

@GET

@Controller

public String hello() {

greeting.setMessage("Hello there!");

return "hello.jsp";

}

}

JAX-RS controller Model

@Named

@RequestScoped

public class Greeting {

private String message;

public String getMessage() {

return message;

}

public void setMessage(message) {

this.message = message;

}

}

Page 57: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

MVC 1.0

<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<html>

<head>

<title>Hello</title>

</head>

<body>

<h1>${greeting.message}</h1>

</body>

</html>

View

Page 58: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

HTTP/2

• 一つのTCP接続を多重化

• リクエストは “Stream"と呼ばれるデータ単位で送受信

– 多重化

– Stream単位で重み付け

• バイナリフレームレイヤ

–Server Push

• ヘッダ圧縮

Multiplexed Binary Frames POST /upload HTTP/1.1 Host: www.test.com Content-Type: application/json Content-Length: 15 {“name”:“duke”}

HTTP 1.1 HTTP/2

HEADERS frame

DATA frame

Page 59: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

HTTP/2 サーバプッシュ

client server

.html

.js

.png

.css

• SSE/WebSocketとは用途が異なる

• 関連リソースをサーバプッシュ

• htmlの要求がきたら

• 関連のjs, png, css もプッシュする

Page 60: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

60

Page 61: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

Servlet 4.0 HTTP/2 サーバプッシュのサンプル

public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { PushBuilder builder = request.getPushBuilder(); builder.setPath(“/style.css”); builder.push(); res.setContentType(“text/html”); PrintWriter out = res.getPrintWriter(); out.println(“<html>”); out.println(“<head>”) out.println(“<link rel=¥”stylesheet¥” type=¥”text/css¥” href=¥“style.css¥”>”); … }

Page 62: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

開発をより容易に

• CDI 活用範囲の拡大

• Security インターセプタ

• JMS : Message-Driven Beanのメッセージ処理を簡素化

• JAX-RS injection の導入

• WebSocket スコープ

• Pruning - EJB 2.x client view, IIOPとの互換性

62

Page 63: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

CDI 2.0

• Modularity

• Java SE support

• Asynchronous Events

• Event ordering

• …

利用範囲の拡大と機能強化

63

http://www.slideshare.net/dblevins1/2015-javaone-ejbcdi-alignment

Page 64: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 64

https://published-rs.lanyonevents.com/published/oracleus2015/sessionsFiles/2550/CON2391_Paumard-The%20Path%20to%20CDI%202.0.pdf

Page 65: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 65

Page 66: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 66

Page 67: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 67

Page 68: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

Java EE仕様策定に貢献しませんか??

• Adopt a JSR

– http://glassfish.org/adoptajsr

• Join an Expert Group project

– http://javaee-spec.java.net

– https://java.net/projects/javaee-spec/pages/Specifications

• The Aquarium

– http://blogs.oracle.com/theaquarium

• Java EE 8 Reference Implementation

– http://glassfish.org

興味ある方は是非参画ください!!!

Page 69: JavaOne2015フィードバック @ 富山合同勉強会

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 69

JavaOne 2016に行こう!

Page 70: JavaOne2015フィードバック @ 富山合同勉強会