Giter Club home page Giter Club logo

Comments (2)

apangin avatar apangin commented on May 26, 2024 1

It's true that one-nio uses JDK private APIs (not only in getPollMethodHandle), but that's on purpose.
Well, if standard Java provided high performance networking, efficient serialization, and convenient off-heap memory management, I would of course prefer those. Moreover, the entire one-nio library would be unnecessary :)

It's a shame to use reflection hacks etc. Unfortunately, the "standard" way is often less efficient, or uglier, or both. It's 2021 outside, JDK version has increased from 6 to 16 since the appearance of one-nio, but there is still no official Java API for managing ByteBuffers more than 2GB and releasing them on demand, no straightforward way to create a fast custom serialization mechanism, and blocking SocketChannels still do not support timeouts and other OS-specific options ๐Ÿคฆ

Back to SelectableJavaSocket...
Normally, JavaSocket should never appear in a production environment. It was designed as a simple fallback for a development environment, where NativeSocket is not supported. It was never meant to be a fully-featured implementation, it's only purpose is to allow development on macOS or Windows workstation.

Considering that JavaSocket is not for production use, and having a straghtforward workaround by way of --add-exports/--add-opens, I think it's not worth investing in a fix.

BTW, antimodule agent automatically exports and opens everything, so that applications using private APIs work on JDK 16 even without a warning.

from one-nio.

avrecko avatar avrecko commented on May 26, 2024

I think it is awesome how one-nio is designed and implemented. You are preaching to the choir.

I am just rolling my eyes with some of the changes like making deny the default. Cost/benefit, in my view this creates more problems than it solves.

Thank you for the explanations and mentioning/creating anitmodule. Makes perfect sense to keep things the way they are and "workaround" with JVM settings.

from one-nio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.