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

Support .java source actions in some fashion #16

Open
csantanapr opened this issue Feb 26, 2018 · 3 comments
Open

Support .java source actions in some fashion #16

csantanapr opened this issue Feb 26, 2018 · 3 comments

Comments

@csantanapr
Copy link
Member

by @gorkem from #12 (comment)

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

by @csantanapr #12 (comment)

@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.

by @csantanapr #12 (comment)

Hum 🤔
What about simple one liner functions between sequences ?
Meaning like to transform output parameters into input parameters in sequences
Maybe there is a OW provider/operator that included libraries and frameworks into a custom runtime
IBM including Watson sdk, COS SDK, Cloudant sdk, http client library
RedHat including spring cloud framework and adapters
Regular user extending a Java runtime with own libraries
Someone offering a UI web based editor useful for demo to edit a java file in web editor assuming that runtime has some useful libraries installed like Jax-rs related ones to handle web actions input.

by @rabbah #12 (comment)

It’s nice to have - quick start, demo all good.

by @kameshsampath #12 (comment)

This has been my thinking last couple of days in these lines
I am not sure where are storing the jars today when we say wsk action create foo foo.jar --main foo - is it as a blob in couchdb ??
As you mentioned that biggest stuff we need to resolve dependency resolution for Java - wondering we can deploy a Maven Repo Manager as part of the OW deployment, this could solve the above point as well,. Right now the biggest hurdle of Java Adoption is this as functions need to be quick

@markusthoemmes
Copy link
Contributor

Hasn't there been a proposal by somebody to have "compiling-actions" where we an action is called on action creation and creates the binary outputs that we today "manually" create in the swift runtime for example.

Would be nice to have a principled approach here.

@csantanapr
Copy link
Member Author

Hasn't there been a proposal by somebody to have "compiling-actions" where we an action is called on action creation and creates the binary outputs that we today "manually" create in the swift runtime for example.

Yes @markusthoemmes me and others have proposed this I think we keep referring them as "init-actions", "compiled-actions"

Yes it would be nice to have this approach here I agree 💯

@gorkem
Copy link
Contributor

gorkem commented Feb 26, 2018

@csantanapr @markusthoemmes The current solution compiles a .java into .class in memory and loads it to VM. No real .class files are generated. The approach is suitable for single file and no dependecy actions but nothing else, unless we want to add some known Java libraries to the runtime by default.

I think "init-actions" can be suitable for an actualy maven/gradle build.

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

3 participants