Convert Figma logo to code with AI

apache logoopenwhisk

Apache OpenWhisk is an open source serverless cloud platform

6,516
1,166
6,516
414

Top Related Projects

⚡ Serverless Framework – Effortlessly build apps that auto-scale, incur zero costs when idle, and require minimal maintenance using AWS Lambda and other managed cloud services.

24,977

OpenFaaS - Serverless Functions Made Simple

Kubernetes Native Serverless Framework

5,295

High-Performance Serverless event and data processing platform

8,411

Fast and Simple Serverless Functions for Kubernetes

IronFunctions - the serverless microservices platform by

Quick Overview

Apache OpenWhisk is an open-source, distributed serverless platform that executes functions in response to events at any scale. It allows developers to focus on writing code without the need to manage infrastructure, providing a flexible and scalable solution for building event-driven applications.

Pros

  • Highly scalable and can handle millions of events per second
  • Supports multiple programming languages, including JavaScript, Python, Java, and more
  • Integrates well with various event sources and external services
  • Open-source and community-driven, allowing for customization and contributions

Cons

  • Steeper learning curve compared to some other serverless platforms
  • Limited ecosystem of pre-built integrations compared to major cloud providers
  • Can be complex to set up and manage for small-scale projects
  • Performance may vary depending on the deployment environment

Getting Started

To get started with Apache OpenWhisk, follow these steps:

  1. Install the OpenWhisk CLI:
wget https://github.com/apache/openwhisk-cli/releases/download/latest/OpenWhisk_CLI-latest-linux-amd64.tgz
tar -xvf OpenWhisk_CLI-latest-linux-amd64.tgz
sudo mv wsk /usr/local/bin/wsk
  1. Configure the CLI:
wsk property set --apihost <YOUR_API_HOST> --auth <YOUR_AUTH_KEY>
  1. Create and invoke a simple action:
# Create an action
wsk action create hello hello.js

# Invoke the action
wsk action invoke hello --result

For more detailed instructions and advanced usage, refer to the official Apache OpenWhisk documentation.

Competitor Comparisons

⚡ Serverless Framework – Effortlessly build apps that auto-scale, incur zero costs when idle, and require minimal maintenance using AWS Lambda and other managed cloud services.

Pros of Serverless

  • Broader cloud provider support, including AWS, Azure, Google Cloud, and more
  • Extensive plugin ecosystem for customization and extending functionality
  • Active community with frequent updates and contributions

Cons of Serverless

  • Steeper learning curve for beginners due to its extensive feature set
  • Potential vendor lock-in when using provider-specific features
  • Larger deployment package size compared to OpenWhisk

Code Comparison

OpenWhisk action example:

function main(params) {
    return { message: "Hello, " + params.name };
}

Serverless function example:

module.exports.hello = async (event) => {
  return {
    statusCode: 200,
    body: JSON.stringify({ message: `Hello, ${event.name}` }),
  };
};

Both frameworks allow for simple function definitions, but Serverless typically requires more configuration in the serverless.yml file to define the function's trigger and other settings.

OpenWhisk focuses on a simpler, more standardized approach to function deployment across different providers, while Serverless offers more flexibility and customization options at the cost of increased complexity.

24,977

OpenFaaS - Serverless Functions Made Simple

Pros of OpenFaaS

  • Simpler architecture and easier to deploy
  • Better support for Kubernetes and container orchestration
  • More active community and frequent updates

Cons of OpenFaaS

  • Less mature and battle-tested compared to OpenWhisk
  • Fewer language runtimes and integrations out-of-the-box
  • Limited built-in security features

Code Comparison

OpenFaaS function example:

version: 1.0
provider:
  name: openfaas
  gateway: http://127.0.0.1:8080
functions:
  hello-world:
    lang: python3
    handler: ./hello-world
    image: hello-world:latest

OpenWhisk action example:

function main(params) {
    var name = params.name || 'World';
    return {payload: 'Hello, ' + name + '!'};
}

