jooby-project / jooby

The modular web framework for Java and Kotlin
https://jooby.io
Apache License 2.0
1.7k stars 198 forks source link

Question: ActiveJ Server #1892

Closed a1730 closed 3 years ago

a1730 commented 4 years ago

Thank you for the Jooby project. We have found it to be an excellent lightweight REST server. We liked the jooby-netty server, but, future-proofing netty makes us nervous. Their public api changes too much for our taste, and it changes in non-backward conforming ways (this was our experience in the past). Undertow would have been nice but they are moving to netty:( Jetty? We'd rather be programming servlets.

So, we found ActiveJ but wondered if you have looked at it, and what suggestions do you have for us to implement a actvej-server in the spirit of jooby-netty. Is there a server api that we should implement? We looked but it looks like no-cigar.

jknack commented 4 years ago

Agreed about Netty. I do prefer undertow for simplicity and performance.

Implementing a new Server is not an easy task due to complexity but also there is no real documentation on how to do it.

A quick look at ActiveJ seems it is a lot more than a web server implementation. Also, do they run on top of vert.x? Vert.x is Netty!!!

Vert.x looks like a better fit for a Jooby web server.

sirinath commented 4 years ago

ActiveJ is faster than Vert.x. It will be great if ActiveJ HTTP, ActiveJ Net, etc. is used for more efficiency.

a1730 commented 4 years ago

Looking at whipping something up. @jknack does jooby have a test quite for a server implementation?

jknack commented 4 years ago

Yea probably not the best test name... but most of the features are here: https://github.com/jooby-project/jooby/blob/e3004775d092df1139b4678eb5a5a89cbe7ebce0/tests/src/test/java/io/jooby/FeaturedTest.java

While test support (code that run an app against servers) is here: https://github.com/jooby-project/jooby/tree/e3004775d092df1139b4678eb5a5a89cbe7ebce0/tests/src/test/java/io/jooby/junit

a1730 commented 4 years ago

Thanks for the pointer, @jknack.

a1730 commented 4 years ago

In summary, We decided to enrich the current Jetty server rather than create an ActiveJ server.

  1. We needed a responsive websocket/sse server these are not available with ActiveJ and are easily added to Jooby version 2 Jetty server. We looked at socket.io, sockjs but decided against them. We are staying with web standards.
  2. We will use standards compliant websocket. We have good experience with Redis, we will enrich the ws client-server dialog with Redis RESP if needed. We try to avoid any dependency on Netty.
  3. ActiveJ does not support HTTP/2 nor haproxy protocol. These are required technologies for us.
  4. There is no Server API on the Jooby side for us to validate our implementation. We would essentially be shooting in the dark and chasing our tail with every release of Jooby, and we will essentially be on our own.

Jooby is a joy to develop against. @jknack Thank you for a fantastic project.

jknack commented 4 years ago

It is a good decision. Sometime ago someone asked for rapidoid backend, something similar happened. In general we need to look for stable, fully compliant web server with a large active community. I believe ActiveJ is still young we can look at adding it in couple of years if still a need.

sirinath commented 4 years ago

@a1730 Maybe you can ask the ActiveJ what features you require which are missing. If many request them then there might be a chance these features get prioritised.

a1730 commented 4 years ago

I did. We are keeping an eye on both projects - Jooby and ActiveJ. I spied that someone is looking at implementing websockets but it will take some time to mature. There is still no support for sse, HTTP2 (specifically h2c), haproxy protocol - we have proxies that depend on this, and other minor concerns

On Tuesday, August 25, 2020, 03:53:13 PM UTC, Suminda Sirinath Salpitikorala Dharmasena notifications@github.com wrote: @a1730 Maybe you can ask the ActiveJ what features you require which are missing. If many request them then there might be a chance these features get prioritised. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

sirinath commented 3 years ago

ActiveJ now has WebSocket support and SSE support.

a1730 commented 3 years ago

Thank you @sirinath , we are already using a modified version of the code in some ways.

a1730 commented 3 years ago

A quick look at ActiveJ seems it is a lot more than a web server implementation. Also, do they run on top of vert.x? Vert.x is Netty!!!

FYI, ActiveJ has nothing to do with Vert.x nor Netty. Using the code, and quoting from their web site

Handy and efficient alternative to Netty, Apache Mina, and other similar solutions for high performance networking.

jknack commented 3 years ago

I'm not planning to support ActiveJ for the reasons I explained before. Please, let's keep this issue closed.

Thanks.

a1730 commented 3 years ago

Oops, The intention was to inform you that ActiveJ has nothing to do with Vert.x nor Netty and not to ask for ActiveJ support but my Github-fu is not that great. My apologies if I was not clear. Agreed that it should remain closed - Please leave it closed.