fdk-java
fdk-java copied to clipboard
Spring Cloud Function support
Try to get this ready in time for SpringOne.
- [x] This needs to be a separate jar
- [x] Need to be able to supply a FunctionInvoker from a separate jar
- [x] SCF support
- [x] Example Project
- [x] Blog post
If you're going to be at SpringOne we should definitely talk about the best place to host fn support for Spring Cloud Function. If you need to make changes there, irrespective of where we host the adapter, please get in touch (or send PRs).
@dsyer I'll be there Monday. Would be great to discuss. Spring is a priority integration target for us.
Thanks @dsyer! I'll have something useable in-tree soon, then we can discuss more based on that.
This is in the latest released version. See https://github.com/fnproject/fn-spring-cloud-function-example
A few of things left to do:
- [ ] Input coercion of JSON objects is not working - we always get
LinkedHashMap - [ ] Some configurations cause Spring to act in ways which are prohibited by our JDK9 setup (which doesn't specify --warn-on-illegal-reflection type arguments atm) Needs investigation to see what actually triggers it and whether we can fix it in a better way than just allowing all the things which Jigsaw prevents by default.
- [x] Errors when none of the Spring Beans is a possible function are badly handled (NPE). Better error messages is the best we can do here, though.
- [ ] NPE when your function bean returns
null - [ ] need to have an unused method to define the entrypoint: #113
Hi, i had a problem that when i test a function such as uppercase or lowercase after fn routes configured successfully, the docker container will always be built eachtime when i send a request. And the container will be destoryed when the request finished. Compared with fn-spring-cloud-function, the original fn function ensures that the container will always exist until time out for no request comes in. Thanks a lot.