Both projects aim to provide serverless computing platforms, but they differ in their approach and implementation. OpenFaaS focuses on simplicity and Kubernetes integration, making it easier to get started and deploy in container-based environments. OpenWhisk, on the other hand, offers a more comprehensive and mature platform with additional features and integrations, but may be more complex to set up and manage.

Kubernetes Native Serverless Framework

Pros of Kubeless

  • Lightweight and easy to deploy, with minimal setup required
  • Native Kubernetes integration, leveraging existing Kubernetes concepts
  • Supports multiple runtimes (Python, Node.js, Ruby, PHP, Go)

Cons of Kubeless

  • Limited ecosystem and community support compared to OpenWhisk
  • Fewer advanced features and integrations out of the box
  • Less extensive documentation and learning resources

Code Comparison

OpenWhisk action example:

function main(params) {
    return { message: "Hello, " + params.name };
}

Kubeless function example:

def hello(event, context):
    return "Hello, " + event['data']

Both platforms use similar function structures, but OpenWhisk uses a main function with params, while Kubeless uses an event and context parameter approach.

OpenWhisk offers more flexibility in function naming and structure, while Kubeless follows a more standardized serverless function pattern.

OpenWhisk provides a wider range of supported languages and runtimes, whereas Kubeless focuses on a core set of popular languages.

Overall, OpenWhisk is more feature-rich and enterprise-ready, while Kubeless offers a simpler, Kubernetes-native approach to serverless computing.

5,295

High-Performance Serverless event and data processing platform

Pros of Nuclio

  • Faster execution times and lower latency due to its optimized runtime
  • Built-in support for GPU acceleration and distributed training
  • More extensive language support, including Go, Python, .NET, Java, and Shell

Cons of Nuclio

  • Smaller community and ecosystem compared to OpenWhisk
  • Less mature project with potentially fewer enterprise-grade features
  • Limited integration with cloud providers outside of Kubernetes environments

Code Comparison

OpenWhisk action example (JavaScript):

function main(params) {
    var name = params.name || 'stranger';
    var greeting = 'Hello ' + name + '!';
    return {payload: greeting};
}

Nuclio function example (Python):

import nuclio

def handler(context, event):
    name = event.body.decode('utf-8') or 'stranger'
    return f'Hello {name}!'

if __name__ == '__main__':
    nuclio.run_local(handler)

Both examples demonstrate simple serverless functions, but Nuclio's approach includes built-in local testing capabilities and more explicit context handling. OpenWhisk uses a more straightforward function signature, while Nuclio provides additional tools for function development and deployment within its ecosystem.

8,411

Fast and Simple Serverless Functions for Kubernetes

Pros of Fission

  • Lightweight and fast: Fission has lower cold start times and resource overhead
  • Simpler architecture: Easier to set up and maintain, with fewer components
  • Native Kubernetes integration: Designed to work seamlessly with Kubernetes

Cons of Fission

  • Less mature ecosystem: Fewer integrations and community plugins compared to OpenWhisk
  • Limited language support: Supports fewer programming languages out of the box
  • Smaller community: Less active development and community support

Code Comparison

OpenWhisk function example:

function main(params) {
    var name = params.name || 'World';
    return {payload: 'Hello, ' + name + '!'};
}

Fission function example:

def main():
    return "Hello, World!"

Both frameworks allow for simple function definitions, but OpenWhisk provides more flexibility with input parameters, while Fission focuses on simplicity and ease of use.

OpenWhisk offers a more comprehensive serverless platform with additional features and integrations, making it suitable for complex enterprise applications. Fission, on the other hand, provides a lightweight and fast serverless solution that integrates well with Kubernetes environments, making it ideal for organizations already using Kubernetes or those looking for a simpler serverless implementation.

IronFunctions - the serverless microservices platform by

Pros of Functions

  • Simpler architecture and easier to deploy
  • Supports multiple programming languages out-of-the-box
  • Lightweight and designed for containerized environments

