From e6b779d6fc15c779b7658908ff93d5a511e53f81 Mon Sep 17 00:00:00 2001 From: Haytham Mohamed Date: Mon, 29 Apr 2019 12:16:24 -0500 Subject: [PATCH] Added the sagan adoc files --- docs/src/main/asciidoc/sagan-index.adoc | 50 +++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 docs/src/main/asciidoc/sagan-index.adoc diff --git a/docs/src/main/asciidoc/sagan-index.adoc b/docs/src/main/asciidoc/sagan-index.adoc new file mode 100644 index 000000000..40ddf43a8 --- /dev/null +++ b/docs/src/main/asciidoc/sagan-index.adoc @@ -0,0 +1,50 @@ +Spring Cloud Function is a project with the following high-level goals: + +* Promote the implementation of business logic via functions. +* Decouple the development lifecycle of business logic from any specific runtime target so that the same code can run as a web endpoint, a stream processor, or a task. +* Support a uniform programming model across serverless providers, as well as the ability to run standalone (locally or in a PaaS). +* Enable Spring Boot features (auto-configuration, dependency injection, metrics) on serverless providers. + +It abstracts away all of the transport details and infrastructure, allowing the developer to keep all the familiar tools and processes, and focus firmly on business logic. + +## Features + +Spring Cloud Function features: + +1. Wrappers for `@Beans` of type `Function`, `Consumer` and +`Supplier`, exposing them to the outside world as either HTTP +endpoints and/or message stream listeners/publishers with RabbitMQ, Kafka etc. + +2. Compiling strings which are Java function bodies into bytecode, and +then turning them into `@Beans` that can be wrapped as above. + +3. Deploying a JAR file containing such an application context with an +isolated classloader, so that you can pack them together in a single +JVM. + +4. Adapters for https://github.com/spring-cloud/spring-cloud-function/tree/master/spring-cloud-function-adapters/spring-cloud-function-adapter-aws[AWS Lambda], https://github.com/spring-cloud/spring-cloud-function/tree/master/spring-cloud-function-adapters/spring-cloud-function-adapter-azure[Microsoft Azure], https://github.com/spring-cloud/spring-cloud-function/tree/master/spring-cloud-function-adapters/spring-cloud-function-adapter-openwhisk[Apache OpenWhisk] and possibly other "serverless" service providers. + +Here's a complete, executable, testable Spring Boot application (implementing a simple string manipulation): + +```java +@SpringBootApplication +public class Application { + public static void main(String[] args) { + SpringApplication.run(Application.class, args); + } + + @Bean + public Function, Flux> uppercase() { + return flux -> flux.map(value -> value.toUpperCase()); + } +} +``` +### Sample Projects + +* https://github.com/spring-cloud/spring-cloud-function/blob/master/spring-cloud-function-samples/function-sample[Vanilla] +* https://github.com/spring-cloud/spring-cloud-function/blob/master/spring-cloud-function-samples/function-sample-pof[Plain Old Function] +* https://github.com/spring-cloud/spring-cloud-function/tree/master/spring-cloud-function-samples/function-sample-aws[AWS Lambda] +* https://github.com/spring-cloud/spring-cloud-function/tree/master/spring-cloud-function-samples/function-sample-azure[Microsoft Azure] +* https://github.com/spring-cloud/spring-cloud-function/tree/master/spring-cloud-function-adapters/spring-cloud-function-adapter-openwhisk[Openwhisk] + +