Hi,
I have been scratching the surface of Openwhisk and I like it a lot. But
since Java is the eco system (language + tooling) I am most comfortable
with, I would like to create my actions in java. Luckily Openwhisk
supports Java.
Unfortunately diving a bit deeper somehow gives me the impression that
Java is not really a first class citizen. Why do I get this impression?
There are a number of reasons:
1) Examples
I can hardly find any decent Java based examples beyond hello world. In
particular how to invoke other actions from within a Java action.
Seaching on Github with "Openwhisk java" results in only 4 projects :-(
and one of them is mine (see 2)
2) Openwhisk java client API
Searching for Openwhisk client libraries results in libraries for
javascript, swift, go and python. Unfortunately none for java. There is
however a feature request:
https://github.com/apache/incubator-openwhisk/issues/2466
I had a little go at it myself. The API is mostly generated from the
swagger file. Unfortunately the Swagger code generator generates
unusable code for one the most important data structures, KeyValue.
My Openwhisk Java API can be found at:
https://github.com/misl/openwhisk-client-java
Yes it desperately needs some additional documentation, but first I want
to fix the KeyValue issue. And example of using the library from outside
openwhisk can be found in the code at:
https://github.com/misl/openwhisk-client-java/blob/master/openwhisk-api-client-retrofit/src/test/java/SimpleTest.java
3) Fully qualified method name does not work for Java action handlers
(see: wsk action create --main)
For this I already created an issue:
https://github.com/apache/incubator-openwhisk/issues/2590
I even tried solving this one myself, have a look at my fork at:
https://github.com/misl/incubator-openwhisk
Fixing the issue was easy, but testing it seems to be much more complex.
Maybe I need a little help here to be able to complete this one.
All this gives me the impression that the focus for Openwhisk is on a
lot of languages but not on Java. Or am I totally wrong here?
Please share your thoughts.
Kind regards,
misl
PS 1: For the interested I might have another project worth taking a
look at. Openwhisk Package and Action annotations -
https://github.com/misl/xup-openwhisk-annotations . It includes a script
to quickly upload the generated Jar file. This one is also still needs
documentation, but to see how it works have a look at the examples.
PS 2: Oh by the way, If any of these projects are of interest, I am
willing to donate.