LinkML-Scala: fast, robust, and portable (JS/JVM/native) implementation of LinkML #3787
Ostrzyciel
started this conversation in
Show and tell
Replies: 2 comments 2 replies
|
Thanks @Ostrzyciel :) Much appreciated! I am saying this from my personal perspective (not the perspective of the LinkML team): I would really like it if open sourcing this does not become an after-thought. This would also make this work a really valuable component to our Fall LinkML community conference/workshop #3482. |
2 replies
|
We've written down the currently supported features and differences from |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi all! :) I'd like to share something cool that we've been working on for the last few months: a new self-hosting LinkML implementation with generators!
We made LinkML-Scala because the current (Python) implementation did not meet the requirements for our projects. We needed better performance, more portability (we need LinkML to work in the browser, JVM/Java, and native binaries), and more consistent behaviors across generators, so that we can offer a smooth user experience for our devs.
LinkML-Scala covers:
Of course it's 100% open-source, under the Apache 2.0 license.
I will first show you some cool things it can do, and then explain more about its design below, in the Q&A section.
Cool things
It can compile to pure JavaScript, so you can run it in the browser.
We put together an in-browser playground – there is no backend, no WebAssembly, no pyodide or any other magic! Just pure JS :)
We have an npm package with TypeScript bindings, so you can use it in your application right away. We even have a GitHub Action that uses it! It can validate hundreds of schemas in a few seconds.
It also compiles to native binaries (Linux, macOS, Windows) – see the project's README for details. You don't need Python or Java to run and it starts up in milliseconds.
The
linkml-scalaCLI application is intended as a drop-in replacement of thelinkmlscript. It doesn't have yet the same feature set, though! :)Of course, LinkML-Scala also works on the JVM. We have packages available at Maven Central.
It's pretty fast:
We made a set of 11 benchmark datasets and compared SHACL and JSON Schema generation between our implementation and the Python one. On average, our implementation is 22.9–38.5x faster. Benchmark details.
And the last cool thing is the hardest to show – we made LinkML-Scala with a bit of a different internal philosophy than
linkml. We put most of the complex logic inSchemaViewand generators are as thin as possible. This allows us to have much more consistent behaviors across generators.Questions and answers
linkmlinstead?linkml. We want the LinkML specification to be the ground for deciding how all implementations should behave. To help with that, in the coming weeks and months we will be contributing fixes and improvements to the spec.What do you think?
Let us know what you think!
We are open to questions and feature suggestions. We want to make this project helpful for the community, so if something is missing, we would be happy to consider it.
All reactions