Cons of Functions

  • Less active community and development compared to OpenWhisk
  • Fewer integrations with other services and tools
  • Limited scalability options for large-scale deployments

Code Comparison

Functions:

func main() {
    iron.RegisterFunc("hello", hello)
    iron.Serve(8080)
}

func hello(w http.ResponseWriter, r *http.Request) {
    fmt.Fprintln(w, "Hello World!")
}

OpenWhisk:

function main(params) {
    return { payload: 'Hello ' + params.name };
}

Functions uses a more traditional web server approach, while OpenWhisk focuses on pure function execution. OpenWhisk's code is typically more concise and focused solely on the function logic.

Functions is better suited for developers familiar with traditional web frameworks and looking for a straightforward serverless solution. OpenWhisk offers a more comprehensive platform with advanced features and scalability, making it ideal for larger organizations or complex serverless architectures.

Both projects have their merits, and the choice between them depends on specific project requirements, team expertise, and desired ecosystem integrations.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

OpenWhisk

License Join Slack Twitter

Unit Tests System Tests MultiRuntime Tests Standalone Tests Scheduler Tests Performance Tests codecov

OpenWhisk is a serverless functions platform for building cloud applications. OpenWhisk offers a rich programming model for creating serverless APIs from functions, composing functions into serverless workflows, and connecting events to functions using rules and triggers. Learn more at http://openwhisk.apache.org.

Quick Start

The easiest way to start using OpenWhisk is to install the "Standalone" OpenWhisk stack. This is a full-featured OpenWhisk stack running as a Java process for convenience. Serverless functions run within Docker containers. You will need Docker, Java and Node.js available on your machine.

To get started:

git clone https://github.com/apache/openwhisk.git
cd openwhisk
./gradlew core:standalone:bootRun
  • When the OpenWhisk stack is up, it will open your browser to a functions Playground, typically served from http://localhost:3232. The Playground allows you create and run functions directly from your browser.

  • To make use of all OpenWhisk features, you will need the OpenWhisk command line tool called wsk which you can download from https://s.apache.org/openwhisk-cli-download. Please refer to the CLI configuration for additional details. Typically you configure the CLI for Standalone OpenWhisk as follows:

wsk property set \
  --apihost 'http://localhost:3233' \
  --auth '23bc46b1-71f6-4ed5-8c54-816aa4f8c502:123zO3xZCLrMN6v2BKK1dXYFpXlPkccOFqm12CdAsMgRU4VrNZ9lyGVCGuMDGIwP'
  • Standalone OpenWhisk can be configured to deploy additional capabilities when that is desirable. Additional resources are available here.

Deploy to Kubernetes

OpenWhisk can also be installed on a Kubernetes cluster. You can use a managed Kubernetes cluster provisioned from a public cloud provider (e.g., AKS, EKS, IKS, GKE), or a cluster you manage yourself. Additionally for local development, OpenWhisk is compatible with Minikube, and Kubernetes for Mac using the support built into Docker 18.06 (or higher).

To get started:

git clone https://github.com/apache/openwhisk-deploy-kube.git

Then follow the instructions in the OpenWhisk on Kubernetes README.md.

Learn Concepts and Commands

Browse the documentation to learn more. Here are some topics you may be interested in:

OpenWhisk Community and Support

Report bugs, ask questions and request features here on GitHub.

You can also join the OpenWhisk Team on Slack https://openwhisk-team.slack.com and chat with developers. To get access to our public Slack team, request an invite https://openwhisk.apache.org/slack.html.

Project Repository Structure

The OpenWhisk system is built from a number of components. The picture below groups the components by their GitHub repos. Please open issues for a component against the appropriate repo (if in doubt just open against the main openwhisk repo).

component/repo mapping

What happens on an invocation?

This diagram depicts the steps which take place within Openwhisk when an action is invoked by the user:

component/repo mapping