Git Product home page Git Product logo

fission-ui's Introduction


Fission: Serverless Functions for Kubernetes

Fission Licence Fission Releases go.dev reference Go Report Card Fission contributors Commit Activity
Fission website Fission slack Fission twitter GitHub Repo stars


Fission is an open-source, Kubernetes-native serverless framework that simplifies the deployment of functions and applications on Kubernetes. With Fission, developers can easily create and deploy serverless functions that can be triggered by a variety of events, such as HTTP requests, messages from a message queue, or scheduled tasks.

Fission provides a simple, easy-to-use interface for developers to create serverless functions in their language of choice, without having to worry about the underlying infrastructure. The framework also offers automatic scaling, so functions can scale up or down based on demand, without any additional configuration.

Fission operates on just the code: Docker and Kubernetes are abstracted away under normal operation, though you can use both to extend Fission if you want to.

Fission is extensible to any language; the core is written in Go, and language-specific parts are isolated in something called environments (more below). Fission currently supports NodeJS, Python, Ruby, Go, PHP, Bash, and any Linux executable, with more languages coming soon.

Table of Contents

Performance: 100msec cold start

Fission maintains a pool of "warm" containers that each contain a small dynamic loader. When a function is first called, i.e. "cold-started", a running container is chosen and the function is loaded. This pool is what makes Fission fast: cold-start latencies are typically about 100msec.

Kubernetes is the right place for Serverless

We're built on Kubernetes because we think any non-trivial app will use a combination of serverless functions and more conventional microservices, and Kubernetes is a great framework to bring these together seamlessly.

Building on Kubernetes also means that anything you do for operations on your Kubernetes cluster โ€” such as monitoring or log aggregation โ€” also helps with ops on your Fission deployment.

Getting Started

  # Add the stock NodeJS env to your Fission deployment
  $ fission env create --name nodejs --image fission/node-env

  # Create a function with a javascript one-liner that prints "hello world"
  $ fission function create --name hello --env nodejs --code https://raw.githubusercontent.com/fission/examples/master/nodejs/hello.js

  # Run the function.  This takes about 100msec the first time.
  $ fission function test --name hello
  Hello, world!

Learn More

Contributing

Check out the contributing guide.

Who is using Fission?

Sponsors

The following companies, organizations, and individuals support Fission's ongoing maintenance and development. If you are using/contributing to Fission, we would be happy to list you here, please raise a Pull request.

InfraCloud Srcmesh

License

Fission is licensed under the Apache License 2.0 - see the LICENSE file for details

fission-ui's People

Contributors

dgoujard avatar life1347 avatar mingfang avatar soamvasani avatar yqf3139 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fission-ui's Issues

Change api from fission controller to TPR

Fission has landed the 'V2 types and TPR' in commit e23877.
To make the api migration:

  • Make a release which is compatible with v1 types and controller
  • Evaluate fission TPR and estimated workload, because the v2 types may require some ui change
  • Make the migration in the api level
  • Update ui to suit all the v2 types

Enhance the code test component

To find a react component like postman hopefully.

  • Add header, query, body editing support
  • Format the response
  • Switch test end point between the main/draft function

Enhance function list with filtering and sorting

Filter

  • User input some keywords to filter functions, the keywords can be found in name, environment, triggers
  • The input field is on the function list left top corner

Sort

  • User can sort functions by name, environment, trigger (number) by clicking on the table header

Fix code undefined in function batch upload

In function batch upload, the code is read from the local file.
The file content is retrieved by

reader.onload = (e) => {
  f.code = e.target.result; // instead of this.result
}

The bug is fixed by 5453594. Currently the v0.1.0 docker image needs to be updated.

support v2 API

it's not support v2 api, we have plan to support v2 ?

Support environment which uploads binary file (Currently Golang)

FIssion just landed the golang environment support.The golang .so file is using the function's code field to upload/download binary file, which is used as the text file by other environment now.

It is difficult for fission-ui to distinguish whether the file is binary or not to enable function editing. So the bug will be fixed until we land a feature in fission to tell whether the file is binary or not, or further more the environment v2 model.

