Return to Video

David Delabassee - what's new in Java in 2020 - David Delabassee - what's new in Java in 2020

  • 0:00 - 0:08
    it have David tonight David actually
  • 0:04 - 0:11
    came to Singapore one year ago he was
  • 0:08 - 0:14
    actually visiting and speaking for a
  • 0:11 - 0:17
    conference I think it was for Rocco
  • 0:14 - 0:20
    waltz if I'm correct yep and yeah and
  • 0:17 - 0:20
    yeah it was pretty awesome it was really
  • 0:20 - 0:22
    good
  • 0:20 - 0:26
    meet up with him and we thought to
  • 0:22 - 0:28
    invite him again and so today like will
  • 0:26 - 0:32
    be more talking about coffee features of
  • 0:28 - 0:34
    Java like what to expect in the future
  • 0:32 - 0:37
    and what's be having the newest versions
  • 0:34 - 0:39
    of Java so we're very happy to have
  • 0:37 - 0:41
    David's eventually today and hope to
  • 0:39 - 0:44
    have him in person again in the future
  • 0:41 - 0:46
    thank you David thank you well in yeah
  • 0:44 - 0:49
    in fact I was supposed to come back I
  • 0:46 - 0:54
    think in June but yeah anyway thanks for
  • 0:49 - 0:56
    having me so despite I'm sorry despite
  • 0:54 - 0:57
    the hard situation I'm very happy to be
  • 0:56 - 1:01
    able to give these remote presentations
  • 0:57 - 1:04
    so the title of the session is Java in
  • 1:01 - 1:07
    the 40 version the thing is that more
  • 1:04 - 1:08
    and more I realized that given we have
  • 1:07 - 1:12
    accelerated the currents of the Java
  • 1:08 - 1:15
    release people are are somehow confused
  • 1:12 - 1:18
    about what's in Java so today what I
  • 1:15 - 1:22
    want to share with you is basically what
  • 1:18 - 1:25
    features will be added in 2020 in the
  • 1:22 - 1:29
    Java platform why why 40 well I'm
  • 1:25 - 1:33
    french-speaking and I always confuse 40
  • 1:29 - 1:35
    and 14 so given that we have just really
  • 1:33 - 1:37
    in a version 14 of Java this is really
  • 1:35 - 1:40
    what I'm going to talk today having said
  • 1:37 - 1:43
    that I will also discuss about Java 15
  • 1:40 - 1:47
    which is which will come later this year
  • 1:43 - 1:50
    in 2020 so this is a standard server
  • 1:47 - 1:52
    what is this camera from Oracle don't
  • 1:50 - 1:53
    make any process decision based on what
  • 1:52 - 1:57
    I will say today having said that
  • 1:53 - 1:58
    everything is open source so we're good
  • 1:57 - 2:00
    on that side the only thing that you
  • 1:58 - 2:03
    should you should keep in mind is that
  • 2:00 - 2:05
    and if anything that I say about Java 15
  • 2:03 - 2:07
    can in theory still change I mean Java
  • 2:05 - 2:10
    team will be released in September so
  • 2:07 - 2:13
    between now and then there might be
  • 2:10 - 2:14
    change that something that you have to
  • 2:13 - 2:20
    keep in mind about
  • 2:14 - 2:21
    disclaimer okay May is a very important
  • 2:20 - 2:25
    month because we are about to celebrate
  • 2:21 - 2:28
    the 25th anniversary of Java so Java has
  • 2:25 - 2:31
    been released the first release has been
  • 2:28 - 2:34
    released 25 years ago so we were just
  • 2:31 - 2:36
    about to celebrate that anniversary the
  • 2:34 - 2:39
    thing is that Java keep evolving since
  • 2:36 - 2:42
    25 years based on two core principle the
  • 2:39 - 2:43
    first one developer productivity second
  • 2:42 - 2:47
    core principle is application
  • 2:43 - 2:50
    performance this has been done through
  • 2:47 - 2:53
    the last 25 years in the face of
  • 2:50 - 2:56
    constantly evolving things such as
  • 2:53 - 3:00
    programming programming predicts for
  • 2:56 - 3:02
    example 25 20 years ago we're not really
  • 3:00 - 3:05
    talking about any kind of functional
  • 3:02 - 3:06
    programming when it was when it when
  • 3:05 - 3:08
    were talking about Java
  • 3:06 - 3:10
    that's something since then that has
  • 3:08 - 3:12
    been become more and more important
  • 3:10 - 3:15
    something else that evolved is
  • 3:12 - 3:17
    application style in the beginning we
  • 3:15 - 3:19
    were mainly talking about client-server
  • 3:17 - 3:21
    application we're talking about
  • 3:19 - 3:24
    Minnelli's application those day
  • 3:21 - 3:26
    obviously it's more and more about micro
  • 3:24 - 3:29
    services so this is yet another
  • 3:26 - 3:33
    revolution that Java has to cope with
  • 3:29 - 3:36
    deployment styles in the early days we
  • 3:33 - 3:40
    were deploying in our own data center on
  • 3:36 - 3:42
    large Java those day we tend to deploy
  • 3:40 - 3:46
    using containers in the cloud so that's
  • 3:42 - 3:48
    another big shift when it comes to to
  • 3:46 - 3:50
    the way we deploy our application and
  • 3:48 - 3:52
    again Java has to cope with that and
  • 3:50 - 3:54
    last but not least obviously the other
  • 3:52 - 3:56
    one is evolving so those day for example
  • 3:54 - 4:00
    we have more and more course in our
  • 3:56 - 4:03
    machines we have more and more memory we
  • 4:00 - 4:06
    have vector support directly built into
  • 4:03 - 4:08
    general-purpose computers we have
  • 4:06 - 4:09
    multiple level cache when it comes to
  • 4:08 - 4:13
    memory and so on and so on
  • 4:09 - 4:15
    so does blas this is basically out of a
  • 4:13 - 4:18
    divorce for the last 25 years and this
  • 4:15 - 4:21
    is how it will continue to evolve so
  • 4:18 - 4:22
    this is a pretty busy slide I'm not
  • 4:21 - 4:24
    gonna spend time on this slide this
  • 4:22 - 4:27
    slide basically lists all the features
  • 4:24 - 4:28
    that were added in Java 9 and Java 9 was
  • 4:27 - 4:30
    the special release
  • 4:28 - 4:33
    in the sense that it was the latest
  • 4:30 - 4:37
    large release of Java and there's a big
  • 4:33 - 4:39
    issue with that so every two to three
  • 4:37 - 4:41
    years we were releasing one Java version
  • 4:39 - 4:43
    with a bunch of features so when it
  • 4:41 - 4:44
    comes to adapting those features it was
  • 4:43 - 4:48
    very difficult because the developers
  • 4:44 - 4:50
    basically had horror of a sudden access
  • 4:48 - 4:53
    to a bunch of features so getting a
  • 4:50 - 4:55
    getting familiar with those features was
  • 4:53 - 4:59
    very difficult so we decided to change
  • 4:55 - 5:00
    the way Java is evolving so now it works
  • 4:59 - 5:04
    this is something that we have put in
  • 5:00 - 5:06
    place end of 2017 so every six months
  • 5:04 - 5:10
    does there is a new Java release so it's
  • 5:06 - 5:12
    called it's called a feature release so
  • 5:10 - 5:16
    11 12 13
  • 5:12 - 5:20
    the current Java release is 14 released
  • 5:16 - 5:22
    in March and in September 2020 we're
  • 5:20 - 5:23
    gonna release 15 that's a given six
  • 5:22 - 5:27
    months later
  • 5:23 - 5:29
    16 and so on and so on now all those
  • 5:27 - 5:32
    feature release are open source and are
  • 5:29 - 5:35
    supported until the next release comes
  • 5:32 - 5:37
    out so 9 was supported at least until 10
  • 5:35 - 5:40
    cans out and so on and so on so that
  • 5:37 - 5:44
    means that today 14 will be at least
  • 5:40 - 5:46
    supported and until 15 comes out and 115
  • 5:44 - 5:48
    will be released in September the
  • 5:46 - 5:50
    current release will be 15 and that does
  • 5:48 - 5:52
    Italy if you're in the open source aisle
  • 5:50 - 5:53
    you should use that version because
  • 5:52 - 5:55
    that's the that's the version that is
  • 5:53 - 5:57
    supported
  • 5:55 - 5:59
    now we also acknowledge that there are
  • 5:57 - 6:02
    some user typically enterprise they are
  • 5:59 - 6:06
    not able to move that rapidly so moving
  • 6:02 - 6:08
    for 14 to 15 is in itself not a big work
  • 6:06 - 6:10
    given that they are not demanding that
  • 6:08 - 6:11
    penny features between all those beliefs
  • 6:10 - 6:13
    but still there are people there are
  • 6:11 - 6:15
    there are some type of user that prefer
  • 6:13 - 6:17
    to stick to one release for many many
  • 6:15 - 6:18
    years so that's what that's why we are
  • 6:17 - 6:21
    tricolor I have decided to have
  • 6:18 - 6:23
    long-term support release so basically a
  • 6:21 - 6:25
    long-term supporter ease is nothing more
  • 6:23 - 6:30
    than a given future release that we take
  • 6:25 - 6:33
    and we maintain for a very long time 11
  • 6:30 - 6:37
    is the current LTS the next one will be
  • 6:33 - 6:39
    17 so those release would be supportive
  • 6:37 - 6:40
    supported for many many years despite
  • 6:39 - 6:42
    the fact that obvious
  • 6:40 - 6:46
    we will still have every six months and
  • 6:42 - 6:50
    new features release so basically it
  • 6:46 - 6:53
    provides choice either you use the open
  • 6:50 - 6:56
    JDK build that Oracle is providing they
  • 6:53 - 6:58
    are free the only thing is that if you
  • 6:56 - 7:01
    are using those bills well you'd better
  • 6:58 - 7:03
    keep with the Java release guidance
  • 7:01 - 7:06
    so right now ideally you want to be on
  • 7:03 - 7:07
    14 because this is the race that is
  • 7:06 - 7:11
    supported and that's also the reason
  • 7:07 - 7:13
    that is getting the security updates if
  • 7:11 - 7:17
    you are not able to move that quickly
  • 7:13 - 7:20
    Oracle also sells support for Java
  • 7:17 - 7:23
    that's the Oracle JDK so when it comes
  • 7:20 - 7:25
    to buying Oracle support there are two
  • 7:23 - 7:28
    things that you should look at the price
  • 7:25 - 7:33
    of that support honestly the price of
  • 7:28 - 7:36
    the Oracle support for Java is pretty
  • 7:33 - 7:37
    cheap but I will let you judge that the
  • 7:36 - 7:39
    only thing that you would need to look
  • 7:37 - 7:41
    at when you decide where you want to get
  • 7:39 - 7:42
    your support for Java is basically the
  • 7:41 - 7:44
    ability that the organization you are
  • 7:42 - 7:47
    looking at is able to support you and
  • 7:44 - 7:50
    this slide shows the number of issue
  • 7:47 - 7:53
    that were fixed in in this particular
  • 7:50 - 7:56
    example in GDG 14 and we see that Oracle
  • 7:53 - 8:02
    is clearly the company that contributes
  • 7:56 - 8:05
    the most to Java so the takeaway here
  • 8:02 - 8:06
    Java is still free dr bean there has
  • 8:05 - 8:10
    been a lot of countries and confusions
  • 8:06 - 8:14
    regarding that but java is and remains
  • 8:10 - 8:17
    free so now let's quickly discuss about
  • 8:14 - 8:19
    how can we enable faster innovation
  • 8:17 - 8:22
    within the platform so the first thing
  • 8:19 - 8:23
    that we put in place two or three years
  • 8:22 - 8:25
    ago was this new release guidance where
  • 8:23 - 8:28
    every six months we have a new release
  • 8:25 - 8:31
    we also have the just the jep's
  • 8:28 - 8:33
    mechanism so chip stands for jdk enhance
  • 8:31 - 8:36
    and enhancements proposal so it's
  • 8:33 - 8:38
    basically a mechanism that we used to
  • 8:36 - 8:41
    introduce in the platform new Java
  • 8:38 - 8:44
    language features new GDK features or
  • 8:41 - 8:46
    even we're using that process to remove
  • 8:44 - 8:49
    things from the platform or we are also
  • 8:46 - 8:53
    using that features for example to
  • 8:49 - 8:57
    evolve out the open to open JDK project
  • 8:53 - 8:59
    is manager so it's basically some kind
  • 8:57 - 9:02
    of lightweight mechanism that clearly
  • 8:59 - 9:03
    that is clearly documented and tell the
  • 9:02 - 9:05
    community how things are supposed to
  • 9:03 - 9:07
    work when it comes to doing something
  • 9:05 - 9:10
    non-trivial non-trivial in the into the
  • 9:07 - 9:12
    platform next to that we have also put
  • 9:10 - 9:14
    in place multiple feedback feedback
  • 9:12 - 9:16
    mechanism that we are using to get
  • 9:14 - 9:18
    feedback on non final features so the
  • 9:16 - 9:21
    thing is that whenever we put something
  • 9:18 - 9:22
    into the platform as soon as it's final
  • 9:21 - 9:25
    it's something that is there forever
  • 9:22 - 9:29
    so it's basically it becomes permanent
  • 9:25 - 9:30
    so we'd better get it right before we
  • 9:29 - 9:33
    turn something into a permanent feature
  • 9:30 - 9:36
    within the platform so for that we have
  • 9:33 - 9:38
    multiple mechanism that we can use to
  • 9:36 - 9:42
    basically give to developers non final
  • 9:38 - 9:44
    features we encourage developer to used
  • 9:42 - 9:46
    on those non final features and based on
  • 9:44 - 9:48
    the feedback we can still do adjustments
  • 9:46 - 9:51
    to those features before we make them
  • 9:48 - 9:53
    permanent so we have the preview
  • 9:51 - 9:56
    features mechanism which is used more
  • 9:53 - 9:58
    for language Java language features will
  • 9:56 - 10:02
    serve experimental features which we use
  • 9:58 - 10:04
    mainly for odd spot VM features and then
  • 10:02 - 10:06
    we have an additional which sorry
  • 10:04 - 10:07
    additional mechanisms such as encoder
  • 10:06 - 10:11
    modules
  • 10:07 - 10:15
    early GDK access built that we use to
  • 10:11 - 10:18
    basically give access to to prototype of
  • 10:15 - 10:21
    new capabilities that we are thinking of
  • 10:18 - 10:23
    adding into the platform and last but
  • 10:21 - 10:25
    not least we have an ongoing open JDK
  • 10:23 - 10:26
    project that his name's Karass so the
  • 10:25 - 10:28
    the goal of SCARA
  • 10:26 - 10:30
    is to investigate alternative to
  • 10:28 - 10:32
    mercurial so if you are looking if you
  • 10:30 - 10:34
    know open JDK you know that for many
  • 10:32 - 10:36
    years open JDK when in fact since the
  • 10:34 - 10:39
    beginning open JDK has used a mercurial
  • 10:36 - 10:43
    as his as its source code management
  • 10:39 - 10:45
    solution it worked for many years but
  • 10:43 - 10:48
    honestly material is a bit tough to
  • 10:45 - 10:49
    learn so if you want to encourage more
  • 10:48 - 10:52
    contributions
  • 10:49 - 10:53
    well we'd better look at alternative so
  • 10:52 - 10:57
    that was the goal of that project look
  • 10:53 - 11:00
    at our alternatives and the outcome is
  • 10:57 - 11:01
    skaara selected git as the alternative
  • 11:00 - 11:05
    so that means that all the open JDK
  • 11:01 - 11:08
    development is moving to get SCARA has
  • 11:05 - 11:12
    also looked at Austin get provider
  • 11:08 - 11:16
    Gaeta has been selected but Kelly
  • 11:12 - 11:18
    skaara and openjdk is not tied to a get
  • 11:16 - 11:21
    up so if something goes wrong with
  • 11:18 - 11:23
    github we can easily switch despite the
  • 11:21 - 11:26
    size of the project where different gate
  • 11:23 - 11:28
    providers and last but not least Kara's
  • 11:26 - 11:30
    also looked at how we can improve the
  • 11:28 - 11:33
    complete development lifecycle of open
  • 11:30 - 11:34
    JDK by adding on top of it some
  • 11:33 - 11:37
    additional tunings
  • 11:34 - 11:41
    so a bunch of open JDK project I've
  • 11:37 - 11:44
    already moved to github we have the list
  • 11:41 - 11:47
    here amber Sierra GMC loom and so on and
  • 11:44 - 11:49
    so on and all the rest obviously are
  • 11:47 - 11:54
    planned to move in fact we plan to move
  • 11:49 - 11:57
    GDK itself hater around I think end of
  • 11:54 - 12:04
    GDK 15 so that would be still in 2020 or
  • 11:57 - 12:05
    around early 16 so still in 2020 but
  • 12:04 - 12:06
    still all the project are ridden alive
  • 12:05 - 12:09
    read-only
  • 12:06 - 12:13
    amuro's on the tabs so basically all
  • 12:09 - 12:16
    those all those barrettes won't give us
  • 12:13 - 12:18
    the ability to enable faster innovation
  • 12:16 - 12:20
    within the platform something that we
  • 12:18 - 12:27
    have already used and we clearly see the
  • 12:20 - 12:30
    benefit of all of those tools sorry so
  • 12:27 - 12:32
    delivering faster so we have enabled the
  • 12:30 - 12:34
    ability to deliver to deliver faster and
  • 12:32 - 12:37
    well let's look at what we have
  • 12:34 - 12:39
    delivered recently when I say we it's
  • 12:37 - 12:41
    really open JDK community obviously
  • 12:39 - 12:44
    Oracle is a big player in that community
  • 12:41 - 12:49
    but it's not just a rifle right so Java
  • 12:44 - 12:50
    10 delivering in March 2018 those are
  • 12:49 - 12:53
    all the features I'm not going to spend
  • 12:50 - 12:54
    any time on those release because we're
  • 12:53 - 12:59
    we already have enough to cover with a
  • 12:54 - 13:02
    14 and 15 the only thing is that you
  • 12:59 - 13:05
    might seem that we have two Jet's that
  • 13:02 - 13:08
    are in kind of yellow orange color those
  • 13:05 - 13:10
    have been delivered by someone else than
  • 13:08 - 13:11
    Oracle so the one in blacks are coming
  • 13:10 - 13:15
    from Oracle and yellow one are coming
  • 13:11 - 13:17
    from other open JDK members and I
  • 13:15 - 13:20
    believe those two are coming from reddit
  • 13:17 - 13:22
    then we had 11 which was a pretty big
  • 13:20 - 13:24
    release in terms of capability the thing
  • 13:22 - 13:27
    to keep in mind is that any features
  • 13:24 - 13:29
    release is driven by the dates so it's
  • 13:27 - 13:32
    either March or September's they are not
  • 13:29 - 13:34
    driven by features so if if a feature is
  • 13:32 - 13:36
    not ready to be included in a given
  • 13:34 - 13:38
    feature release well it's not an issue
  • 13:36 - 13:47
    that features will just have to wait the
  • 13:38 - 13:50
    next feature release 12 March 29 13
  • 13:47 - 13:54
    September 20 1913 was clearly a
  • 13:50 - 13:57
    relatively small release but yeah anyway
  • 13:54 - 14:01
    14 that was released two months ago
  • 13:57 - 14:03
    basically well cope with the fact that
  • 14:01 - 14:04
    nothing was really modest but again the
  • 14:03 - 14:07
    only thing that did drive those release
  • 14:04 - 14:10
    is the due dates not the content so
  • 14:07 - 14:12
    today we're gonna discuss us some of
  • 14:10 - 14:17
    those jabs that have been headed in a
  • 14:12 - 14:19
    Java 14 again we see that there are two
  • 14:17 - 14:22
    Jet's coming from know that are not
  • 14:19 - 14:25
    coming from Oracle non-volatile byte
  • 14:22 - 14:27
    buffer I think is coming from Reddit and
  • 14:25 - 14:31
    helpful pointer exception that we're
  • 14:27 - 14:31
    gonna discuss later is coming from sa P
  • 14:32 - 14:39
    okay so Java 14 was released in March
  • 14:36 - 14:42
    2020 everything is open source Sajida GD
  • 14:39 - 14:45
    k dot java.net slash 14 you can have
  • 14:42 - 14:46
    access to the open JDK builds of 14 you
  • 14:45 - 14:49
    can also have access to all the
  • 14:46 - 14:54
    technicals content for regarding that
  • 14:49 - 14:56
    release now quickly Java 15 what do we
  • 14:54 - 14:58
    know about Java 15 well first and
  • 14:56 - 15:02
    foremost we know that Java 15 will be
  • 14:58 - 15:04
    released in September 2020 we also know
  • 15:02 - 15:07
    the schedule so we know that random
  • 15:04 - 15:10
    phase 1 that's basically when we have
  • 15:07 - 15:15
    the feature freeze is in 1 months from
  • 15:10 - 15:17
    now so 1111 of of June so today based on
  • 15:15 - 15:19
    the information that is available in the
  • 15:17 - 15:22
    open JDK project we can already discuss
  • 15:19 - 15:24
    about what's being planned within 15
  • 15:22 - 15:26
    that's what I'm gonna do today now keep
  • 15:24 - 15:28
    in mind that things can obviously still
  • 15:26 - 15:30
    change we can add things at the very
  • 15:28 - 15:32
    last minute or we can even drop things
  • 15:30 - 15:34
    at the very last minute depending on
  • 15:32 - 15:36
    well on some stability
  • 15:34 - 15:40
    issue or something else things can might
  • 15:36 - 15:45
    still evolve so that those tunings
  • 15:40 - 15:54
    basically gives you the content that is
  • 15:45 - 15:56
    plane 414 so we clearly well it's a very
  • 15:54 - 15:59
    interesting time for Java because we
  • 15:56 - 16:03
    clearly have a very rich pipeline when
  • 15:59 - 16:05
    it comes to features why because my well
  • 16:03 - 16:09
    quite as well I wouldn't say many years
  • 16:05 - 16:11
    ago but five to four years ago we have
  • 16:09 - 16:14
    decided to work on very ambitious
  • 16:11 - 16:17
    project a multiple project that where
  • 16:14 - 16:21
    long terms are in the project and they
  • 16:17 - 16:24
    each had a goal to basically either
  • 16:21 - 16:27
    fundamentally improve certain aspect of
  • 16:24 - 16:30
    the Java platform or event reeve revamp
  • 16:27 - 16:32
    a given aspect of the platform so I'm
  • 16:30 - 16:35
    going to discuss some of those today the
  • 16:32 - 16:38
    GCC amber Panama Varela metropolice loom
  • 16:35 - 16:41
    and so on so very quickly the first one
  • 16:38 - 16:44
    that I want to discuss is the GC 0 GC so
  • 16:41 - 16:47
    it's low latency scalable garbage
  • 16:44 - 16:49
    collector that we started to work on few
  • 16:47 - 16:52
    years ago it was introduced as
  • 16:49 - 16:55
    experimental features in Java 11 and the
  • 16:52 - 16:58
    main goal of the GC is basically gives
  • 16:55 - 17:01
    you the lowest latency possible so it's
  • 16:58 - 17:03
    a concurrent GC meaning that all the
  • 17:01 - 17:05
    heavy lifting work of the GC is done
  • 17:03 - 17:09
    basically while your Java threads are
  • 17:05 - 17:11
    being executed so there are a few posts
  • 17:09 - 17:15
    but they are reduced to about well to
  • 17:11 - 17:17
    the smallest possible to the smallest
  • 17:15 - 17:20
    time possible we claim that the post
  • 17:17 - 17:22
    time should stay below 10 milliseconds
  • 17:20 - 17:25
    with on with the GC but what we observe
  • 17:22 - 17:27
    is that most of the time the poles are
  • 17:25 - 17:29
    more around 2 milliseconds which
  • 17:27 - 17:32
    obviously is very low
  • 17:29 - 17:35
    it's callable in the sense that the post
  • 17:32 - 17:39
    time will not increase as you grow your
  • 17:35 - 17:41
    Y or your life sets so the 10
  • 17:39 - 17:42
    millisecond post time is something that
  • 17:41 - 17:45
    you would get typically on a one
  • 17:42 - 17:50
    gigabyte it but also on a one terabyte
  • 17:45 - 17:50
    if so there's no change in that from
  • 17:50 - 17:55
    judges in the in the early days was
  • 17:52 - 17:56
    designed for large ships multi terabyte
  • 17:55 - 17:59
    if but it turns out that they are used
  • 17:56 - 18:01
    case where it also make sense to use the
  • 17:59 - 18:02
    GC for smaller hips so one of the
  • 18:01 - 18:05
    features that we have added recently is
  • 18:02 - 18:07
    the support for a few megabytes it's I
  • 18:05 - 18:12
    think that the law was that we can go is
  • 18:07 - 18:14
    8 megabytes so how do you use as a GC
  • 18:12 - 18:16
    today so I mentioned that the GC was
  • 18:14 - 18:21
    added as an experimental feature in a
  • 18:16 - 18:24
    Java 11 so you need to unlock explicitly
  • 18:21 - 18:27
    the GC so there is a specific hotspot
  • 18:24 - 18:29
    flag unlock experimental a vm option to
  • 18:27 - 18:32
    basically unlock any experimental
  • 18:29 - 18:35
    feature of the vm so you do that and
  • 18:32 - 18:38
    then you use the specific flag to enable
  • 18:35 - 18:40
    the GC so basically to sell the vm to
  • 18:38 - 18:42
    switch from g1 which is the default GC
  • 18:40 - 18:45
    to zgc
  • 18:42 - 18:48
    and there we go then the thing that you
  • 18:45 - 18:51
    might want to do is tune the GC to tune
  • 18:48 - 18:53
    the GC the thing that you need to do
  • 18:51 - 18:56
    basically is just said the each size one
  • 18:53 - 19:01
    of the design goal of the GC was also to
  • 18:56 - 19:03
    provide a default behavior that avoid
  • 19:01 - 19:04
    any tunings
  • 19:03 - 19:07
    obviously you still have the ability to
  • 19:04 - 19:10
    do more tuning than just setting the hip
  • 19:07 - 19:13
    size but by default the GC should should
  • 19:10 - 19:18
    give you a good result with just setting
  • 19:13 - 19:20
    the website so AGC what is the history
  • 19:18 - 19:24
    behind the GC GC was initially
  • 19:20 - 19:27
    introduced in 11 as an experimental
  • 19:24 - 19:31
    features on linux we have hadded
  • 19:27 - 19:35
    additional capabilities in 12 intersted
  • 19:31 - 19:38
    the GC support was added for arm 64 and
  • 19:35 - 19:40
    finally in 14 so there is that we have
  • 19:38 - 19:43
    done two months ago is hiring support
  • 19:40 - 19:46
    for Mac OS and windows for the GC and
  • 19:43 - 19:47
    the plan is to make the GC as a
  • 19:46 - 19:50
    production feature so basically we are
  • 19:47 - 19:55
    removing that experimental flag from the
  • 19:50 - 19:55
    future in DDF 15 so this year
  • 19:58 - 20:05
    so this is a picture that I took only
  • 20:01 - 20:07
    earlier this year in Sweden and on stage
  • 20:05 - 20:10
    was a Monica Beckwith from Microsoft and
  • 20:07 - 20:11
    well that's her claim it's not my claim
  • 20:10 - 20:13
    so zgc shine when it comes to
  • 20:11 - 20:16
    responsiveness so I encourage you to
  • 20:13 - 20:18
    check her presentation which is now
  • 20:16 - 20:24
    online where she goes basically about
  • 20:18 - 20:26
    the benefit of zgc now let's quickly
  • 20:24 - 20:30
    talk about G 1 G C so G 1 G C is the
  • 20:26 - 20:33
    default G C obviously we have made a lot
  • 20:30 - 20:35
    of investment within GGC but that
  • 20:33 - 20:39
    doesn't mean that we were not looking at
  • 20:35 - 20:42
    improving G 1 so for example in 14 we
  • 20:39 - 20:45
    had it support for a new ma so new must
  • 20:42 - 20:49
    stand for non-uniform memory access so
  • 20:45 - 20:52
    basically that means that some some
  • 20:49 - 20:54
    memory might be well the distance
  • 20:52 - 20:57
    between the memory and the course is not
  • 20:54 - 20:58
    always equal so from 1 cor accessing a
  • 20:57 - 21:01
    given memory might be more expensive
  • 20:58 - 21:04
    because it's more distant than accesses
  • 21:01 - 21:07
    memory in a different part of the well
  • 21:04 - 21:11
    formed from a different course parallel
  • 21:07 - 21:14
    GC was new more worse in C this a long
  • 21:11 - 21:20
    time so in 14 we have had it support
  • 21:14 - 21:22
    Numa support for G 1 and that's not all
  • 21:20 - 21:24
    if we look at the number of an
  • 21:22 - 21:27
    enhancement that we have done in our on
  • 21:24 - 21:30
    G 1 since gk8 it's over 700
  • 21:27 - 21:36
    announcements that together greatly
  • 21:30 - 21:38
    improve G 1 so the shafts shows for
  • 21:36 - 21:40
    example so the shots below shows the
  • 21:38 - 21:44
    native memory overhead caused it by the
  • 21:40 - 21:46
    by your G 1 GC for a heap size of 6 16
  • 21:44 - 21:49
    mega byte and what we can see is that
  • 21:46 - 21:53
    well if we look at g DK 8 the extra
  • 21:49 - 21:56
    native memory was a run for megabyte in
  • 21:53 - 21:59
    11 it was around well it was below 3
  • 21:56 - 22:05
    sorry I said megabytes gigabytes so 8
  • 21:59 - 22:08
    need an additional 4 gigabyte 2 GC that
  • 22:05 - 22:15
    large heap
  • 22:08 - 22:18
    GDK 11 it was reduced to I think 2.7
  • 22:15 - 22:22
    gigabyte and in 14 its it has been
  • 22:18 - 22:24
    reduced to 1.7 gigabyte so basically you
  • 22:22 - 22:27
    see that by switching from 8 to 14 we
  • 22:24 - 22:30
    have greatly reduced the memory
  • 22:27 - 22:32
    footprint of g1 not only that we also
  • 22:30 - 22:34
    improve the performance so basically
  • 22:32 - 22:37
    when you put together all those heaven
  • 22:34 - 22:42
    and reading enhancements that improves
  • 22:37 - 22:47
    g1 a lot across all areas so throughput
  • 22:42 - 22:50
    footprint latency and so on and so on so
  • 22:47 - 22:55
    that's something that you you need to
  • 22:50 - 22:57
    consider if obviously GC well the GC GC
  • 22:55 - 23:00
    characteristic as you are important to
  • 22:57 - 23:06
    you you need to think about moving to a
  • 23:00 - 23:08
    newer version of the of the platform so
  • 23:06 - 23:11
    this is another chart that shows some of
  • 23:08 - 23:13
    the management that have been done to g1
  • 23:11 - 23:17
    so let's see this is using the standard
  • 23:13 - 23:21
    spec gbb benchmark so this one is using
  • 23:17 - 23:24
    a fix it fix hip so set to 4 gigabyte
  • 23:21 - 23:28
    all the results are normalized and I her
  • 23:24 - 23:30
    is better so we have maxed G ops and
  • 23:28 - 23:32
    quick LG ops both are looking at the
  • 23:30 - 23:35
    throughput the thing is that quick LG G
  • 23:32 - 23:38
    ops is looking in addition to throughput
  • 23:35 - 23:44
    is also looking at Latin Z's
  • 23:38 - 23:46
    so we can see that parallel GC has been
  • 23:44 - 23:50
    included so the performance of our LG C
  • 23:46 - 23:51
    has been increased between 8 and 14 but
  • 23:50 - 23:55
    we can also see that there is a huge
  • 23:51 - 23:59
    boost in terms of latency improvement
  • 23:55 - 24:02
    when it comes to G 1 in 14 having said
  • 23:59 - 24:06
    that if you look sorry at this slide at
  • 24:02 - 24:08
    the next slides we see in this
  • 24:06 - 24:11
    particular case so this is whether with
  • 24:08 - 24:14
    a heap of 16 GB gigabyte that there has
  • 24:11 - 24:16
    been a regression between 8 well we I
  • 24:14 - 24:20
    don't have the result of G 1 here but we
  • 24:16 - 24:21
    can clearly see that there is a drop so
  • 24:20 - 24:25
    we had a
  • 24:21 - 24:29
    aggression basically and I don't
  • 24:25 - 24:32
    remember the exact issue if you want to
  • 24:29 - 24:33
    know more about the given bug it's you
  • 24:32 - 24:36
    just need to check the blocks at the
  • 24:33 - 24:41
    bottom of the slides but that issue has
  • 24:36 - 24:46
    been solved so we can clearly see that G
  • 24:41 - 24:49
    1 in 15 will improve the latencies we
  • 24:46 - 24:51
    see that the throughput is is while
  • 24:49 - 24:53
    there is a slight drop in terms of
  • 24:51 - 24:57
    throughput only 97 percent versus
  • 24:53 - 24:59
    hundred percent well it's a small it's a
  • 24:57 - 25:01
    small basically small trade-off but when
  • 24:59 - 25:03
    we see the benefit that gives that it
  • 25:01 - 25:05
    gives in terms of latency improvement I
  • 25:03 - 25:14
    think that it's fair to say that it's ok
  • 25:05 - 25:17
    to pay that that's more price so quickly
  • 25:14 - 25:19
    stuffed-up time is something that we
  • 25:17 - 25:22
    always look to improve in all the Java
  • 25:19 - 25:24
    release and obviously 14 is not is not
  • 25:22 - 25:27
    an exception now we can see in this case
  • 25:24 - 25:29
    that the stuff that time for a given
  • 25:27 - 25:31
    it's a small application it's basically
  • 25:29 - 25:32
    a HelloWorld application there is a
  • 25:31 - 25:35
    small improvement
  • 25:32 - 25:37
    obviously the as faster we get the more
  • 25:35 - 25:39
    difficult it is to find large
  • 25:37 - 25:41
    improvement but still between 13 and 14
  • 25:39 - 25:43
    the startup time has been improved and I
  • 25:41 - 25:48
    can already tell you that between 14 and
  • 25:43 - 25:51
    15 it we still slightly improved now
  • 25:48 - 25:53
    this is basically the same benchmark but
  • 25:51 - 25:55
    with different scenarios so a hello
  • 25:53 - 25:56
    world application a hello world
  • 25:55 - 25:58
    application that uses a lambda
  • 25:56 - 26:00
    expression and then a hello world
  • 25:58 - 26:02
    application that is using a conquered
  • 26:00 - 26:04
    string I think I knew basically seen
  • 26:02 - 26:06
    that across all the release we are
  • 26:04 - 26:08
    improving the startup time for those
  • 26:06 - 26:11
    different scenarios so that's something
  • 26:08 - 26:13
    that again is useful over time whenever
  • 26:11 - 26:20
    you switch to a larger to a newer
  • 26:13 - 26:24
    version of Java so now let's talk so we
  • 26:20 - 26:26
    have discussed about the GC which which
  • 26:24 - 26:29
    is one of that those ambitious project
  • 26:26 - 26:32
    basically having a new garbage
  • 26:29 - 26:35
    collectors that provide low latency
  • 26:32 - 26:37
    another one that deal with memory
  • 26:35 - 26:41
    is project Valhalla and that that is a
  • 26:37 - 26:43
    clearly very ambitious project so the
  • 26:41 - 26:45
    code of general of vanilla is basically
  • 26:43 - 26:49
    to reboot the relationship that the gvm
  • 26:45 - 26:51
    are with the data in memory so if you
  • 26:49 - 26:53
    know Java you know that Java is very
  • 26:51 - 26:56
    good at optimizing code we have for
  • 26:53 - 27:00
    example a JIT compiler that will improve
  • 26:56 - 27:02
    over time your code as it runs so on
  • 27:00 - 27:04
    that side we're good but the next step
  • 27:02 - 27:08
    is we to look on how we can optimize a
  • 27:04 - 27:10
    data in memory now there's an issue we
  • 27:08 - 27:12
    have the jet d'eau Java type systems
  • 27:10 - 27:15
    something that obviously is very
  • 27:12 - 27:17
    powerful but there is a price price to
  • 27:15 - 27:20
    pay and sometimes we miss a bit of
  • 27:17 - 27:22
    flexibility and that's basically due to
  • 27:20 - 27:25
    the fact that each object has an
  • 27:22 - 27:27
    identity it's something that obviously
  • 27:25 - 27:30
    is needed we are not going to get rid of
  • 27:27 - 27:33
    object identity it enables mobility
  • 27:30 - 27:35
    polymorphism and so on and so on on the
  • 27:33 - 27:39
    other hand there are some use case where
  • 27:35 - 27:41
    objects might not need identity but
  • 27:39 - 27:44
    still today they have to pay the price
  • 27:41 - 27:47
    for that features even though those
  • 27:44 - 27:51
    object might not benefit from identity
  • 27:47 - 27:54
    so basically project Valhalla is looking
  • 27:51 - 27:57
    at how we can improve the density of
  • 27:54 - 28:00
    information within memory and the thing
  • 27:57 - 28:04
    that the team is looking at is basically
  • 28:00 - 28:07
    how we can declaratively say that ok for
  • 28:04 - 28:09
    that type of object I don't need that
  • 28:07 - 28:12
    object to handle an identity it's not
  • 28:09 - 28:14
    something that can be done automatically
  • 28:12 - 28:16
    so that we involve some help from the
  • 28:14 - 28:19
    developers so the developer will have to
  • 28:16 - 28:21
    specifically say or specifically say ok
  • 28:19 - 28:24
    for that type of object I don't need
  • 28:21 - 28:26
    identity and then the VM will be able to
  • 28:24 - 28:29
    improve out those object will be stored
  • 28:26 - 28:33
    into memory and the VM will be able to
  • 28:29 - 28:38
    increase the density to a memory density
  • 28:33 - 28:44
    for those type of objects another pro
  • 28:38 - 28:47
    is projecting so if you look today they
  • 28:44 - 28:49
    are well I will simplify a little bit
  • 28:47 - 28:53
    but there are two types of programming
  • 28:49 - 28:56
    approach so you have a traditional
  • 28:53 - 28:59
    blocking approach so it's very easy to
  • 28:56 - 29:00
    program to develop with the thing is
  • 28:59 - 29:03
    that well it's so it's very easy to
  • 29:00 - 29:05
    develop it's also very easy to debug the
  • 29:03 - 29:08
    thing is that that approach doesn't
  • 29:05 - 29:10
    scale as soon as your code blocks
  • 29:08 - 29:12
    well basically your code is waiting for
  • 29:10 - 29:14
    something to happen so you are using
  • 29:12 - 29:16
    while you are blocking resources
  • 29:14 - 29:19
    that's not very effective on the other
  • 29:16 - 29:23
    hand you can go for a model that is more
  • 29:19 - 29:24
    geared towards a reactive approach the
  • 29:23 - 29:26
    thing is that developing reactive
  • 29:24 - 29:29
    application well that's on one hand a
  • 29:26 - 29:33
    very difficult model to program with and
  • 29:29 - 29:37
    more importantly that the code you write
  • 29:33 - 29:39
    is very difficult to debug enhance to
  • 29:37 - 29:41
    maintain typically if you try to debug a
  • 29:39 - 29:43
    reactive application well you see that
  • 29:41 - 29:45
    something you have an issue here but in
  • 29:43 - 29:48
    fact the issue is not reopening on that
  • 29:45 - 29:50
    well in that region of the application
  • 29:48 - 29:52
    but it happens on for somewhere else but
  • 29:50 - 29:54
    it's very basically it's very difficult
  • 29:52 - 29:57
    to do correlation between an issue and
  • 29:54 - 30:00
    where it happened within the flow of the
  • 29:57 - 30:02
    code but still if you want to scale if
  • 30:00 - 30:04
    you want to have efficient resource use
  • 30:02 - 30:08
    of you you need to go to other approach
  • 30:04 - 30:11
    that approach so a project loom is
  • 30:08 - 30:14
    basically trying to solve that by making
  • 30:11 - 30:18
    concurrency simple again ow
  • 30:14 - 30:21
    right now the JVM is using native
  • 30:18 - 30:23
    threads kernel threads loom introduced
  • 30:21 - 30:27
    the notion of your 12 threads which are
  • 30:23 - 30:30
    basically two threads that are managed
  • 30:27 - 30:34
    by the JVM so those threads are some
  • 30:30 - 30:36
    kind of well visual threads software
  • 30:34 - 30:39
    threads that are managed and he ruled by
  • 30:36 - 30:40
    the JVM and obviously the JVM will have
  • 30:39 - 30:43
    to do mapping between those virtual
  • 30:40 - 30:45
    thread and some underlying kernel
  • 30:43 - 30:48
    carrier thread but that that isn't
  • 30:45 - 30:50
    dulled by the JVM and the thing is that
  • 30:48 - 30:52
    those virtual threads are very very
  • 30:50 - 30:53
    cheap so it doesn't
  • 30:52 - 30:55
    it's not a really an issue to write code
  • 30:53 - 30:57
    that is blocking because the virtual
  • 30:55 - 31:01
    thread that is blocking is not blocking
  • 30:57 - 31:03
    an actual underlying physical threads so
  • 31:01 - 31:05
    basically you can write application
  • 31:03 - 31:07
    using virtual thread your code can
  • 31:05 - 31:12
    blocks but you don't have to pay of
  • 31:07 - 31:16
    resource and the virtualization so those
  • 31:12 - 31:18
    that are so cheap that it well you don't
  • 31:16 - 31:20
    have an ax you don't haven't have to
  • 31:18 - 31:22
    pull those threads so you just block the
  • 31:20 - 31:25
    thread and you you start a new thread
  • 31:22 - 31:27
    it's it's it's it's not an issue because
  • 31:25 - 31:29
    those threads are very cheap so that's
  • 31:27 - 31:32
    basically what a loom is trying to
  • 31:29 - 31:36
    solved now those days we have multiple
  • 31:32 - 31:37
    early access build of loom if we look in
  • 31:36 - 31:40
    the platform there are already a few
  • 31:37 - 31:42
    gems that are been that have been added
  • 31:40 - 31:46
    in the platform for loom and more
  • 31:42 - 31:48
    specifically in GDK 14 we have we have
  • 31:46 - 31:51
    hope we implemented the legacy socket
  • 31:48 - 31:53
    API that was something in preparation
  • 31:51 - 31:55
    for something that's coming in JDK 15
  • 31:53 - 31:58
    which is or implementing the legacy data
  • 31:55 - 32:04
    so grew that diagram socket API which
  • 31:58 - 32:08
    has been done in preparation of flume so
  • 32:04 - 32:10
    another large project is Panama so the
  • 32:08 - 32:12
    goal of Panama is basically to arrange
  • 32:10 - 32:14
    to enrich the interaction between the
  • 32:12 - 32:19
    Java Virtual Machine and a foreign
  • 32:14 - 32:22
    native code historically we had gni for
  • 32:19 - 32:24
    that Java native interface but gni has
  • 32:22 - 32:27
    been specifically designed in the early
  • 32:24 - 32:30
    days to be I would say not friendly to
  • 32:27 - 32:33
    use we want to basically provide an
  • 32:30 - 32:36
    alternative to Ginny I wear it is easy
  • 32:33 - 32:41
    safe and efficient to use from Java
  • 32:36 - 32:44
    nutella's to use native code from Java
  • 32:41 - 32:47
    if we look at the deliverables of Panama
  • 32:44 - 32:50
    there are three main deliverables the
  • 32:47 - 32:52
    foreign memory access API which is in 14
  • 32:50 - 32:54
    in incubator so that's something that
  • 32:52 - 32:56
    you can use already today
  • 32:54 - 33:01
    it basically allowed to efficiently and
  • 32:56 - 33:03
    safely use of memory of that is not on
  • 33:01 - 33:05
    the Java app but you can access that
  • 33:03 - 33:08
    memory from Java code
  • 33:05 - 33:10
    then there is an extraction part it's
  • 33:08 - 33:18
    basically the ability to extract from
  • 33:10 - 33:20
    sea native header files so the extract
  • 33:18 - 33:23
    interface and generate binders that you
  • 33:20 - 33:25
    can use directly from Java code there
  • 33:23 - 33:27
    are two parts for the extraction parts
  • 33:25 - 33:29
    that there is a tool that mimic that
  • 33:27 - 33:32
    mechanically do the extraction but there
  • 33:29 - 33:34
    also no API that more advanced developer
  • 33:32 - 33:37
    can use to meet more advanced scenarios
  • 33:34 - 33:39
    and last but not least there's the
  • 33:37 - 33:41
    vector API which allows to easily
  • 33:39 - 33:43
    express vector computation that will
  • 33:41 - 33:48
    compile at runtime and execute on a
  • 33:43 - 33:54
    vector on CPU that support vector vector
  • 33:48 - 33:58
    eyes extension such as SSE or AVX 4md
  • 33:54 - 34:01
    your arms scalable vector extension and
  • 33:58 - 34:03
    the vector RP I is right now in
  • 34:01 - 34:04
    incubator candidate so we don't know
  • 34:03 - 34:07
    yeah
  • 34:04 - 34:10
    yet in which GD Carol is it will be
  • 34:07 - 34:12
    headed so today what we have for loom is
  • 34:10 - 34:13
    the foreign memory access API in
  • 34:12 - 34:14
    incubator that's something that you can
  • 34:13 - 34:18
    use and we also have a early access
  • 34:14 - 34:21
    build for the extraction part and then I
  • 34:18 - 34:24
    also put this in the Panama part even
  • 34:21 - 34:26
    though that specific job is not really
  • 34:24 - 34:28
    part of Panama but given that it's very
  • 34:26 - 34:31
    close to the hardware and well I put it
  • 34:28 - 34:35
    here so jet 3-5-2 basically had the
  • 34:31 - 34:38
    ability to manage non-volatile memory
  • 34:35 - 34:40
    via byte buffer that's something very
  • 34:38 - 34:44
    specific so I'm not going to discuss
  • 34:40 - 34:51
    about that anymore so what I'm going to
  • 34:44 - 34:52
    do now is a very small Panama demo so it
  • 34:51 - 35:01
    takes a bit of time
  • 34:52 - 35:03
    switch okay so let's see so I hope that
  • 35:01 - 35:07
    it's big enough
  • 35:03 - 35:10
    so whatever here I have a very simple
  • 35:07 - 35:16
    java application but first I'm going to
  • 35:10 - 35:23
    go let's see where is it no so I'm on
  • 35:16 - 35:23
    six this is a Linux so I sign in Linux
  • 35:27 - 35:39
    no I don't want to do that well I fit
  • 35:34 - 35:45
    the name and sorry let me check okay
  • 35:39 - 35:48
    this this or sorry too small you know
  • 35:45 - 35:52
    it's red line so this is a header file
  • 35:48 - 35:54
    that is part of a five six so this is a
  • 35:52 - 35:56
    real line library that basically give us
  • 35:54 - 35:58
    read line support of something very
  • 35:56 - 36:01
    basic so there are multiple function and
  • 35:58 - 36:03
    what I want to do here is you use one of
  • 36:01 - 36:05
    the one of the red line function from
  • 36:03 - 36:08
    Java so the first thing that I need to
  • 36:05 - 36:12
    do is use the extract tool to basically
  • 36:08 - 36:14
    parse the red line header files to
  • 36:12 - 36:16
    extract all the information and then
  • 36:14 - 36:19
    generate the binder interface for that
  • 36:16 - 36:22
    so I'm going to use this G extract tool
  • 36:19 - 36:24
    so and I specify here that this is the
  • 36:22 - 36:27
    past for example of the library the G
  • 36:24 - 36:29
    the riddling library this is the path of
  • 36:27 - 36:34
    the header file that we want to x-ray it
  • 36:29 - 36:37
    and what I want is that I want the
  • 36:34 - 36:37
    outcome to be in that a jar file
  • 36:38 - 36:44
    obviously I'm not on the right version
  • 36:40 - 36:53
    so let's see I'm on 14 and I'm I need to
  • 36:44 - 36:56
    switch G so I'm going to switch to a
  • 36:53 - 37:01
    specific GDK build that support panama
  • 36:56 - 37:05
    and it's 14 I think oops
  • 37:01 - 37:08
    ramaa yes so let's invoke jig strike G
  • 37:05 - 37:08
    extract again
  • 37:12 - 37:18
    okay bunch of warning but this is a
  • 37:15 - 37:21
    early access build okay now I have this
  • 37:18 - 37:23
    jar that has been generated so what I
  • 37:21 - 37:26
    want to do is basically I have this
  • 37:23 - 37:27
    small java application we can very
  • 37:26 - 37:30
    quickly go over the code of that
  • 37:27 - 37:35
    application so a scope is something that
  • 37:30 - 37:38
    is provided by the foreign memory yes
  • 37:35 - 37:41
    the foreign memory api of panama and
  • 37:38 - 37:43
    basically scope are used to enforce
  • 37:41 - 37:46
    lightness checks on scope resources so
  • 37:43 - 37:48
    it's basically some sort of memory but
  • 37:46 - 37:51
    that we were allocated on the other side
  • 37:48 - 37:54
    so on the native side we need to enforce
  • 37:51 - 37:55
    likeness because whenever we are locate
  • 37:54 - 37:57
    on the other sides of the fence so on
  • 37:55 - 37:59
    the native side obviously at some point
  • 37:57 - 38:02
    in time what has been allocated needs to
  • 37:59 - 38:06
    be dedicated so that's why we need scope
  • 38:02 - 38:10
    so I create a scope then from that scope
  • 38:06 - 38:12
    has I allocate a string I pass it I pass
  • 38:10 - 38:15
    in the screen name so we're on the on
  • 38:12 - 38:17
    the sea side and then I'm just invoking
  • 38:15 - 38:20
    that function that is coming from the
  • 38:17 - 38:21
    redline library using this pointer that
  • 38:20 - 38:24
    is defined here so basically I'm just
  • 38:21 - 38:26
    passing this string to the native
  • 38:24 - 38:29
    function and what we get in return is a
  • 38:26 - 38:32
    P object which is a pointer and then I'm
  • 38:29 - 38:34
    just deploying displaying that object so
  • 38:32 - 38:36
    this is a two string method invocation
  • 38:34 - 38:39
    on the P so on the pointer object and
  • 38:36 - 38:41
    then I use this static method to
  • 38:39 - 38:48
    basically get the content of that
  • 38:41 - 38:48
    pointer so let's compile that so Java C
  • 38:50 - 39:02
    let's see class bus I specify the jar
  • 38:56 - 39:08
    redline and then the source okay now I
  • 39:02 - 39:08
    need to run that
  • 39:10 - 39:21
    that guy so name so this is basically
  • 39:18 - 39:25
    this line here where we invoke the real
  • 39:21 - 39:28
    line so this is the CE OS six function
  • 39:25 - 39:31
    that is invoke I pass it's something
  • 39:28 - 39:34
    test and then the result is the
  • 39:31 - 39:35
    following so it's a so the type is a
  • 39:34 - 39:38
    bonding pointer so this is this line in
  • 39:35 - 39:42
    fact to string on that P object-- which
  • 39:38 - 39:44
    is a pointer and then so this is all the
  • 39:42 - 39:45
    result of the two string information all
  • 39:44 - 39:48
    the information that we get the idea to
  • 39:45 - 39:52
    string and then the last thing is this
  • 39:48 - 39:54
    test which is basically we asked the
  • 39:52 - 39:56
    foreign memory API to give us the
  • 39:54 - 39:58
    content that is pointed on the other
  • 39:56 - 40:02
    side of the fence but by that given
  • 39:58 - 40:02
    pointer so this is in a nutshell how
  • 40:03 - 40:11
    panamá works so if you if you have any
  • 40:09 - 40:14
    question you can use the chat or we can
  • 40:11 - 40:17
    discuss at the end it's up to you so
  • 40:14 - 40:19
    moving on another big project is a
  • 40:17 - 40:21
    project ember so the goal of amber is
  • 40:19 - 40:23
    basically to continue continuously
  • 40:21 - 40:25
    improve developer productivity through
  • 40:23 - 40:26
    the evolution of the java language so
  • 40:25 - 40:28
    it's not something that happened through
  • 40:26 - 40:31
    one single release it's something that
  • 40:28 - 40:34
    we have started around a Java 10 and
  • 40:31 - 40:35
    since Java 10 we have hadded new
  • 40:34 - 40:38
    features which are basically emerging
  • 40:35 - 40:41
    from project amber var is a big one so
  • 40:38 - 40:45
    variable type inference was added in 10
  • 40:41 - 40:47
    in 14 we're having switch expression it
  • 40:45 - 40:50
    becomes a standard features after to run
  • 40:47 - 40:53
    off preview we're doing another round of
  • 40:50 - 40:56
    preview for text blocks we are
  • 40:53 - 40:59
    introducing records weren't sure
  • 40:56 - 41:02
    introducing also pattern matching with
  • 40:59 - 41:06
    instance of in preview 2 so I'm going to
  • 41:02 - 41:10
    discuss most of those features so the
  • 41:06 - 41:10
    first one is a record so
  • 41:11 - 41:17
    course basically give you the ability to
  • 41:14 - 41:19
    so they are providing a very compact
  • 41:17 - 41:21
    syntax for declaring class which are
  • 41:19 - 41:24
    data holder so basically a couple
  • 41:21 - 41:26
    inimitable trouble in which you can
  • 41:24 - 41:30
    store data and that's something that you
  • 41:26 - 41:31
    can basically pass around I'm going to
  • 41:30 - 41:33
    show you how it work so you will see
  • 41:31 - 41:36
    that well it's something that is a on
  • 41:33 - 41:40
    one hand very simple but on your hand
  • 41:36 - 41:43
    very efficient something else that is
  • 41:40 - 41:48
    coming from amber is a text blocks
  • 41:43 - 41:49
    so basically text blocks are multi-line
  • 41:48 - 41:51
    string literals
  • 41:49 - 41:55
    so take the following example so you
  • 41:51 - 41:57
    want to store the HTML that we have on
  • 41:55 - 42:00
    the left side typically you would do
  • 41:57 - 42:02
    something in your code with text blocks
  • 42:00 - 42:05
    you can now do that
  • 42:02 - 42:07
    so you basically keep the Descent acts
  • 42:05 - 42:09
    as it is you don't have to escape
  • 42:07 - 42:12
    anything this is something which is very
  • 42:09 - 42:14
    convenient for dealing with XML JSON ml
  • 42:12 - 42:16
    SQL and so on again that's something
  • 42:14 - 42:22
    that we will see in a demo in a minute
  • 42:16 - 42:24
    so then we have a pattern matching
  • 42:22 - 42:26
    that's something that we will see in the
  • 42:24 - 42:30
    demo it will be more clear and finally
  • 42:26 - 42:33
    we have a new switch expression so let's
  • 42:30 - 42:43
    go to the demo that will be a more
  • 42:33 - 42:46
    concrete so let's see well intelligence
  • 42:43 - 42:49
    already started so I'm going to very
  • 42:46 - 42:49
    quickly create a new project
  • 42:58 - 43:09
    I need to configure my compiler because
  • 43:05 - 43:14
    I don't know why but by default generate
  • 43:09 - 43:15
    Java c5 bytecode and then I also need to
  • 43:14 - 43:18
    configure my project and I'm gonna
  • 43:15 - 43:19
    increase the font for the code don't
  • 43:18 - 43:23
    worry
  • 43:19 - 43:24
    so here given that I'm gonna use SR it's
  • 43:23 - 43:26
    not here it's here
  • 43:24 - 43:28
    given that I'm going to use some preview
  • 43:26 - 43:30
    feature I need to ask specifically tell
  • 43:28 - 43:32
    to IntelliJ that I want to use preview
  • 43:30 - 43:35
    features because preview features are
  • 43:32 - 43:39
    not enabled by default and I also need
  • 43:35 - 43:45
    to do it let's see here so again I'm
  • 43:39 - 44:08
    going to use 14 preview features okay so
  • 43:45 - 44:21
    a source ok so let's just run that and
  • 44:08 - 44:22
    see if it works ok it works
  • 44:21 - 44:26
    so the first thing that I'm going to
  • 44:22 - 44:28
    show you is recourse so let's create a
  • 44:26 - 44:33
    record let's say that we want to create
  • 44:28 - 44:40
    a record for a persona and a person as a
  • 44:33 - 44:40
    name and a person as a first name and
  • 44:40 - 44:43
    that's it
  • 44:40 - 44:48
    it's all we have to do now what I can do
  • 44:43 - 44:48
    in my code is the following for example
  • 44:49 - 45:03
    so I can create a record and today
  • 44:57 - 45:03
    speakers is the let us say David oops
  • 45:17 - 45:27
    oops sorry it's obviously not a record
  • 45:21 - 45:29
    about a person okay so now I have this
  • 45:27 - 45:43
    speaker object that I can use so for
  • 45:29 - 45:45
    example a speaker so let's run that so
  • 45:43 - 45:47
    this is the result so this is basically
  • 45:45 - 45:51
    the to do to string method that is
  • 45:47 - 45:57
    invoke ated on that speaker object so
  • 45:51 - 46:02
    let's have a look at what has been what
  • 45:57 - 46:03
    we are here so target class we should
  • 46:02 - 46:06
    have two class so we have the test class
  • 46:03 - 46:07
    and we have this person claps so this is
  • 46:06 - 46:11
    our record so if we look at the record
  • 46:07 - 46:13
    itself so just by this simple
  • 46:11 - 46:15
    declaration we see that we have a few
  • 46:13 - 46:18
    methods that have been generated so
  • 46:15 - 46:21
    generated so the class person is final
  • 46:18 - 46:23
    it extends java.lang records it has a
  • 46:21 - 46:25
    few methods so it has a constructor it
  • 46:23 - 46:27
    has a two string it has a it has a
  • 46:25 - 46:30
    default ascot methods it has an equals
  • 46:27 - 46:33
    and then it has two gathers last and
  • 46:30 - 46:41
    first name so that means that I can for
  • 46:33 - 46:43
    example invoke one of those and we use
  • 46:41 - 46:45
    one of those method and you see that
  • 46:43 - 46:48
    this time we have the lab assay instead
  • 46:45 - 46:50
    of the two string so what we can do if
  • 46:48 - 46:52
    we look at the record itself obviously
  • 46:50 - 46:55
    this is the default behavior
  • 46:52 - 47:00
    I haven't specified anything I can
  • 46:55 - 47:12
    define my own constructor so person I
  • 47:00 - 47:13
    can say for example that let's see we
  • 47:12 - 47:17
    want to upper
  • 47:13 - 47:33
    case all the names right so let's run
  • 47:17 - 47:36
    that so you see that the lab assay is
  • 47:33 - 47:37
    now in uppercase and you see that the
  • 47:36 - 47:40
    only thing I had to do is basically I
  • 47:37 - 47:42
    just have to specify what needs to be
  • 47:40 - 47:45
    done with one of the the field I didn't
  • 47:42 - 47:46
    have to specify anything for the first
  • 47:45 - 47:49
    field so it has a default behavior but
  • 47:46 - 47:56
    now if I'm doing something like this for
  • 47:49 - 48:10
    example if let's see last is blank then
  • 47:56 - 48:14
    this last equal Nemo's here the compiler
  • 48:10 - 48:16
    will complain because last might not
  • 48:14 - 48:19
    have been initialized so if we go
  • 48:16 - 48:21
    through this branch of course last easy
  • 48:19 - 48:24
    last is initialized but that means that
  • 48:21 - 48:26
    we if we have a else it won't be so if
  • 48:24 - 48:27
    last name is not blank it won't be
  • 48:26 - 48:30
    initialized so to solve that basically
  • 48:27 - 48:36
    we need two other in this case a health
  • 48:30 - 48:38
    and so else this last fall's plus in
  • 48:36 - 48:42
    this case we have a default for second
  • 48:38 - 48:54
    branch and this case it it works so if I
  • 48:42 - 48:57
    have a blanks let's run that and you see
  • 48:54 - 49:00
    that this time oops sorry
  • 48:57 - 49:02
    it's the the first time is an animal's
  • 49:00 - 49:05
    because it is blank so that's basically
  • 49:02 - 49:11
    our record works
  • 49:05 - 49:11
    the next thing text blocks so let's see
  • 49:13 - 49:20
    for that I'm gonna yes so this is the my
  • 49:18 - 49:23
    the poem that has been generated so it's
  • 49:20 - 49:26
    just some XML so it's the pump from my
  • 49:23 - 49:29
    project and well I want
  • 49:26 - 49:31
    a string for that so for that I'm going
  • 49:29 - 49:37
    to use a text block so for that I'm used
  • 49:31 - 49:45
    a triple quotes and that's all it takes
  • 49:37 - 49:45
    now I can do so from South if I run that
  • 49:47 - 49:55
    well you see that the text blocks has
  • 49:53 - 49:58
    been is correctly including the ident a
  • 49:55 - 50:03
    tion because here I'm basically copy the
  • 49:58 - 50:05
    HTML as it was so what what I've done
  • 50:03 - 50:06
    here is basically I kept the ident Asian
  • 50:05 - 50:08
    but we will see we probably don't want
  • 50:06 - 50:12
    to have all those space in front that's
  • 50:08 - 50:14
    something that takes blog handles for us
  • 50:12 - 50:16
    something else that we can do is for
  • 50:14 - 50:18
    example the following with text blocks
  • 50:16 - 50:26
    so they're not able to able to evaluate
  • 50:18 - 50:35
    the expression but well let's just do
  • 50:26 - 50:38
    that so how did a person has here and
  • 50:35 - 50:44
    now I can use formatted and let's see
  • 50:38 - 50:53
    and what I want here is the speaker
  • 50:44 - 50:53
    first for example so let's run that
  • 50:53 - 51:05
    yep sorry typo it's a method so if we
  • 51:03 - 51:07
    look at the HTML you we see that here
  • 51:05 - 51:08
    well it's not class but it's the first
  • 51:07 - 51:13
    name but you get the idea so basically
  • 51:08 - 51:16
    we can do some kind of cheap expression
  • 51:13 - 51:18
    interpolation using formatted with text
  • 51:16 - 51:21
    blocks so that's basically our texworks
  • 51:18 - 51:24
    text blocks works now let's move on to
  • 51:21 - 51:30
    another features of number and that's
  • 51:24 - 51:34
    let's pattern matching so pattern
  • 51:30 - 51:37
    matching so you see we have this speaker
  • 51:34 - 51:41
    object which in fact is a person so that
  • 51:37 - 51:50
    means that we can do something like
  • 51:41 - 51:53
    speaker first right so we would get
  • 51:50 - 51:57
    david but it might happen that the type
  • 51:53 - 51:59
    of that object is of that yes of that
  • 51:57 - 52:00
    speaker would be object in that case if
  • 51:59 - 52:02
    you see we cannot directly invoke the
  • 52:00 - 52:04
    first method so what would would
  • 52:02 - 52:12
    typically do with something like this so
  • 52:04 - 52:23
    if speaker instance of it's a person so
  • 52:12 - 52:28
    if it's a person then what we do we
  • 52:23 - 52:33
    create a new object so it's a person
  • 52:28 - 52:37
    object X equal to a speaker but we have
  • 52:33 - 52:39
    two specific cast it to person type and
  • 52:37 - 52:42
    here obviously we want with the
  • 52:39 - 52:45
    exception so that works so the thing is
  • 52:42 - 52:47
    that here you see that if we have this
  • 52:45 - 52:49
    type we create an object of that same
  • 52:47 - 52:51
    type and we cast it from the other
  • 52:49 - 52:53
    object using that same type there are a
  • 52:51 - 52:56
    lot of repetition going on what we can
  • 52:53 - 52:59
    do now with pattern matching instance of
  • 52:56 - 53:02
    energy TK 14 is the following so we
  • 52:59 - 53:06
    declare the new variable here and that's
  • 53:02 - 53:08
    it so if you run this
  • 53:06 - 53:08
    we'll get the exact the exact same
  • 53:08 - 53:12
    behavior
  • 53:08 - 53:14
    so hello Davi this is the first one and
  • 53:12 - 53:17
    hello David this is the second one and
  • 53:14 - 53:23
    you see that this one is more 6n so it's
  • 53:17 - 53:25
    more obvious to use so the last one and
  • 53:23 - 53:26
    I'm probably gonna skip that one because
  • 53:25 - 53:29
    it takes a bit of time is this
  • 53:26 - 53:34
    expression so it's a new type of switch
  • 53:29 - 53:36
    expression that works like this so this
  • 53:34 - 53:38
    is on the left side this is how we
  • 53:36 - 53:41
    traditionally works the thing attacked
  • 53:38 - 53:44
    for example here there's a bug in the
  • 53:41 - 53:48
    sense that there is no break here so if
  • 53:44 - 53:50
    I do a switch on let's say Friday well
  • 53:48 - 53:51
    number of character will be 6 and then
  • 53:50 - 53:56
    it would be 7 so that would be the end
  • 53:51 - 53:58
    result 7 in this case I'm doing a switch
  • 53:56 - 54:00
    over an enumeration so all the values
  • 53:58 - 54:03
    are no because when numeration but still
  • 54:00 - 54:05
    if I miss for example one of the day the
  • 54:03 - 54:07
    compiler will not be able to tell me
  • 54:05 - 54:09
    okay you are not evaluating windows day
  • 54:07 - 54:12
    for example so that's why we have a
  • 54:09 - 54:15
    default but given that we know all the
  • 54:12 - 54:18
    value the default is a bit well it's a
  • 54:15 - 54:21
    bit hot to have to use a default value
  • 54:18 - 54:24
    so what we can do now there is a
  • 54:21 - 54:28
    question we will we be able to use
  • 54:24 - 54:30
    recorded GBA GP entities and not
  • 54:28 - 54:32
    directly something that well you can use
  • 54:30 - 54:33
    records with GPA but the thing that you
  • 54:32 - 54:36
    have to keep in mind is that records are
  • 54:33 - 54:41
    immutable so you cannot change with any
  • 54:36 - 54:43
    fills as soon as it has been created so
  • 54:41 - 54:46
    let's go back to these to the switch
  • 54:43 - 54:49
    expression this is the new switch
  • 54:46 - 54:52
    expression it basically returns the
  • 54:49 - 54:53
    value directly so something we were not
  • 54:52 - 54:56
    able to do in the former switch
  • 54:53 - 54:57
    expression so that well that's why this
  • 54:56 - 54:59
    is on the left side the switch statement
  • 54:57 - 55:01
    and this is an expression because it
  • 54:59 - 55:04
    returns the value so we have all the
  • 55:01 - 55:07
    case given that again we are doing a
  • 55:04 - 55:09
    case on enumeration the compiler will
  • 55:07 - 55:12
    test tell us if if for example were
  • 55:09 - 55:14
    missing a day so if we are missing a day
  • 55:12 - 55:16
    either we had this day or we have to
  • 55:14 - 55:19
    deal with the default value if we are
  • 55:16 - 55:22
    dealing with all the days and if
  • 55:19 - 55:24
    we have a default value the default will
  • 55:22 - 55:28
    never be rich so that's something that
  • 55:24 - 55:30
    the compiler can can also infer that the
  • 55:28 - 55:33
    default branch will is basically a dead
  • 55:30 - 55:35
    branch those kind of things so that's in
  • 55:33 - 55:37
    a nutshell the switch expression so I'm
  • 55:35 - 55:40
    going to move a little bit because I'm a
  • 55:37 - 55:44
    bit ahead of time I'm sorry
  • 55:40 - 55:47
    shouldn't my bad I switch the slide I
  • 55:44 - 55:54
    should then switch moved out of the
  • 55:47 - 55:59
    slides so the amber demo we have seen
  • 55:54 - 56:00
    the amber demo so those are some of the
  • 55:59 - 56:02
    project that the more ambitious
  • 56:00 - 56:04
    long-term project that we're working on
  • 56:02 - 56:05
    what we see is that gradually some of
  • 56:04 - 56:08
    the features emerging from this project
  • 56:05 - 56:10
    are headed in Java so we've seen the
  • 56:08 - 56:12
    foreign memory coming from loom for
  • 56:10 - 56:14
    example we've seen Alhambra has added
  • 56:12 - 56:19
    multiple features or since Java 10 in
  • 56:14 - 56:21
    the Java platform but obviously the Java
  • 56:19 - 56:24
    platform is not all about huge an
  • 56:21 - 56:27
    ambitious project in 14 we have this new
  • 56:24 - 56:31
    elf full new pointer exception jab 3 5 8
  • 56:27 - 56:32
    so we have all seen seen that kind of
  • 56:31 - 56:34
    code where we basically have a new
  • 56:32 - 56:36
    pointers so it's not a big deal because
  • 56:34 - 56:39
    the we know where the new point shows
  • 56:36 - 56:42
    happened so line 6 6 6 so we just have
  • 56:39 - 56:44
    to look at that line right the thing is
  • 56:42 - 56:47
    that line might looks like the following
  • 56:44 - 56:50
    so we know that it's happened here but
  • 56:47 - 56:54
    we really have no idea where it happened
  • 56:50 - 56:56
    exactly that's what the new pointers the
  • 56:54 - 56:57
    helpful with pointers option gives us so
  • 56:56 - 57:01
    that's something that you have to
  • 56:57 - 57:03
    explicitly enable in a 14 and now you
  • 57:01 - 57:06
    will have something like this so it
  • 57:03 - 57:09
    cannot involve the city get district
  • 57:06 - 57:11
    because the return value of get city is
  • 57:09 - 57:14
    null so it basically gives us more
  • 57:11 - 57:15
    information to help us to pinpoint the
  • 57:14 - 57:17
    exact issue that raised that new
  • 57:15 - 57:20
    pointers so that's something that is
  • 57:17 - 57:23
    available as a standard feature in 14
  • 57:20 - 57:25
    it's not in available enabled by default
  • 57:23 - 57:29
    and I've seen some discussion where in
  • 57:25 - 57:31
    15 it might be enabled by default so
  • 57:29 - 57:34
    it's a it's a small features but it's a
  • 57:31 - 57:34
    very convenient features
  • 57:34 - 57:40
    GDK flight recorder is something that is
  • 57:38 - 57:44
    available I think since Java 11 and the
  • 57:40 - 57:46
    basic idea of JDK of flight recorder GFR
  • 57:44 - 57:48
    it's a black box that keeps track of
  • 57:46 - 57:50
    even that are emitted by different
  • 57:48 - 57:54
    component within the GDK itself so it
  • 57:50 - 57:59
    can be the JVM it can be your code so a
  • 57:54 - 58:01
    bunch of heavens are raised and GFR will
  • 57:59 - 58:03
    keep track of them and that's something
  • 58:01 - 58:05
    that you can use after the fact to do
  • 58:03 - 58:07
    some kind of analysis the thing is that
  • 58:05 - 58:08
    GFR is very low overhead so that's
  • 58:07 - 58:10
    something that you can use in production
  • 58:08 - 58:13
    to basically detect and pinpoint
  • 58:10 - 58:17
    specific issue something that we're
  • 58:13 - 58:22
    hiring in GDK 14 is even swimming so
  • 58:17 - 58:24
    until now the the way you were using GFR
  • 58:22 - 58:27
    was the following so you start the
  • 58:24 - 58:29
    recording of your application so you use
  • 58:27 - 58:31
    your application then you stop the
  • 58:29 - 58:34
    recording you dub the content of the
  • 58:31 - 58:38
    event to repository and then you process
  • 58:34 - 58:41
    those events now an application that is
  • 58:38 - 58:43
    running as the ability to stream out
  • 58:41 - 58:46
    event as they happen so you can
  • 58:43 - 58:49
    basically do is you can have some some
  • 58:46 - 58:51
    some cough some some sort of sidecar
  • 58:49 - 58:55
    application to do analysis of the event
  • 58:51 - 59:00
    as they happen so there is a specific
  • 58:55 - 59:02
    API to do that in GDK 14 the thing is
  • 59:00 - 59:05
    that obviously we're keeping we are
  • 59:02 - 59:08
    improving a GFR through all the release
  • 59:05 - 59:10
    so in 14 we are we had hundred and forty
  • 59:08 - 59:13
    five different event types for GFR and
  • 59:10 - 59:14
    in 15 I've checked in the late well it's
  • 59:13 - 59:17
    not the latest bill because we have done
  • 59:14 - 59:19
    at twenty to build yesterday but in the
  • 59:17 - 59:23
    middle of last week we are we had
  • 59:19 - 59:27
    hundred and fifty-seven GFR even type so
  • 59:23 - 59:30
    it it keeps GFR it in itself keeps to
  • 59:27 - 59:32
    have more matrix within the platform
  • 59:30 - 59:34
    that you can use and not only that you
  • 59:32 - 59:39
    can also write your own custom and even
  • 59:34 - 59:41
    type for your application something else
  • 59:39 - 59:44
    that is part of Gd k14 is this new
  • 59:41 - 59:46
    packaging tool Jib Jab 343 right now
  • 59:44 - 59:49
    it's still in an equation phase
  • 59:46 - 59:51
    so the idea of that tool is it's a tool
  • 59:49 - 59:53
    that gives you the ability to create
  • 59:51 - 59:55
    native installer specific for a given
  • 59:53 - 59:59
    platform so on Windows you will either
  • 59:55 - 60:02
    have an MSI or an excel file on my quest
  • 59:59 - 60:05
    you will have a big package file or a
  • 60:02 - 60:08
    dmg and so on and so on and it has a lot
  • 60:05 - 60:12
    of additional I would say native
  • 60:08 - 60:15
    features such as the ability to pass
  • 60:12 - 60:17
    parameters to the native executable that
  • 60:15 - 60:19
    will invoke that will do the
  • 60:17 - 60:21
    installation of your java application
  • 60:19 - 60:22
    and obviously work with jailings and so
  • 60:21 - 60:23
    on and so on
  • 60:22 - 60:25
    so that's something that you can use
  • 60:23 - 60:30
    today to basically create an activex
  • 60:25 - 60:34
    installer for your java code now let's
  • 60:30 - 60:36
    quickly look at java 15 so that's the
  • 60:34 - 60:43
    schedule nothing will change on that
  • 60:36 - 60:45
    front so this is a table that I did well
  • 60:43 - 60:48
    I did it yesterday and I checked this
  • 60:45 - 60:49
    morning it was still up to date so those
  • 60:48 - 60:55
    are the multiple job that will be part
  • 60:49 - 61:00
    of 15 I'm going to discuss specifically
  • 60:55 - 61:03
    to Jeb's that is a learning class and
  • 61:00 - 61:06
    where it's your the one I'll seal the
  • 61:03 - 61:11
    silk types you'll class it's not here
  • 61:06 - 61:12
    now I don't so yeah I miss one well
  • 61:11 - 61:15
    anyway it's on my slide later on oh yes
  • 61:12 - 61:19
    here sorry it see the other one is silk
  • 61:15 - 61:23
    class so so this slide shows the jet
  • 61:19 - 61:28
    that are either integrated so already in
  • 61:23 - 61:32
    the early build of GDK 15 or they are
  • 61:28 - 61:35
    targeted so then sorry targeted means
  • 61:32 - 61:38
    that we intend to add them to 15 or we
  • 61:35 - 61:39
    propose to target them though so that's
  • 61:38 - 61:41
    basically the first step before we
  • 61:39 - 61:44
    integrate them so we tell the community
  • 61:41 - 61:47
    okay we want to add that to 15 is there
  • 61:44 - 61:50
    any objection if not we will if we move
  • 61:47 - 61:52
    to target it and then one the works is
  • 61:50 - 61:55
    done it will move from targeted to
  • 61:52 - 61:58
    integrated so basically there is a very
  • 61:55 - 61:59
    high chance that all the jets here will
  • 61:58 - 62:04
    be part of
  • 61:59 - 62:07
    GDK 15 just keep in mind the small
  • 62:04 - 62:09
    disclaimer that we might find a big
  • 62:07 - 62:12
    issue in one of those one of the jab
  • 62:09 - 62:15
    here and we might decide to remove it at
  • 62:12 - 62:18
    the very last minute so that there's
  • 62:15 - 62:20
    always a risk and then there are a few
  • 62:18 - 62:22
    other jabs that are currently being
  • 62:20 - 62:26
    worked on and we don't know yet if there
  • 62:22 - 62:28
    will be part of 15 so one is silk class
  • 62:26 - 62:30
    and well there are a bunch of jet but I
  • 62:28 - 62:32
    just took three where clearly there are
  • 62:30 - 62:35
    a lot of activities going on right now
  • 62:32 - 62:37
    so maybe there will be part of 15 we
  • 62:35 - 62:40
    will see in a few weeks
  • 62:37 - 62:42
    and at worst by early June we will know
  • 62:40 - 62:45
    for sure if they are part of 15 or not
  • 62:42 - 62:47
    so silk class flow in memory access an
  • 62:45 - 62:49
    incubator so that's part of project loom
  • 62:47 - 62:52
    and then the vector API which is also
  • 62:49 - 62:56
    part of Project loom so I'm going to
  • 62:52 - 63:00
    very quickly discuss a hidden class and
  • 62:56 - 63:02
    seal class which are often confused so a
  • 63:00 - 63:05
    hidden class is something that is very
  • 63:02 - 63:09
    specifically that has been specifically
  • 63:05 - 63:12
    done for frameworks developers so if we
  • 63:09 - 63:15
    look at frameworks they have this habit
  • 63:12 - 63:18
    of dynamically generating classes and
  • 63:15 - 63:20
    use those classes through reflection the
  • 63:18 - 63:21
    thing is that those classes given that
  • 63:20 - 63:26
    they're generated can potentially be
  • 63:21 - 63:29
    used by Hodder slash external bytecode
  • 63:26 - 63:30
    something that we clearly don't want so
  • 63:29 - 63:32
    basically the ability of it edan class
  • 63:30 - 63:34
    give now frameworks developer the
  • 63:32 - 63:38
    ability to still generate dynamic e
  • 63:34 - 63:40
    classes on the fly but those class are
  • 63:38 - 63:42
    hidden for the rest of the world so only
  • 63:40 - 63:44
    the framers that generate those tasks
  • 63:42 - 63:46
    will be able to use those classes so it
  • 63:44 - 63:48
    targets frameworks developers but if we
  • 63:46 - 63:50
    look at Java C for example Java sees
  • 63:48 - 63:53
    your show using the techniques for
  • 63:50 - 63:55
    example for lambda expression so that's
  • 63:53 - 63:57
    something that is also useful for Java
  • 63:55 - 63:59
    itself and one of the thing that will be
  • 63:57 - 64:02
    done in addition to creating this new
  • 63:59 - 64:04
    facility is also deprecating the Sun
  • 64:02 - 64:07
    Myshkin safe define analysis that is
  • 64:04 - 64:11
    used exactly for doing that dynamically
  • 64:07 - 64:13
    generating generating classes so if you
  • 64:11 - 64:15
    look at the properties of those classes
  • 64:13 - 64:19
    well in terms of discovery
  • 64:15 - 64:21
    discoverability they shouldn't be
  • 64:19 - 64:24
    basically discovered by discoverable by
  • 64:21 - 64:27
    classes outside of the classes that has
  • 64:24 - 64:30
    created at that classes in terms of life
  • 64:27 - 64:34
    cycle it should those classes should be
  • 64:30 - 64:37
    able to be aggressively unloaded to give
  • 64:34 - 64:39
    the framers the ability to generate a
  • 64:37 - 64:41
    lot of classes and as soon as those
  • 64:39 - 64:44
    classes are not needed they will be
  • 64:41 - 64:45
    automatically garbage collected now they
  • 64:44 - 64:47
    can be garbage collected through a more
  • 64:45 - 64:50
    traditional approach that's something
  • 64:47 - 64:52
    that is but the behavior of the GC is
  • 64:50 - 64:54
    configurable for hidden classes but what
  • 64:52 - 64:56
    we know for sure is that the aggressive
  • 64:54 - 64:59
    unloading is something that is needed
  • 64:56 - 65:02
    and then access control that basically
  • 64:59 - 65:05
    give us the ability forecast that
  • 65:02 - 65:08
    creates dynamically another class to
  • 65:05 - 65:10
    access that class but that also prevent
  • 65:08 - 65:14
    other classes external to that classes
  • 65:10 - 65:16
    to access that newly created class so
  • 65:14 - 65:17
    that's basically none shall hidden
  • 65:16 - 65:19
    classes it's not something that you're
  • 65:17 - 65:21
    gonna use that most of the developers
  • 65:19 - 65:24
    like you and me will use it's clearly
  • 65:21 - 65:28
    something for frameworks developers and
  • 65:24 - 65:29
    then they are seed blast and some people
  • 65:28 - 65:34
    tend to confuse the two there are
  • 65:29 - 65:36
    completely different so before we talk
  • 65:34 - 65:38
    about seed class we need to quickly talk
  • 65:36 - 65:41
    about inheritance so inheritance is
  • 65:38 - 65:43
    something that encourage code reuse so
  • 65:41 - 65:45
    we basically have a class hierarchy and
  • 65:43 - 65:50
    all the class for example a class that X
  • 65:45 - 65:55
    and the class can reuse features from
  • 65:50 - 65:57
    the class that it extends for now the
  • 65:55 - 66:01
    thing is that the class hierarchy is
  • 65:57 - 66:03
    most of the quail is often used for code
  • 66:01 - 66:05
    reuse but sometimes it's used for
  • 66:03 - 66:07
    something completely different so the
  • 66:05 - 66:09
    class hierarchy is on is sometimes also
  • 66:07 - 66:12
    used to model different possibility of a
  • 66:09 - 66:14
    given gap of given domains so for
  • 66:12 - 66:15
    example we want to model the different
  • 66:14 - 66:17
    shape that are supported by a graphic
  • 66:15 - 66:22
    application so we would have a shape
  • 66:17 - 66:25
    class or interface and then we are have
  • 66:22 - 66:27
    subclasses that would extend that shape
  • 66:25 - 66:29
    classes like a square
  • 66:27 - 66:32
    the shapes on exactly next and shapes
  • 66:29 - 66:35
    and so on or we we can have a class that
  • 66:32 - 66:38
    representative type of vehicles that we
  • 66:35 - 66:40
    sell and then we would have I don't know
  • 66:38 - 66:45
    a CV a coupe sedan and so on that
  • 66:40 - 66:47
    extends that super classes so that's a
  • 66:45 - 66:49
    different something that is completely
  • 66:47 - 66:53
    different and the problem is that right
  • 66:49 - 66:54
    now if you have this shape superclass
  • 66:53 - 66:56
    that is extended by triangle circle
  • 66:54 - 66:59
    exact on and so on you cannot prevent
  • 66:56 - 67:00
    any other class to also extend it and
  • 66:59 - 67:05
    that's something that we would like to
  • 67:00 - 67:10
    well read with a sealed class so C Class
  • 67:05 - 67:12
    would basically allows to have a given
  • 67:10 - 67:14
    class hierarchy that is bounded so it
  • 67:12 - 67:19
    the class hierarchy can only be extended
  • 67:14 - 67:21
    by class within that limited closed
  • 67:19 - 67:23
    class hierarchy and not by any external
  • 67:21 - 67:25
    classes and every cycle we use would
  • 67:23 - 67:27
    still be possible but it would only be
  • 67:25 - 67:29
    possible within domain within the
  • 67:27 - 67:34
    boundary boundary of the closet class
  • 67:29 - 67:37
    hierarchy so how does that work well
  • 67:34 - 67:39
    let's have a look at an example that
  • 67:37 - 67:43
    would be more obvious so I have this
  • 67:39 - 67:47
    shape superclass and we have two new
  • 67:43 - 67:50
    keywords so we have sealed that is used
  • 67:47 - 67:52
    to basically say okay the class shape is
  • 67:50 - 67:54
    sealed and then we have the permits
  • 67:52 - 67:57
    keyword that tells which class or
  • 67:54 - 68:02
    interface can use that superclass so
  • 67:57 - 68:05
    sealed is sorry shape is sealed and only
  • 68:02 - 68:10
    in this example circle circle rectangle
  • 68:05 - 68:12
    and square are allowed to extend the
  • 68:10 - 68:14
    shapes and then there are a few
  • 68:12 - 68:16
    variations like the flag the fact that
  • 68:14 - 68:18
    if you are within the same package or SM
  • 68:16 - 68:21
    modules you can just use the class name
  • 68:18 - 68:25
    you don't have to use the full package
  • 68:21 - 68:30
    name if you have nested class so all the
  • 68:25 - 68:32
    classes within a single file source you
  • 68:30 - 68:35
    just seal the superclass and by default
  • 68:32 - 68:38
    all the classes that are present in the
  • 68:35 - 68:42
    same source file will be
  • 68:38 - 68:43
    permitted by default to extend that soup
  • 68:42 - 68:46
    superclass
  • 68:43 - 68:48
    so that's basically how it works now
  • 68:46 - 68:51
    it's not clear today if Silva's will be
  • 68:48 - 68:54
    part of did he give 15 if not that's not
  • 68:51 - 68:55
    really an issue just mean that we'll
  • 68:54 - 69:02
    have to wait another six months
  • 68:55 - 69:07
    and it will be for GF 16 so I think it's
  • 69:02 - 69:09
    time to wrap up so today we've discussed
  • 69:07 - 69:11
    about what new features will be added to
  • 69:09 - 69:14
    Java in 2020
  • 69:11 - 69:18
    so GDK 14 was released two months ago
  • 69:14 - 69:20
    and DK 15 will be raised in four months
  • 69:18 - 69:22
    from now i've also discussed very
  • 69:20 - 69:24
    quickly and outdoors large ambitious
  • 69:22 - 69:27
    long-term projects are basically
  • 69:24 - 69:30
    gradually adding capabilities into the
  • 69:27 - 69:34
    platform with the ultimate goal goals of
  • 69:30 - 69:37
    revamping completely the platform now I
  • 69:34 - 69:39
    I need to quickly discuss another new
  • 69:37 - 69:42
    project that we've just announced two
  • 69:39 - 69:44
    weeks ago and that is Laden so laden
  • 69:42 - 69:47
    basically tried to solve to tackle some
  • 69:44 - 69:49
    of the pain points of Java and that is
  • 69:47 - 69:52
    the slow startup time the slow time to
  • 69:49 - 69:53
    performance and the locked footprint of
  • 69:52 - 69:55
    the Bob java application
  • 69:53 - 69:58
    and everything is relative when I say
  • 69:55 - 69:59
    slow it's low compared to typically
  • 69:58 - 70:02
    native applications for example
  • 69:59 - 70:06
    footprints it's again compared to native
  • 70:02 - 70:07
    application so basically a Laden tried
  • 70:06 - 70:10
    to tackle those pain point by
  • 70:07 - 70:14
    introducing the concept of a static
  • 70:10 - 70:18
    image to Java something similar to Ralph
  • 70:14 - 70:21
    Ian achieve image Laden aims to leverage
  • 70:18 - 70:25
    existing component of the GDK such as
  • 70:21 - 70:27
    hotspot G a OTC which is an alt compiler
  • 70:25 - 70:28
    that we have an experimental form since
  • 70:27 - 70:31
    gk9
  • 70:28 - 70:33
    into the platform but also C D s and
  • 70:31 - 70:35
    gelling and clearly this is just the
  • 70:33 - 70:40
    early days of leiden we have just
  • 70:35 - 70:42
    started to gather interest around that
  • 70:40 - 70:43
    project but we think that over time this
  • 70:42 - 70:45
    is something that would be important so
  • 70:43 - 70:48
    basically trot bring the capability that
  • 70:45 - 70:51
    we have with native Miam then similar
  • 70:48 - 70:57
    capabilities but directly into the Java
  • 70:51 - 71:00
    form so this is the slides depict the
  • 70:57 - 71:01
    content of GDK 14 I think that we have
  • 71:00 - 71:04
    discussed most of the jobs that we have
  • 71:01 - 71:05
    here the only thing that I need to
  • 71:04 - 71:07
    mention and I think I've mentioned that
  • 71:05 - 71:10
    at the beginning is that jobs are are
  • 71:07 - 71:12
    also used to remove holger things from
  • 71:10 - 71:16
    the platform so you see that for example
  • 71:12 - 71:19
    3 6 2 & 3 6 3 are duplicating things
  • 71:16 - 71:20
    from the platform and or removing so
  • 71:19 - 71:23
    when we remove something from the
  • 71:20 - 71:24
    platform we first deprecated to tell the
  • 71:23 - 71:27
    world that ok that features will be
  • 71:24 - 71:30
    removed in the features and then later
  • 71:27 - 71:37
    on it will be actually removed so it's
  • 71:30 - 71:39
    abilities face removal approach and da14
  • 71:37 - 71:44
    is available so you should download it
  • 71:39 - 71:47
    right now and give it a try so in terms
  • 71:44 - 71:49
    of conclusion Java is still free we have
  • 71:47 - 71:51
    put in place everything to deliver
  • 71:49 - 71:54
    faster and we are delivering faster and
  • 71:51 - 71:58
    we haven't had Rich's future pipeline
  • 71:54 - 72:01
    for the Java platform a heifer and also
  • 71:58 - 72:04
    keep in mind this year marks the 25th
  • 72:01 - 72:06
    anniversary of Java and given the
  • 72:04 - 72:07
    pipeline that we have well we can't
  • 72:06 - 72:12
    really say that there is a bright future
  • 72:07 - 72:14
    for Java developers and with that I'd
  • 72:12 - 72:15
    like to thank you for your time and I
  • 72:14 - 72:18
    don't know if we still have time for
  • 72:15 - 72:18
    questions
  • 72:21 - 72:31
    have time for one question someone have
  • 72:23 - 72:32
    a question you can also ask question on
  • 72:31 - 72:34
    Twitter so there is my Twitter handle
  • 72:32 - 72:38
    there so if you have any question and
  • 72:34 - 72:39
    you don't feel like asking now you can
  • 72:38 - 72:46
    also ping me on Twitter
  • 72:39 - 72:53
    I think stream 8 has a question yeah so
  • 72:46 - 72:56
    regarding the project so the last thing
  • 72:53 - 72:59
    was actually looking into is is the the
  • 72:56 - 73:01
    problem of high pressures in high
  • 72:59 - 73:03
    pressure in gently so that is a real
  • 73:01 - 73:05
    that's more complicated problem in
  • 73:03 - 73:09
    father so what is the state of it and if
  • 73:05 - 73:16
    there is that is that is that mountain
  • 73:09 - 73:19
    climb then so you know Brian gets the
  • 73:16 - 73:21
    job architect so Brian is the architect
  • 73:19 - 73:23
    of the Java platform and basically his
  • 73:21 - 73:26
    answer is it will be so whenever someone
  • 73:23 - 73:28
    ask about when it will be deliver his
  • 73:26 - 73:31
    answer is is pretty easy it will be a
  • 73:28 - 73:35
    below it will be available when it's
  • 73:31 - 73:37
    ready and the fact that well it's not
  • 73:35 - 73:41
    yet there means that well things are
  • 73:37 - 73:43
    still being being worked on so I cannot
  • 73:41 - 73:45
    give you any more precise answer than
  • 73:43 - 73:48
    that but yeah you're right Vala lies
  • 73:45 - 73:51
    it's really a fundamental change within
  • 73:48 - 73:54
    the platform the nice thing is that with
  • 73:51 - 73:56
    the new release guidance well we don't
  • 73:54 - 73:58
    have the issue that we we had in the
  • 73:56 - 73:59
    past where we basically add a time
  • 73:58 - 74:03
    window to add new features in the
  • 73:59 - 74:05
    platform every three years so if we miss
  • 74:03 - 74:07
    that time window that basically means
  • 74:05 - 74:10
    that we have to wait another three years
  • 74:07 - 74:13
    to add that into the platform those days
  • 74:10 - 74:15
    we can gradually add features every six
  • 74:13 - 74:19
    months so we can expect in the future
  • 74:15 - 74:22
    release to come to see some features
  • 74:19 - 74:24
    emerging from Vdara but I can I can give
  • 74:22 - 74:26
    you any more precise answer than that
  • 74:24 - 74:26
    I'm sorry
  • 74:34 - 74:37
    thank you David
  • 74:38 - 74:43
    thank you thanks you thank you very time
  • 74:41 - 74:52
    okay thanks everyone for joining since
  • 74:43 - 74:52
    you next time thank you yeah bye
Title:
David Delabassee - what's new in Java in 2020 - David Delabassee - what's new in Java in 2020
Description:

more » « less
Duration:
01:14:51

English subtitles

Revisions