Skip to content

Serverless Spring

Andrew Serff edited this page Dec 22, 2017 · 1 revision

Serverless Spring

Spring Cloud Function cloud.spring.io/spring-cloud-function github.com/proojectriff/riff

  • Dave Syer - @david_syer
  • Mark Fisher - @m_f_

4 developer ready abstractions available in the Cloud through PCF (all with BOSH)

  • Functions
  • Apps
  • Data
  • Containers

Why Serverless

  • Narrowly-scoped units of code and the simplicity of built in event integration that contribute to software development efficencies.
  • Function which don't consumer resources when idle can provide significant resource efficencies.
  • Applying serverless to distributed computing bring operational efficiencies based on automated event-based scheduling and self-scaling.

With PasS we are saying we don't care about the hardware. With FaaS, Functions are an abstraction above an application and we don't care where data comes from, we just want to deal with the data and move it on.

CNCF Serverless Working Group - writing use cases to define the future of cloud/serverless

Who is offering FaaS?

Hosted

  • AWS Lambda
  • Azure FUnctions
  • Goodle Cloud FUnctions

On-Prem/OSS

  • riff
  • Oracle fn
  • OpenWhisk
  • Fission
  • Kubeless
  • OpenFaaS

On to implementation

Java Util Function, Consumer, and Supplier

You can expose a Function as a bean in Spring.

spring-cloud-function-web

@Bean
public Function<Foo, Foo> uppercase() {
    return foo->foo.getValue().toUppercase();
}

ICE - The CAP therom of Serverless

Want Serverless, choose 2

  • Immediate - Instant on
  • Consistent - Immutable containers
  • Efficient - Scale to 0

Installing riff

helm init

helm repo add riffrepo https://riff.charts.storage.
help repo update

hellp install riffrepo/riff --name demo
Clone this wiki locally