Serverless function runtime for Java
Java 8 template for OpenFaas
Quick Start
Pull template from GitHub:
$ faas-cli template pull https://github.com/michaelmerg/serverless-function-runtime-java
Create new function:
$ faas-cli new --lang java-gradle java-echo
Build function:
$ faas-cli build -f java-echo.yml
Deploy function:
$ faas-cli deploy -f java-echo.yml
Invoke function:
$ faas-cli invoke java-echo
Overview
There are two different supported handler interfaces. The basic request handler supports simple Java types or a POJO types as input and output. With the streaming request handler you can handle the input and output as byte streams.
Request handler
public class Handler implements RequestHandler<String, String> {
@Override
public String handle(String input, Context context) {
// Add function code here
return input;
}
}Streaming request handler
public class StreamingHandler implements StreamingRequestHandler {
@Override
public void handle(InputStream input, OutputStream output, Context context) {
// read input stream
// write output stream
}
}
Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
