GithubHelp home page GithubHelp logo

If java supported about unit HOT 22 CLOSED

nginx avatar nginx commented on September 26, 2024
If java supported

from unit.

Comments (22)

 avatar commented on September 26, 2024 2

is the plan to support any JVM based language in Unit ?

from unit.

VBart avatar VBart commented on September 26, 2024

It is currently in R&D stage. What would you suggest? We'd like to hear users opinions.

from unit.

rmohta avatar rmohta commented on September 26, 2024

@VBart Based on code for golang, it looks like you're starting a server via C code and then using FFI to interact with golang code. Is that right?

Also Do you have latency and throughput comparison to Netty 4 (netty-transport-native-epoll artifact)?

from unit.

VBart avatar VBart commented on September 26, 2024

@rmohta That's right.

As of doing comparison to Netty, currently it doesn't make sense. While the architecture of Unit is designed to show the best performance, but on the current stage of development it's not expected.

from unit.

rmohta avatar rmohta commented on September 26, 2024

@VBart Okay. What is an ideal architecture for Unit? Is it to provide ability to expose APIs and provide a bridge to glue your service code? Something like Servless/fn platform or something else?

from unit.

VBart avatar VBart commented on September 26, 2024

Ideally, when it's possible to integrate interpreter or virtual machine and load it as a dynamic module. PHP, Python and Ruby (coming soon) work that way.

from unit.

linux-china avatar linux-china commented on September 26, 2024

Any guy looked at GraalVM project? https://www.graalvm.org/ it's embeddable.
GraalVM can be embedded in both managed and native applications. There are existing integrations into OpenJDK, Node.js, Oracle Database, and MySQL. If Oracle Database & MySQL can embed GraalVM, and I think Nginx Unit can embed GraalVM for Java.

from unit.

VBart avatar VBart commented on September 26, 2024

@linux-china Thanks. That looks interesting.

from unit.

mar0x avatar mar0x commented on September 26, 2024

Experimental Java web app support added in https://github.com/mar0x/unit/tree/java . Currently it is able to run basic Spring Boot web applications, packaged as war (see https://github.com/mar0x/gs-spring-boot ).

from unit.

mar0x avatar mar0x commented on September 26, 2024

We are going to implement a servlet container for web applications based on Java Servlet 3.1 Specification. Currently we focus on Java, but I hope the container will work with applications written in other JVM-based languages if the application follows the requirements like other containers do.

To prioritize, we'd like to know more about your application, the language used, and the ultimate goal you aim to achieve when running your application with Unit.

from unit.

 avatar commented on September 26, 2024

@mar0x we use Clojure within a JVM.

from unit.

mar0x avatar mar0x commented on September 26, 2024

Steve,
I've tried basic Clojure web application. Being packaged as a standalone war, it works well under Unit with experimental Java support (https://github.com/mar0x/unit/tree/java).

from unit.

mar0x avatar mar0x commented on September 26, 2024

Static files serving introduced in experimental Java support. Looking for early adopters.

from unit.

mar0x avatar mar0x commented on September 26, 2024

Unit 1.8 may work as Tomcat or Jetty. Please refer to documentation (http://unit.nginx.org/configuration/#configuration-java) for more information.

from unit.

avkarenow avatar avkarenow commented on September 26, 2024

No support for user/group settings for Java? Or just lack information in the documentation?

from unit.

VBart avatar VBart commented on September 26, 2024

@avkarenow http://unit.nginx.org/configuration/#application-objects

Each application object has a number of common options that can be specified for any application regardless of its type.

from unit.

incube8r avatar incube8r commented on September 26, 2024

@VBart which version of Unit works with Java? I am using 1.8.0 but when uploading a JSON config it throws:
"The module to run "java" is not found among the available application modules. "

from unit.

mar0x avatar mar0x commented on September 26, 2024

@incube8r BETA Java support introduced in Unit 1.8.0. You need to install JSC (Java Servlet Container) module. Please read http://unit.nginx.org/installation/ for you OS or consider installation from sources (http://unit.nginx.org/installation/#source-code).

from unit.

incube8r avatar incube8r commented on September 26, 2024

@mar0x that worked! Thanks!

I tried running a web app that works well with Tomcat, Jetty, and Payara (tested) but Unit does not seem to be able to run it, it throws this error:

Caused by: java.lang.SecurityException: Couldn't parse jurisdiction policy files in: unlimited
	at java.base/javax.crypto.JceSecurity.setupJurisdictionPolicies(JceSecurity.java:357)
	at java.base/javax.crypto.JceSecurity$1.run(JceSecurity.java:111)
	at java.base/javax.crypto.JceSecurity$1.run(JceSecurity.java:108)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/javax.crypto.JceSecurity.<clinit>(JceSecurity.java:107)
	... 76 more 

from unit.

incube8r avatar incube8r commented on September 26, 2024

@mar0x that worked! Thanks!

I tried running a web app that works well with Tomcat, Jetty, and Payara (tested) but Unit does not seem to be able to run it, it throws this error:

Caused by: java.lang.SecurityException: Couldn't parse jurisdiction policy files in: unlimited
	at java.base/javax.crypto.JceSecurity.setupJurisdictionPolicies(JceSecurity.java:357)
	at java.base/javax.crypto.JceSecurity$1.run(JceSecurity.java:111)
	at java.base/javax.crypto.JceSecurity$1.run(JceSecurity.java:108)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/javax.crypto.JceSecurity.<clinit>(JceSecurity.java:107)
	... 76 more 

I added the issue here #255

from unit.

cyberquarks avatar cyberquarks commented on September 26, 2024

We are going to implement a servlet container for web applications based on Java Servlet 3.1 Specification. Currently we focus on Java, but I hope the container will work with applications written in other JVM-based languages if the application follows the requirements like other containers do.

To prioritize, we'd like to know more about your application, the language used, and the ultimate goal you aim to achieve when running your application with Unit.

Do NGINX Unit supports Servlet 3.1? @mar0x

from unit.

mar0x avatar mar0x commented on September 26, 2024

Do NGINX Unit supports Servlet 3.1?

Yes. @cyberquarks

from unit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.