-
-
Notifications
You must be signed in to change notification settings - Fork 431
Java support? #1
Comments
@jplock yep, it absolutely is – as it says in the README Java exists on the images, so you can run things manually yourself – I just haven't written a Java test runner yet. I'll comment here when I have 👍 |
I have three questions. Has there been any progress on this? |
No progress – creating a Java runner is a different challenge to the others because it's not a dynamic target. You can run Java (and hence Scala) in any of the images – the binaries and libraries exist on the base image, there's just no mock Lambda runner. Creating a mock Lambda runner would involve replicating what has been done in the other languages (Python, Node.js) – essentially keeping as much as possible of the in-built Lambda runner and just swapping out the core invoker with a mock implementation. |
My goal is to use the following plugin in order to simulate scala microservices. As far as I understood, I need the runners. https://github.com/serverless-community-labs/serverless-plugin-simulate |
Probably – yep. Not entirely sure how they use docker-lambda but I imagine they're relying on the mock runners. |
I have been working on adding java8 support to docker lambda, see master...timve:java8 for the diff. It basically consists of two java processes:
I would have liked to have used the actual lambda runner code from AWS in order to come closer to the real deal, but I run into issues with the native part of it. The two main todo's are:
It is not tested yet, the example java lambda code runs but I have not tested more complex scenarios yet. Is this something that you would consider to add to docker-lambda ? |
@timve – I've actually been working on a Java runner myself – I should've updated this issue. It's slightly separate from your approach I think in that I use the production runner jar, but I just swap out the class in the jar that communicates with the native library with a mock class. Hopefully I'll have time in the next week to push something up – and I'll check out your solution too. Thanks! |
@mhart Ah, sounds good, swapping out the native part with a mock sounds a bit closer to the real environment compared to my solution. |
@mhart Thanks, neat little trick swapping out the LambdaRuntime class in the jar ;-). I will try give it a spin in the next couple of days. |
@timve yeah, now if only it were as easy for .NET DLLs – then I could support the dotnetcore1.0 runtime too! 😉 |
Right now container(lambci/lambda:java8) running in my machine. Wants to debug in intellij idea. how can i do that. Kindly help me. |
Should it be possible to support Java-based lambdas with this?
The text was updated successfully, but these errors were encountered: