• 请不要在回答技术问题时复制粘贴 AI 生成的内容
Ayanokouji
V2EX  ›  程序员

JDK 23 发布了

  •  
  •   Ayanokouji · Sep 18, 2024 · 19874 views
    This topic created in 776 days ago, the information mentioned may be changed or developed.
    此版本是非 lts 版本,主要特性是决定了 zgc 发展方向

    本帖不欢迎刷 jdk8 梗

    Features

    455: Primitive Types in Patterns, instanceof, and switch (Preview)
    466: Class-File API (Second Preview)
    467: Markdown Documentation Comments
    469: Vector API (Eighth Incubator)
    473: Stream Gatherers (Second Preview)
    471: Deprecate the Memory-Access Methods in sun.misc.Unsafe for Removal
    474: ZGC: Generational Mode by Default
    476: Module Import Declarations (Preview)
    477: Implicitly Declared Classes and Instance Main Methods (Third Preview)
    480: Structured Concurrency (Third Preview)
    481: Scoped Values (Third Preview)
    482: Flexible Constructor Bodies (Second Preview)

    https://openjdk.org/projects/jdk/23/
    113 replies  •  2024-09-20 15:31:34 +08:00
    1  2  
    ❮ ❯
    wtsm
    wtsm
    Sep 18, 2024 via Android
    101
    公司还是 1.6
    WispZhan
    WispZhan
    Sep 18, 2024
    102
    对非 LTS 没啥兴趣,实验性特性太多了,支持时间也短。等 LTS 版本再说吧。

    而且除非政策原因,其实推荐保持软件有生命力,至少在自己手上是保持生命力的做法。尤其是新项目
    lixintcwdsg
    lixintcwdsg
    Sep 19, 2024
    103
    唉,21 的虚拟线程的确好用,虽然也有一些问题在
    duanzhanling
    duanzhanling
    Sep 19, 2024
    104
    jdk8 永远的神
    qweruiop
    qweruiop
    Sep 19, 2024
    105
    @yty2012g 哦,你们生产上了 virtual 了?不觉得 virtual 还是有点慢?我们还是普通的 vertx 。
    wuxinling
    wuxinling
    Sep 19, 2024
    106
    想升没办法升,现在用的 centos7.9 mysql5.7 jdk8 。
    问了各个环节都不愿意升级,说对现在开发的项目( 2021 年开始的)不稳定,不敢动。
    wssy001
    wssy001
    Sep 19, 2024
    107
    @cheng6563 #4 字符串模板这个 JEP 你还是忘记吧,openjdk 不会以简单易用为目的去设计它的
    tomatocici2333
    tomatocici2333
    Sep 19, 2024
    108
    @Mark24 #62 你这版本跨度也太大了
    yty2012g
    yty2012g
    Sep 19, 2024
    109
    @qweruiop 可能是我对 vert.x 这个框架的理解不太到位。我是压测验证了下,按吞吐量从高到低,线程模型分别是 Virtual_Thread > Worker > Event_Loop
    Cruzz
    Cruzz
    Sep 19, 2024
    110
    我们已经 17 了,在我的这段职业生涯里应该是用不到了。除非搞出来个惊天大 bug 。
    ala2008
    ala2008
    Sep 19, 2024
    111
    刚刚从 jdk 7 升级到 jdk 8 。。
    byte10
    byte10
    Sep 20, 2024
    112
    @yty2012g vert.x 是 actor 模型,主打就是线程安全,不过速度理论上会比 Virtual_Thread 快(但是 Virtual_Thread 写代码好很多,调试也方便),大部分场景 会比 Worker 方式快,主打吞吐量高。
    yty2012g
    yty2012g
    Sep 20, 2024
    113
    @byte10 昨天我也是突然开窍,我就想,ng 也是监听一个端口,但是能利用好多核,这个是什么原理。原来是使用了 SO_REUSEPORT 这个 TCP 选项。然后我就和 GPT 沟通了一番,原来 vertx 也可以开启!开启后,就是通过内核做负载均衡,然后我就把线程模型改回 EVENT_LOOP ,然后多个线程监听一个端口,果然性能起飞了,终于可以利用多核了,之前压测死活 CPU 利用率上不去
    byte10
    byte10
    Sep 20, 2024
    114
    @yty2012g vertx 是基于 netty 的啊,默认就是开启 epoll 的把?你是说内核还要设置么? vertx 本身就是可以 deploy 多个 vertical ,这样就可以绑定多个线程了啊。你调整这个 SO_REUSEPORT 是么?
    1  2  
    ❮ ❯
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   5644 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 44ms · UTC 03:04 · PVG 11:04 · LAX 19:04 · JFK 22:04
    ♥ Do have faith in what you're doing.