Code Monkey home page Code Monkey logo

phoenix's Introduction

logo

Phoenix Dataplane Service

Build Phoenix Build mRPC Open in Dev Containers

Documentation

Phoenix is a dataplane service which serves as a framework to develop and deploy various kinds of managed services.

The key features of Phoenix include:

Modular Plugin System: Phoenix provides an engine abstraction which, as the modular unit, can be developed, dynamically load, scheduled, and even be live upgraded with minimal disruption to user applications.

High-performance Networking: Phoenix offers managed access to networking devices while exposing a user-friendly API.

Policy Manageability: Phoenix supports application-layer policies which can be specified by infrastructure administers to gain visibility and control user application behaviors.

Getting Started

Building Phoenix

  1. Clone the repo and its submodules.
$ git clone [email protected]:phoenix-dataplane/phoenix.git --recursive
  1. Install required packages. Make sure you have libibverbs, librdmacm, libnuma, protoc, libclang, and cmake available on your system. Additionally, you need to have rustup and cargo-make installed. For Ubuntu 22.04, you can use the following commands:
$ sudo apt update
$ sudo apt install libclang-dev libnuma-dev librdmacm-dev libibverbs-dev protobuf-compiler cmake
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
$ cargo install cargo-make

Alternatively, if you already have VS Code and Docker installed, click the badge above or here to start.

  1. Build and run PhoenixOS service.
$ cargo make

By default, cargo make will build the dev-test-flow target. You can inspect and customize the stages of this workflow in Makefile.toml. Use cargo make run-phoenixos to start the service after building.

You can also manually execute each step in the dev-test-flow.

PhoenixOS without any plugins is just an empty control plane. Next, you can build and load some useful plugins and run a few user applications.

Building and Running mRPC

mRPC is the first experimental feature on Phoenix. To build and deploy mRPC plugins, and run PhoenixOS, follow these steps:

$ cd experimental/mrpc
$ cat load-mrpc-plugins.toml >> ../../phoenix.toml
$ cargo make

Ensure that exactly one instance of PhoenixOS is running on each server.

Note: If you have multiple machines, update the destination address in experimental/mrpc/examples/rpc_hello/src/client.rs to your server address.

Next, build the rpc_echo example:

$ cargo build --release --workspace -p rpc_echo

You can also build all mRPC examples using:

$ cargo make build-mrpc-examples

Note: building phoenixos and its plugins requires the plugins to link with a prebuilt set of phoenix crates. This is currently done by tools/phoenix_cargo and the entire workflow is handled by cargo-make. However, building user libraries and apps does not require that. We can still use cargo.

Running mRPC examples

You can run the examples manually by

$ cargo rr -p rpc_echo --bin rpc_echo_server
# In a seperate terminal
$ cargo rr -p rpc_echo --bin rpc_echo_client

Note: If you have multiple machines, we provide a launcher to help with running the examples:

$ cd ../../benchmark
# Follow the README under benchmark directory and update config.toml
$ cargo rr --bin launcher -- --benchmark benchmark/rpc_echo.toml

You can explore the set of mRPC user applications in experimental/mrpc/examples.

Learning More

Documentation

License

Phoenix is licensed under the Apache-2.0 license.

phoenix's People

Contributors

crazyboycjr avatar danyangz avatar kristoff-starling avatar libertyeagle avatar livingshade avatar romero027 avatar shiftlin avatar sigempty avatar xor-op avatar

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.