Giter Site home page Giter Site logo

flow's Introduction

Fn Flow Service

CircleCI

logo: you complete me!

To find out how to use Fn Flow in Java read the user guide.

The completer is a service that implements long-running computations based on fn invocations allowing reliable promise-like continuations of function code.

Functions create flows (graphs of completion stages) dynamically using an API from within a function runtime - the completer then invokes these stages, triggering any dependant stages as the computation progresses which in turn can append new stages to the graph.

Dependent stages may be independent function calls (i.e. to compose multiple functions together into a workflow) or can be closures of the original function - in the latter case the completer invokes the function with a special input that allows a wrapper within the function to dispatch the closure correctly (vs calling the original main part of the function).

The completer is language agnostic - to add support for your language check out the API docs.

In languages such as Java where closures (labmdas) can be serialized this allows very simple fluent programs to be produced to control complex processes based on functions.

Running the Flow Service

Make sure the functions server is running

fn start                                                                                                                                                 master ✭ ◼
mount: permission denied (are you root?)
Could not mount /sys/kernel/security.
AppArmor detection and --privileged mode might break.
mount: permission denied (are you root?)
time="2017-09-16T22:04:49Z" level=info msg="datastore dialed" datastore=sqlite3 max_idle_connections=256
time="2017-09-16T22:04:49Z" level=info msg="no docker auths from config files found (this is fine)" error="open /root/.dockercfg: no such file or directory"
time="2017-09-16T22:04:49Z" level=info msg="available memory" ram=1590210560

      ______
     / ____/___
    / /_  / __ \
   / __/ / / / /
  /_/   /_/ /_/

time="2017-09-16T22:04:49Z" level=info msg="Serving Functions API on address `:8080`"

set $DOCKER_LOCALHOST to the loopback interface for your docker.

On Mac:

export DOCKER_LOCALHOST=docker.for.mac.localhost

Otherwise run

$ export DOCKER_LOCALHOST=$(docker inspect --type container -f '{{.NetworkSettings.Gateway}}' functions)

Then run the flow service :

docker run --rm  -d -p 8081:8081 \
           -e API_URL="http://$DOCKER_LOCALHOST:8080/r" \
           -e no_proxy=$DOCKER_LOCALHOST \
           --name flow-service \
           fnproject/flow:latest

Note if you have an HTTP proxy configured in docker you should add the docker loopback interface (and docker.for.mac.localhost) to your no_proxy settings.

Configure via the environment

Env Default Usage
API_URL http://localhost:8080 sets the FN API endpoint for outbound invocations
DB_URL sqlite3://./data/flow.db DB url, also use "inmem:/" for in memory storage
LISTEN :8081 listen host/port (overrides PORT)

Get help

Contributing

Please see CONTRIBUTING.md.

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.