[apache/incubator-teaclave] Optimize memory footprint of serde in RPC (PR #577)

2021-11-30 Thread Mingshen Sun
## Description

This PR optimize memory footprint of RPC (i.e., memory used by serde).

Serde uses up more than 10x memory to deserialize a json message when using 
`#[serde(flatten)]` and `#[serde(tag = request]`.

In our case, we cannot handle more than 2M message because serde will 
allocation more than 100M bytes memory. The root cause is still unknown.

## Type of change (select or add applied and delete the others)
- [x] Breaking change (fix or feature that would cause existing functionality 
to not work as expected)

## How has this been tested?
CI tests.

## Checklist

- [x] Fork the repo and create your branch from `master`.
- [x] If youve added code that should be tested, add tests.
- [x] If youve changed APIs, update the documentation.
- [x] Ensure the tests pass (see CI results).
- [x] Make sure your code lints/format.

You can view, comment on, or merge this pull request online at:

  https://github.com/apache/incubator-teaclave/pull/577

-- Commit Summary --

  * Optimize RPC memory footprint of serde

-- File Changes --

M examples/python/wasm_rust_psi_payload/Cargo.lock (2)
M rpc/src/request.rs (1)
M sdk/python/teaclave.py (48)
M services/proto/proto_gen/templates/proto.j2 (2)
M tests/scripts/functional_tests.py (9)
M types/src/staged_function.rs (1)

-- Patch Links --

https://github.com/apache/incubator-teaclave/pull/577.patch
https://github.com/apache/incubator-teaclave/pull/577.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/apache/incubator-teaclave/pull/577


Re: [apache/incubator-teaclave] How about provide a live demo API to experience? (#466)

2021-11-30 Thread master-davidlee
Closed #466.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/apache/incubator-teaclave/issues/466#event-5696153071