Hasursa GraphQL engine & IBM Serverless

Upkar Lidder

Developer Advocate, IBM

 

> ulidder@us.ibm.com

> @lidderupk

What is Serverless

Serverless computing refers to the concept of building and running applications that do not require server management.

 

It describes a finer-grained deployment model where applications, bundled as one or more functions, are uploaded to a platform and then executed, scaled, and billed in response to the exact demand needed at the moment.

 

It refers to the idea that consumers of serverless computing no longer need to spend time and resources on server provisioning, maintenance, updates, scaling, and capacity planning. Instead, all of these tasks and capabilities are handled by a serverless platform and are completely abstracted away from the developers​.

Cloud Native Computing Foundation

https://github.com/cncf/wg-serverless/tree/master/whitepapers/serverless-overview

Use Cases

  • Secure and scalable APIs
    • API Gateway Function

 

  • Backend services / micro services

 

  • Event Driven Programming
    • Changes in database
    • Social events

 

  • Small focused tasks with infrequent and/or unpredictable traffic

Serverless Landscape

Hosted

Installable

Cloud Native Computing Foundation

Apache OpenWhisk

Apache OpenWhisk is an open source, distributed Serverless platform that supports a programming model in which developers write functional logic (called Actions), in any supported programming language, that can be dynamically scheduled and run (with Rules) in response to associated events (via Triggers) from external sources ( Feeds) or from HTTP requests.

Apache OpenWhisk

Packages

WSK CLI

WSK SYSTEM PACKAGES

WSK SYSTEM PACKAGES

Apache OpenWhisk (py)

Entry point 

Dictionary

Dictionary

Apache OpenWhisk (py)

Apache OpenWhisk (py)

Composition / Orchestration

Composition / Orchestration

So much more ...

  • More Compositions - Use higher-level programming constructs to declaratively chain together multiple actions.
    • while, repeat, let, retry, try, if, etc

 

  • HTTP Actions (web == true)

 

  • Packages community (couchdb, kafka, etc)

 

  • API Gateway (rate limiting, authentication/authorization)

 

  • Install external packages, debugging, etc

KUI Shell

KUI Shell

Community and Help

  • Slack
  • http://openwhisk-team.slack.com/

 

 

  • Github source and OpenWhisk docs

 

 

 

  • Youtube/Medium/Twitter

 

 

  • OpenWhisk Tech Interchange

Thank you

Upkar Lidder

Developer Advocate, IBM

 

> ulidder@us.ibm.com

> @lidderupk

> upkarlidder.com

 

Call for Code 2019

Solid Foundations

Leverages existing opensource solutions

Some things to 🤔

  • Functions are stateless. Need some sort of persistence between runs.
  • Are you able to test and develop locally ? Does provider have CLI ?
  • Can you easily version your functions ? Source control ?
  • Can you easily monitor your functions ?
  • Security and API gateway
  • Avoid long-running loops / mini-monoliths ?
  • Latency (cold, warm and hot loads)
  • How do you track dependencies ?

OpenWhisk

IBM Cloud Functions

Compositions

Apache OpenWhisk (js)

Entry point

Object In

Object Out

Apache OpenWhisk (js)

1

2

3

4

5

Composition / Orchestration

CONDITION Action Name

Code

THEN Action Name

Code

ELSE Action Name

Code

Composition / Orchestration

Apache OpenWhisk (java)

Entry point

JsonObject In

JsonObject Out

Apache OpenWhisk (java)

JsonObject In

Fat JAR

Apache OpenWhisk (java)

1

2

3

4

Apache OpenWhisk (java)

Apache OpenWhisk (tail log)

Apache OpenWhisk (create)

wsk action create helloJava target/hello-world-java.jar

                     --main com.example.FunctionApp

Apache OpenWhisk (invoke)

wsk action invoke --result helloJava --param name "Upkar Lidder"

Apache OpenWhisk (example)

Serverless - a short introduction

By Upkar Lidder

Serverless - a short introduction

  • 1,105