Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is es4x production ready? #536

Open
Gondolav opened this issue Jun 6, 2021 · 3 comments
Open

Is es4x production ready? #536

Gondolav opened this issue Jun 6, 2021 · 3 comments

Comments

@Gondolav
Copy link

Gondolav commented Jun 6, 2021

Hello, amazing work, congrats! I was wondering, is es4x production ready?

@pmlopes
Copy link
Contributor

pmlopes commented Jun 7, 2021

@Gondolav thanks!

es4x, is just a special launcher for Eclipse Vert.x. Vert.x itself is a very mature project that is running in production in many world known companies and powers many other frameworks/libraries.

What es4x does is, plugging to existing extension points of vert.x, for example:

https://github.com/reactiverse/es4x/blob/develop/es4x/src/main/java/io/reactiverse/es4x/ES4X.java

Extends the vert.x launcher

https://github.com/reactiverse/es4x/blob/develop/es4x/src/main/java/io/reactiverse/es4x/ESVerticleFactory.java

Implements a verticle factory

And:

https://github.com/reactiverse/es4x/blob/develop/es4x/src/main/java/io/reactiverse/es4x/Runtime.java
https://github.com/reactiverse/es4x/blob/develop/es4x/src/main/java/io/reactiverse/es4x/ECMAEngine.java

Bootstrap a graaljs ecma2020 js engine to execute the code.

So, after covering mostly all the runtime code, applications will just be running vert.x APIs. These APIs are production ready, and I can also say that the code above is too.

While there are many modules in this repo, a closer look tells that most of the code here is "helper" code used during development, not production. For example:

  • codegen - is helper to generate typescript definitions which aren't needed at runtime
  • pm - is helper to automate working with npm and maven dependencies
  • generator - is helper to generate all the npm modules published on each release to npm

To conclude, I'm quite confident that this code is production ready. The reason there isn't a 1.0.0 release yet is because there are still a couple of rough edges that need to be addressed:

  • when I started the project typescript wasn't as evolved as now and to map the vert.x API's I had to use these abstract classes notation. Now that typescript has evolved, I should try to rewrite it to use proper interfaces as this would be a 100% exact representation of vert.x APIs
  • pm has a few experimental commands (jlink which are hard to get to work with any combination of JVMs) and probably should do away
  • sandboxing using JVM security manager is interesting as it kinda gives you some fine-grained security constraint to external code, however it will be removed from the JVM
  • Now that es4x can work with remote modules e.g.: import * from "https://server.com/module.mjs" we need to properly test it and also be able to download maven related dependencies

So, these changes should not affect already written application as they are as you can see, related to the "helper" development time code, not the runtime.

@Gondolav
Copy link
Author

Gondolav commented Jun 7, 2021

@pmlopes thank you for the thorough answer, very helpful! I'll certainly consider it for my next microservice, as I really enjoy Vert.x and using it with TypeScript could really be a gamechanger. For more practical questions, I should use Gitter right? Thanks again!

@pmlopes
Copy link
Contributor

pmlopes commented Jun 7, 2021

Yes, either gitter or the vert.x specific discord server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants