2. Buildpacks assemble Function Containers
● developers implement only
business logic in a Function
● the Buildpack-provided
Invoker calls the
developer-provided
Function
● dependency and base
image layers can be
updated independently
Source Code
Function Layer
Invoker Layer
Dependency Layers
Base Image
Function
Container
$ riff function create myfunc --git-repo <url> --artifact myfunc.jsFunction
3. Functions can handle HTTP Requests
● configuration is mutable, each
update creates an immutable
revision
● a route enables traffic policies
across revisions
● autoscaler monitors request
metrics and scales the
Function 0-N
● when scaled to 0 the route is
redirected to an activator
RouteIngress
Autoscaler
RevisionConfiguration
Knative/Istio
Handler
$ riff handler create myfunc --function-ref myfunc
4. Functions can process Streams of events
● provides loose coupling
between producers and
consumers
● enables a variety of
interaction patterns beyond
request/reply
● promotes a reactive rather
than imperative model
● will support correlated stores
for stateful processing
Messaging
Service
Stream
FC
Stream
Processor
$ riff stream create in --provider kafka
$ riff stream create out --provider kafka
$ riff processor create myfunc
--function-ref myfunc --input in --output out
Processor
5. Buildpacks can assemble Applications too
● developers implement an
application that handles
HTTP requests explicitly
● can still be deployed with a
Handler resource but not
with a Processor resource
● dependency and base
image layers can still be
updated independently
Source Code
Application Layer
Dependency Layers
Base Image
Application
Container
$ riff application create petclinic --git-repo
https://github.com/spring-projects/spring-petclinicApplication
$ riff handler create petclinic --application-ref petclinic