-
Notifications
You must be signed in to change notification settings - Fork 63
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
[Epic] Improvements to Java Runtime avoid com.sun.*, support MANIFEST main and other runtime image optimizations #12
Comments
On 3, did you consider an openwhisk java FDK which provides a standard wrapper instead for local development? |
What’s an FDK? |
On 3 we are thinking on doing the same for Swift to handle the epilogue cc @jthomas |
Title says “performance” not all 3 items are about performance |
Function Development Kit - FDK is the new SDK, haven't you heard? :D |
@csantanapr - I mentioned the title as |
@csantanapr and @rabbah - I just thought to file these things across about points I thought on Java Action before I forget - please feel free to let me know if you need them to split it up or wish me to do? |
My bad I read performance, It must be my dislexia :-) or just brain fart |
+1 for all three improvements: faster stratup is a win, and main in the manifest makes sense. My immediate concern was with your third point but think an FDK can facilitate local development and testing without changing the underlying model for functions. @csantanapr should we link this to zenhub and track issues and epics accordingly? |
Yes they are related and we should start using epics and child’s with zenhub |
We should link all the runtime repos to main core repo, I will check if we still have the correct permissions now that we are under Apache Github org |
One zenhub board for all repos |
can you please share more details not sure I got what you mean here |
Keep the abstractions to developer so they can write functions with a stable api and it doesn’t matter if the run the function locally outside whisk or they run it in a whisk container |
We should add direct .java invocation to this epic too. I have it already implemented on the devtools repo. [1]. The only reason I did not PR it to here was the gson dependency. Since we are taking care of it with this one, I see no reason not to implement it. [1] https://github.com/apache/incubator-openwhisk-devtools/tree/master/java-local |
@gorkem I See no issue on adding .java also @rabbah do you recall why this was not done originally for Java actions and only .jar? Maybe the extra latency for compile step on /init too bad or takes longer than 1minute those would be the only two I see, put that’s a problem we have today with swift with single source file it’s convenient for dev/demo but for production is better to have a precompiled to the action Maybe it’s time again to bring discussion of init actions that will help with compiling and saving the compiled output to the action stamping with runtime image and maybe source on the action this way it only compiled when the source changes or the runtime image changes. |
What’s the likelihood of writing a function is Java, with no extrnal libs? Supporting the use case is nice for parity and quick start but I’d suspect if you’re doing anything serious with functions and Java you’ll have libs and need a jar file. |
Hum 🤔
|
It’s nice to have - quick start, demo all good. For composer it’s more nuanced. The library is js based today and it’s far more work getting java syntax embedded vs using a composer library entirely in Java. I suggest taking that off the table as a use case where 2 & 3 are more viable. |
This has been my thinking last couple of days in these lines
|
Hey @kameshsampath @gorkem @rabbah I enable zenhub and pulled this repo up to core/main repo, tell me if you have issues loading zenhub (chrome plugin) here: I tried my best to split this issue in 3 Epics and copied over discussion to new issues
Let me know how this looks, and any adjustments you can to see and can't do because of write access. |
guys, my first target for this EPIC would be to rebase the OpenWhisk Java runtime with https://hub.docker.com/r/fabric8/java-jboss-openjdk8-jdk/ as this will solve two issues #5 and we aligning to openjdk for all community bits. @csantanapr can you please add this #18 to the Epic ? |
The following are list of tasks that we need to work to improve the OW Java Action runtime:
avoid usage of com.sun.* packages - this is used in https://github.com/apache/incubator-openwhisk-runtime-java/blob/master/core/javaAction/proxy/src/main/java/openwhisk/java/action/Proxy.java, instead we can use readily available pre-built httpservers e.g. using vert.x is one of the options for high performance
Right now we rely on the
--main
parameter passed to run Java Aciton, instead we can make the Loader to infer it viaMANIFEST.mf
Main-class or add custom attribute for OW appsIt would be great to have making OW Java Action use standard Java main method signature with just
String[] args
and we define custom Launcher that convert the args to JSON and delegate to OW Java Function Launcher, this way it will be easy for applications to be built and tested outside before testing in OWEdited by @csantanapr 3 is now a new issue: More flexibility to parsing and passing JSON input/out in Java runtime #15
@csantanapr @ddragosd @gorkem - thoughts comments and feedback ??
The text was updated successfully, but these errors were encountered: