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/05/13 21:55:07 UTC

[incubator-teaclave] branch master updated: [docs] Include the echo function example in doc (#294)

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 2949cb0  [docs] Include the echo function example in doc (#294)
2949cb0 is described below

commit 2949cb0c42db1b9e4dfb72d765317f04237c62a7
Author: Mingshen Sun <bo...@mssun.me>
AuthorDate: Wed May 13 14:54:58 2020 -0700

    [docs] Include the echo function example in doc (#294)
---
 README.md                 |  6 ++++--
 docs/my-first-function.md | 33 ++++++++++++++++++++++++++++++++-
 2 files changed, 36 insertions(+), 3 deletions(-)

diff --git a/README.md b/README.md
index db4326a..af02e2a 100644
--- a/README.md
+++ b/README.md
@@ -25,8 +25,10 @@ platform, making computation on privacy-sensitive data safe and simple.
   deployment both locally and within cloud infrastructures. Teaclave also
   provides convenient endpoint APIs, client SDKs and command line tools.
 - **Modularity**:
-  Components in Teaclave are designed in modular, and can be easily embedded in
-  other projects.
+  Components in Teaclave are designed in modular, and some like remote
+  attestation can be easily embedded in other projects. In addition, Teaclave
+  SGX SDK can also be used separately to write standalone SGX enclaves for other
+  purposes.
 
 ## Getting Started
 
diff --git a/docs/my-first-function.md b/docs/my-first-function.md
index 7498764..5fc0cbb 100644
--- a/docs/my-first-function.md
+++ b/docs/my-first-function.md
@@ -85,8 +85,39 @@ Starting teaclave-frontend-service       ... done
 Attaching to ...
 ```
 
-## Simulation Mode
+## Invoke Function
+
+We provide several examples to demonstrating the platform. Let's get started
+with invoking a built-in function: echo, which is a simple function takes one
+input message and return it.
+
+This example is written in Python, and some dependencies are needed for the
+remote attestation. They can be installed with `pip`:
+
+```
+$ pip3 install pyopenssl toml cryptography
+```
 
+Then, run the echo example:
+
+```
+$ cd examples/python
+$ python3 builtin_echo.py 'Hello, Teaclave!'
+[+] registering user
+[+] login
+[+] registering function
+[+] creating task
+[+] approving task
+[+] invoking task
+[+] getting result
+[+] done
+[+] function return:  b'Hello, Teaclave!'
+```
+
+If you see above log, this means that the function is successfully invoked in
+Teaclave.
+
+## Simulation Mode
 To try Teaclave in SGX simulation mode, please install Intel SGX SDK first with instructions in
 [Intel SGX Installation Guide](https://download.01.org/intel-sgx/sgx-linux/2.9/docs/Intel_SGX_Installation_Guide_Linux_2.9_Open_Source.pdf).
 


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