You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@teaclave.apache.org by ms...@apache.org on 2020/06/02 00:51:41 UTC

[incubator-teaclave] branch master updated: [docs] Add doc for the RPC framework (#327)

This is an automated email from the ASF dual-hosted git repository.

mssun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-teaclave.git


The following commit(s) were added to refs/heads/master by this push:
     new 563413b  [docs] Add doc for the RPC framework (#327)
563413b is described below

commit 563413b8da6634f8b8a1e6a78da0e35286958303
Author: Mingshen Sun <bo...@mssun.me>
AuthorDate: Mon Jun 1 17:51:32 2020 -0700

    [docs] Add doc for the RPC framework (#327)
---
 README.md      | 11 ++++++-----
 docs/README.md |  1 +
 rpc/README.md  | 43 +++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 50 insertions(+), 5 deletions(-)

diff --git a/README.md b/README.md
index 60b6e3a..97f38f8 100644
--- a/README.md
+++ b/README.md
@@ -46,15 +46,16 @@ platform, making computation on privacy-sensitive data safe and simple.
 ### Codebase
 
 - [Attestation](attestation)
-- [Teaclave Services](services)
-- [Teaclave Worker](worker)
-- [Function Executors](executor)
 - [Built-in Functions](function)
+- [Command Line Tool](cli)
 - [Configurations in Teaclave](config)
 - [Data Center Attestation Service](dcap)
-- [Command Line Tool](cli)
-- [Keys and Certificates](keys)
 - [Dockerfile and Compose File](docker)
+- [Function Executors](executor)
+- [Keys and Certificates](keys)
+- [RPC](rpc)
+- [Teaclave Services](services)
+- [Teaclave Worker](worker)
 - [Test Harness and Test Cases](tests)
 - [Third-Party Dependency Vendoring](third_party)
 
diff --git a/docs/README.md b/docs/README.md
index 64196ba..f0b306c 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -9,3 +9,4 @@ permalink: /docs/
 - [Rust Development Guideline](rust-guideline.md)
 - [Mutual Attestation: Why and How](mutual-attestation.md)
 - [Access Control in Teaclave](access-control.md)
+- [Build System](build-system.md)
diff --git a/rpc/README.md b/rpc/README.md
new file mode 100644
index 0000000..aa03e90
--- /dev/null
+++ b/rpc/README.md
@@ -0,0 +1,43 @@
+---
+permalink: /rpc
+---
+
+# RPC
+
+This directory contains an RPC implementation over attested TLS connection
+written in Rust, providing trusted channels to send and handle requests.
+RPC interfaces and request/response messages can be defined in ProtoBuf and
+used for generating Rust structs and traits to implement services or client
+function to send requests.
+
+Similar with other RPC frameworks, there are several concepts of RPC in
+Teaclave.
+
+## Channel and Client
+
+A channel in RPC represent a connection to the target service. Clients can use
+the channel to send requests. In Teaclave, we implement `SgxTrustedTlsChannel`,
+which can establish and attested a remote connection. For example, to connect
+the management service, you need to establish a trusted channel with the service
+first. Then, create a client of management service with the channel. At last,
+you can use this client to send requests like `InvokeTask`.
+
+When constructing a client, you can use the `SgxTrustedTlsClientConfig` to setup
+TLS and attestation configs.
+
+## Server and Service
+
+Server is an entity to listening a network address, processing incoming
+messages, and forwarding requests to certain service. Similar with channel in
+Teaclave, we implement `SgxTrustedTlsServer`, which can establish an attested TLS
+channel with clients.
+
+Similar with the client, you can use `SgxTrustedTlsServerConfig` to setup TLS
+and attestation configs.
+
+## Protocol
+
+There are many RPC protocols can be implemented in the RPC framework. Currently,
+there's only one simple protocol called `JsonProtocol`. Simply speaking, for
+the json protocol, one RPC message will contain a length of the following
+requests (in big endian) and a json serialized request.


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@teaclave.apache.org
For additional commands, e-mail: commits-help@teaclave.apache.org