Comments (12)
@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 π
from 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!
from docker-lambda.
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
from docker-lambda.
I have three questions.
Has there been any progress on this?
Will it be possible to test Scala apps?
How could I help implementing Java support?
from docker-lambda.
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.
from docker-lambda.
Probably β yep. Not entirely sure how they use docker-lambda but I imagine they're relying on the mock runners.
from docker-lambda.
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:
- a starter that sets up the environment and starts a separate JVM process where the lambda is invoked
- an executor that sets up the context and can invoke the lambda
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:
- mimic the AWS lambda in unpacking jar / zip archive before running
- setup remote debugging support (actually works, but requires the -Xshare:on option to be disabled)
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 ?
from docker-lambda.
@mhart Ah, sounds good, swapping out the native part with a mock sounds a bit closer to the real environment compared to my solution.
Interested to see what you have come up with, let me know if you require any help.
from docker-lambda.
@timve finally got time to pushing my stuff up: #48
The example there in the PR description should work currently (lambci/lambda:java8
is up on Docker hub)
from docker-lambda.
@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.
from docker-lambda.
@timve yeah, now if only it were as easy for .NET DLLs β then I could support the dotnetcore1.0 runtime too! π
from docker-lambda.
Right now container(lambci/lambda:java8) running in my machine. Wants to debug in intellij idea. how can i do that. Kindly help me.
from docker-lambda.
Related Issues (20)
- Missing files from provided.al2 HOT 1
- Need support for python3.9 HOT 10
- nodejs16.x support HOT 6
- Golang update to 1.17 HOT 1
- Is java11 image on AL2 and Corretto?
- How can I build image for python3.9 runtime? HOT 4
- Help with Debugging Go Lambda HOT 1
- Rebuild images? HOT 2
- What is the status of this project? HOT 7
- Make `myfunction` and `9001` configurable?
- Support for Node 14.x? HOT 1
- Boto3 and botocore need upgrading HOT 5
- Require image for ARM64 architecture
- Support for .NET 6
- Multi-arch support specially arm64 HOT 1
- Current ruby release (v2.7.2p137) out of date (now v2.7.6p?) HOT 1
- Missing .py file causing attributeError on lambda
- Jenkins agent install on lambci/lambda:build-python3.7 HOT 2
- Debugging with Pycharm
- [Question] Support for Provided Runtimes (Namely C++)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-lambda.