Is TeamVM right tool for Redis functions? #901
-
Hello to all, I am author for Bucket4j - distributed token bucket for Java. I need to implement the support for Redis Functions into my library. To achive this I need to reimplement in javascript a few thouthands lines of well tested non-trivial java code, firstly I want try to avoid to write Javascript from scratch and I am looking the way to compile Java to Javascript. First of all, I want to ask wether TeaVM supports the non-GUI scenarios? I need to compile a subset of my java code to Javascript, pack it to one file of javascript(similar like webpack), load this library to Redis and call function from library from Redis Javascript stored procedure. To do last step, it is obvios that required some way to define clear API inside Java, that can be called from javascript. Is TeaVM the rigth tool for such scenario? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
There's nothing in TeaVM about "GUI scenarios". TeaVM is a compiler, not GUI-building tool. Whether TeaVM is good for your scenario, I don't know. It depends on many factors, like how Redis Functions API organized, on your code base, etc. I suppose you need most recent TeaVM preview which provides the way to define modules (see this discussion). Also, if your code base uses reflection, bytecode generation, |
Beta Was this translation helpful? Give feedback.
There's nothing in TeaVM about "GUI scenarios". TeaVM is a compiler, not GUI-building tool. Whether TeaVM is good for your scenario, I don't know. It depends on many factors, like how Redis Functions API organized, on your code base, etc. I suppose you need most recent TeaVM preview which provides the way to define modules (see this discussion). Also, if your code base uses reflection, bytecode generation,
sun.misc.Unsafe
and similar things, TeaVM won't work for you. Anyway, the best way to see if TeaVM fits your needs is to try it. If TeaVM produces some errors you can't resolve, feel free to ask questions and create issues.