teaclave-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ms...@apache.org
Subject [incubator-teaclave] branch master updated: [docs] Add README.md for executor (#309)
Date Thu, 21 May 2020 21:41:33 GMT
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 6105108  [docs] Add README.md for executor (#309)
6105108 is described below

commit 610510870fad44d801694c44b6a862edfa7ed1dd
Author: Mingshen Sun <bob@mssun.me>
AuthorDate: Thu May 21 14:41:26 2020 -0700

    [docs] Add README.md for executor (#309)
---
 README.md               |  1 +
 executor/Cargo.toml     | 15 +++++++++++++++
 executor/README.md      | 22 ++++++++++++++++++++++
 executor/src/builtin.rs |  5 +++++
 worker/Cargo.toml       |  2 +-
 5 files changed, 44 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index af02e2a..b122cab 100644
--- a/README.md
+++ b/README.md
@@ -44,6 +44,7 @@ platform, making computation on privacy-sensitive data safe and simple.
 ### Codebase
 
 - [Teaclave Services](services)
+- [Function Executors](executor)
 - [Configurations in Teaclave](config)
 - [Data Center Attestation Service](dcap)
 - [Keys and Certificates](keys)
diff --git a/executor/Cargo.toml b/executor/Cargo.toml
index b6428f4..cc18df0 100644
--- a/executor/Cargo.toml
+++ b/executor/Cargo.toml
@@ -23,6 +23,21 @@ enclave_unit_test = [
   "teaclave_runtime/mesalock_sgx"
 ]
 
+# Enable builtin functions for the builtin executor
+
+full_builtin_function = [
+  "builtin_echo",
+  "builtin_gbdt_predict",
+  "builtin_gbdt_train",
+  "builtin_logistic_regression_predict",
+  "builtin_logistic_regression_train"
+]
+builtin_echo = []
+builtin_gbdt_predict = []
+builtin_gbdt_train = []
+builtin_logistic_regression_predict = []
+builtin_logistic_regression_train = []
+
 [dependencies]
 log           = { version = "0.4.6" }
 anyhow        = { version = "1.0.26" }
diff --git a/executor/README.md b/executor/README.md
new file mode 100644
index 0000000..9d3d1dc
--- /dev/null
+++ b/executor/README.md
@@ -0,0 +1,22 @@
+---
+permalink: /executor
+---
+
+# Function Executors
+
+Function executor is one of the core component in a FaaS platform to provide
+execution runtime for running user-defined functions. In Teaclave, we aim to
+provide safe, secure and versatile function executors, which can guarantee the
+confidentiality of security-sensitive data during computation, and also support
+functions written in different languages. In addition, we are working hard to
+achieve better security guarantees such as memory safety.
+
+In Teaclave, there are two executors to native and Python functions.
+- *Builtin Executor*: There are many useful built-in functions which are statically
+  compiled with Teaclave. Normally, these built-in functions are implemented in
+  Rust, and can provide better (native) performance. The Builtin executor is to
+  dispatch function invocation requests to corresponding built-in function
+  implementations.
+- *MesaPy Executor*: The MesaPy executor provides a Python interpreter in SGX.
+  User-defined Python functions can be executed in the MesaPy executor. The
+  executor also provides interfaces to fetch and store data through the runtime.
diff --git a/executor/src/builtin.rs b/executor/src/builtin.rs
index b5c37f6..9e9941f 100644
--- a/executor/src/builtin.rs
+++ b/executor/src/builtin.rs
@@ -37,10 +37,15 @@ impl TeaclaveExecutor for BuiltinFunctionExecutor {
         runtime: FunctionRuntime,
     ) -> Result<String> {
         match name.as_str() {
+            #[cfg(feature = "builtin_echo")]
             Echo::NAME => Echo::new().run(arguments, runtime),
+            #[cfg(feature = "builtin_gbdt_predict")]
             GbdtPredict::NAME => GbdtPredict::new().run(arguments, runtime),
+            #[cfg(feature = "builtin_gbdt_train")]
             GbdtTrain::NAME => GbdtTrain::new().run(arguments, runtime),
+            #[cfg(feature = "builtin_logistic_regression_train")]
             LogisticRegressionTrain::NAME => LogisticRegressionTrain::new().run(arguments,
runtime),
+            #[cfg(feature = "builtin_logistic_regression_predict")]
             LogisticRegressionPredict::NAME => {
                 LogisticRegressionPredict::new().run(arguments, runtime)
             }
diff --git a/worker/Cargo.toml b/worker/Cargo.toml
index fe73855..fa403a9 100644
--- a/worker/Cargo.toml
+++ b/worker/Cargo.toml
@@ -27,7 +27,7 @@ anyhow        = { version = "1.0.26" }
 serde_json    = { version = "1.0.39" }
 thiserror     = { version = "1.0.9" }
 teaclave_types = { path = "../types" }
-teaclave_executor = { path = "../executor" }
+teaclave_executor = { path = "../executor", features = ["full_builtin_function"] }
 teaclave_runtime = { path = "../runtime" }
 teaclave_test_utils = { path = "../tests/utils", optional = true }
 


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


Mime
View raw message