Hi fellow devs,
I wanted to show something I have been playing around with for the
past few weeks. It's a version of AsterixDB that is compiled down to
WASM using TeaVM. You can check it out briefly here:
https://parshimers.github.io/asterix-teavm/ with the source available
here: https://github.com/parshimers/asterix-teavm/ . Play with it! See
what breaks :)

I have tested most of the SQL++ 101 and it works fine. The only thing
missing there is printing ADM and anything involving fuzzy search or
inverted indexes. Geospatial queries should mostly work, with some
small differences. The data you load into the page is persisted
locally via IndexedDB, and is using normal row storage with BTrees.
There's also a \load command that should open a file picker and let
you upload JSON or CSV into a new dataset.

It's still in a very experimental and rough state, but hopefully it's
enough to get the idea across. It's mostly vibecoded. Coaxing claude
into implementing the inevitable huge amount of shimming and stubbing
necessary was very helpful. I cleaned up some of the way the class
substitution is done (before Claude was shadowing the stubbed classes
into the binary which was very nasty/un-necessary), but that's mostly
it. I wanted to get it in kind of a MVP state before going too crazy
with tidying things up.

I was thinking this could be very handy for trying to demonstrate and
evangelize for SQL++ adoption. Maybe it could go on the main site as a
good way to intro the system and language to new users. IMO one of the
barriers to adoption of AsterixDB that I have seen, is that installing
a Java application that also has to accommodate being configurable for
a clustered deployment, is kind of hard.

I'd also like to hear about what folks think should be added or
attempted to be ported in better. Overall I am really amazed at the
power of TeaVM; I think some very powerful capabilities are possible
for this port that I thought previously weren't possible.

One other thing is that I would also like to create a new repo for
this on the Apache side (asterix-teavm, perhaps?) and make a release
for it once it seems fine. Then it can be put up on the main site in
some subsection or as a version of the SQL++ 101 demo.

Looking forward to hearing everyone's thoughts.

-Ian

Reply via email to