Coder Social home page Coder Social logo

mattwelke / apache-openwhisk-runtime-java-17 Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 40 KB

Experimental runtime for Apache OpenWhisk. Not considered production ready. Not affiliated with the Apache Software Foundation.

License: Apache License 2.0

Dockerfile 12.15% Shell 2.84% Java 85.01%
openwhisk openwhisk-runtime java java-17

apache-openwhisk-runtime-java-17's Introduction

apache-openwhisk-runtime-java-17

An experimental runtime for Apache OpenWhisk. Derived from https://github.com/apache/openwhisk-runtime-java.

Not considered production ready. Not affiliated with the Apache Software Foundation.

Not maintained as of Jan 7, 2023.

apache-openwhisk-runtime-java-17's People

Contributors

dependabot[bot] avatar mattwelke avatar

Stargazers

 avatar

Watchers

 avatar  avatar

apache-openwhisk-runtime-java-17's Issues

Switch to Adoptium JDK for runtime

Right now, it's using jlink to produce a runtime. Normally, one would use jlink to produce a runtime as small as possible, including only the modules needed by their app's code. However, OpenWhisk users may have any use case, so that's why the current Dockerfile attempts to include every module.

For simplicity, we may as well just use a JDK instead of a custom runtime. Even modules including things like compiler tools may be useful for niche use cases that OpenWhisk users may have.

Additionally, the Dockerfile still contains copy-pasted code from when I experimented with jlink using Microsoft tutorials. We should switch from a Microsoft build to an Adoptium build (https://adoptium.net/) because it will be more likely to be recognized and understood by OpenWhisk users.

Break apart GHA workflow

Right now, the GHA workflow does the build and push to Docker Hub, and it's running on pull request. Instead, we need two workflows:

  • test - runs tests upon pull requests to main
  • build_and_deploy - builds the Docker image and deploys it to Docker Hub upon pushes to main

That way we won't have pull requests causing Docker Images to be built and we'll have something in place to run tests.

Remove setClusterContext

In https://github.com/ow-extended-runtimes/java-17/blob/main/src/main/java/com/owextendedruntimes/actiontest/Action.java, the method setClusterContext is problematic. It's weird that users would see that function because they shouldn't call it. It's only there so that the Proxy can inject the cluster context during setup for the action to reference during any invocation it wants to. Right now, the method is public because it exists in a different package from the Proxy class.

Solutions:

  • Move into the same package as the Proxy class, so that the visibility can be changed to package-private. That way, users won't see it.
  • Refactor the Action class and Proxy class. In the Action class, add a constructor that allows the context to be injected. In the Proxy class, use reflection to call the new constructor instead of calling the default constructor like right now.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.