Currently we can use batch upload to create golang env functions. However, it is buggy now because we are trying to read an binary file as string and encode it in base64.

Add test tab in function edit page

We can integrate a very lite testing framework for functions.
Currently everything stored in LocalStorage. If the feature is useful, then propose it to fission.
User can create/update/delete or save from history test to maintain a test case list: a mapping from request to response descriptions.

Request is just like test request, response can be no constrain or has constrains.
Constrains:

  • status code equals/betweens
  • body equals to sth entirely
  • header has a specific key-value pair

The test list can be tested by clicking on Test all button, or it can be associated by the deploy function button.
Create a temp function for all the tests. After every test completed, generate a test report.

Add fission-benchmark manage and visualization

Fission-Benchmark is benchmark tools and workloads for Fission. It can works as service and ui can use k8s TPR endpoints to control the service.

Mockups

Once the user click on the Benchmark topbar, the config list will be shown.
image

Click on the instance button, the related instances list
image

The instance detail page, will visualize the report
image

Proxy

To let ui access k8s TPR endpoint, add /proxy/tpr/benchmark/ maps to /apis/benchmark.fission.io/v1/namespaces/fission-benchmark/
Example: /proxy/tpr/benchmark/instances/hpa-workload-instance

Support function versioning

Fission supports function versioning, every function update create a new version labeled by uid.
Currently fission is missing a api for listing all the version info (timestamp, uid) for a specific function.
I have a commit to do this and is working with fission to land this.

  • Add function version listing in the function edit page.
  • User can replace their current working space (the draft) with any version they select.
  • By default all references to a function point to it's latest version.
  • Show the uid to the user of which version of code they are using for a trigger.
  • Add uid selection in trigger create forms.

image

Support function logging

Commit a13015e in fission adds function logging.
Fission-ui will add a tab to display logs of a specific function.
The mockup ui will be discussed to deliver a better user experience. Some ideas:

  • The tab can float on the function edit tab or is fixed inside the logging tab. Otherwise the user will need to switch back and forth to update function / invoke function / see the result and logs.
  • Add filters to logs because the logs can provide many fields like time, function-id, pod, stream(stderr, stdout)
  • User can select to follow the logs or just see a snapshot of logs.

Currently fission cli connects to influxdb and polls the logs.
Fission controller may provide a common api to fetch logs for cli and ui. This enhancement can wait until the controller api is ready.

Add i18n support

Use the framework to add i18n is not difficult, maybe we can add this in release 2.

Upload functions in batch

Add a function update page:

  • The entrance is called Upload in batch beside the Add button in function list page
  • User can control the mapping between file extension and existing environment by a table
  • User can click on Select functions from local to open a file selector to choose multiple files into the pending list
  • User can drag and drop multiple files into the pending list
  • The name, env of the functions in the pending list is editable, default name is file name and default env is selected from the file ext to env mapping
  • There is an switch of 'Add/Update' to let user choose from to create all the functions as new functions or just want to batch update the existed functions
  • When Upload is clicked, check all the field and then continue, if not, do nothing but show user the error
  • Create/Update the functions one by one, if error occurs during a specifc function, add the error to specific row in the pending list and continue to try the next one
  • Show pending/success/processing/failed state of item function in the pending list
  • User can remove one row of the pending function
  • User click on cancel to return to the function list page

Support message queue triggers

  • Support message queue triggers CRUD
  • (Optional) Add a message queue client to push messages for the user to make some tests

Allow configuring fission namespace

fission-ui hardcodes the controller namespace as "fission". However with the fission helm chart, the namespace could be anything that the user sets; when it's not "fission", fission-ui nginx crashes with:

2017/08/10 00:35:15 [emerg] 1#1: host not found in upstream "controller.fission" in /etc/nginx/conf.d/default.conf:36
nginx: [emerg] host not found in upstream "controller.fission" in /etc/nginx/conf.d/default.conf:36

This seems to be the place it's hardcoded:
https://github.com/fission/fission-ui/blob/master/docker/fission-ui.conf#L36

Some sort of environment variable would do the trick. Then we could set it in the deployment yaml.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.