https://kotlinlang.org logo
#feed
Title
# feed
a

altavir

08/24/2020, 1:03 PM
Here is the release video for new version of plotly.kt:

https://youtu.be/-E2WOz0D1-c

• Full coverage of basic Plotly API (fully type-safe with autocomplete etc.) • Full-stack support for rendering from the servers side (with dynamic real-time updates!). • Client side rendering with Kotlin-JS and coroutines. • Experimental support for Kotlin-jupyter. • Experimental scripting support. • JavaFX demo.
👍 6
r

Robert Jaros

08/24/2020, 2:20 PM
If plotly is a JS library, how it works that you enter code in the browser, see results in the browser, but the engine is using ktor on JVM?
a

altavir

08/24/2020, 2:23 PM
The basic behavior is to enter the code in th JVM. The core then shapes and accumulates the updtate and then sends it to the client via web-sockets push mechanism. If you add Jupyter to the mix, it works backwards, it has its own server that recieves the code from the frontend and then evaluates it. In case of active jupyter-server we actually have two separate servers: one for the jupyter itself and one for direct widget updates.
Actually the core of the library is not plotly-specific, it could be used to aggregate and dynamic updates.
r

Robert Jaros

08/24/2020, 2:29 PM
the output (send via web-sockets) is svg? png?
a

altavir

08/24/2020, 2:30 PM
No, it is a plain json that is interpreted on the client side.
r

Robert Jaros

08/24/2020, 2:31 PM
by the plotly js lib?
a

altavir

08/24/2020, 2:32 PM
yes. The idea is the sam as in a basic full-stack application, but the roles are reversed. You generate json on the backend and send the request to the front-end. This way, the browser is actually a server and the JVM is a client
r

Robert Jaros

08/24/2020, 2:39 PM
Nice! 🙂 Thx for clarification.
13 Views