Java Platform Tradeoffs (Riga 2013)

38
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 1

description

Slides from Java Day Riga 2013 talk.

Transcript of Java Platform Tradeoffs (Riga 2013)

Page 1: Java Platform Tradeoffs (Riga 2013)

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.1

Page 2: Java Platform Tradeoffs (Riga 2013)

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.2

The following is intended to outline our generalproduct direction. It is intended for informationpurposes only, and may not be incorporated intoany contract. It is not a commitment to deliver anymaterial, code, or functionality, and should not berelied upon in making purchasing decisions.The development, release, and timing of anyfeatures or functionality described for Oracle’sproducts remains at the sole discretion of Oracle.

Page 3: Java Platform Tradeoffs (Riga 2013)

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.3

Java Platform Tradeoffs

Алексей Фёдоров, Oracle

Java Day Riga

28 ноября 2013

Page 4: Java Platform Tradeoffs (Riga 2013)

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.4 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Agenda

Частота выхода апдейтов

Фикс багов ломает совместимость

История про Substring

Совместимость как груз тянущий вниз

История о неизвестных отцах

GUI: Нативный или универсальный?

История про Beep

Как быть хитрому лицензиату?

Page 5: Java Platform Tradeoffs (Riga 2013)

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

Сюжет 1Апдейты: часто или редко?

Page 6: Java Platform Tradeoffs (Riga 2013)

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

Обновления Java и политика

Page 7: Java Platform Tradeoffs (Riga 2013)

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

Page 8: Java Platform Tradeoffs (Riga 2013)

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

Сюжет 2Исправление багов или совместимость?

Page 9: Java Platform Tradeoffs (Riga 2013)

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.9

Протокол взаимодействия

API spec

(aka Javadoc)

JLS 8 JSR 337 JVMS 8

Standalone

documents

Спецификация конкретной

версии платформы Java

играет роль протокола!

Page 10: Java Platform Tradeoffs (Riga 2013)

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

Какие изменения допустимы?

Предлагаемое изменение Update Major release

Добавить что-нибудь в Public API

(пакет / класс / метод / поле)- +

Удалить что-нибудь из Public API - -*

Добавить что-нибудь в Private API + +

Удалить что-нибудь из Private API +** +

Изменить спецификацию чего-нибудь - +**

Исправить ошибку (несоответствие поведения

требуемому в спецификации)+**,*** +

* - @Deprecated, @Override ** - проанализировать риски

*** - см. следующий слайд

Page 11: Java Platform Tradeoffs (Riga 2013)

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.11

Adding null key to empty TreeMap without Comparator should throw NPE

Bug 5045147 Bug 2188127

Page 12: Java Platform Tradeoffs (Riga 2013)

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

Adding null key to empty TreeMap without Comparator should throw NPE

Bug 5045147 Bug 2188127

Bug-2-Bug

Page 13: Java Platform Tradeoffs (Riga 2013)

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

Сюжет 3String.substring()

Page 14: Java Platform Tradeoffs (Riga 2013)

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.14

Page 15: Java Platform Tradeoffs (Riga 2013)

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.15

Page 16: Java Platform Tradeoffs (Riga 2013)

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

Page 17: Java Platform Tradeoffs (Riga 2013)

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

Since JDK 7u6

Page 18: Java Platform Tradeoffs (Riga 2013)

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

Performance vs. Memory

Page 19: Java Platform Tradeoffs (Riga 2013)

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

Сюжет 4Совместимость или новые фичи?

Page 20: Java Platform Tradeoffs (Riga 2013)

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.20

Page 21: Java Platform Tradeoffs (Riga 2013)

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

Page 22: Java Platform Tradeoffs (Riga 2013)

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.22

Сюжет 5Неизвестные отцы

Page 23: Java Platform Tradeoffs (Riga 2013)

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.23

Page 24: Java Platform Tradeoffs (Riga 2013)

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.24

Page 25: Java Platform Tradeoffs (Riga 2013)

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.25

Page 26: Java Platform Tradeoffs (Riga 2013)

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

Page 27: Java Platform Tradeoffs (Riga 2013)

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.27

Сюжет 6GUI: Нативный или универсальный?

Page 28: Java Platform Tradeoffs (Riga 2013)

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

Page 29: Java Platform Tradeoffs (Riga 2013)

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

Сюжет 7Toolkit.beep()

Page 30: Java Platform Tradeoffs (Riga 2013)

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

Page 31: Java Platform Tradeoffs (Riga 2013)

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.31

Java 7

Page 32: Java Platform Tradeoffs (Riga 2013)

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.32

Java 7

Java 8

Page 33: Java Platform Tradeoffs (Riga 2013)

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.33

Сюжет 8История о хитром лицензиате

Page 34: Java Platform Tradeoffs (Riga 2013)

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.34

Page 35: Java Platform Tradeoffs (Riga 2013)

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.35

Выводы

Большинство tradeoff’ов связаны с совместимостью

– в том или ином её смысле

Имеющиеся риски трудно оценивать

Разные риски в update releases и в major updates

Java двигается в Embedded

– Больше различий в поведении

Page 36: Java Platform Tradeoffs (Riga 2013)

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.36

Q&A

Page 37: Java Platform Tradeoffs (Riga 2013)

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.37

Мои контакты

@23derevo

[email protected]

[email protected]

Skype: fyodorov.spbu

http://about.me/alexey.fyodorov

Page 38: Java Platform Tradeoffs (Riga 2013)

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.38