incubator-teaclave icon indicating copy to clipboard operation
incubator-teaclave copied to clipboard

Support persistent data storage

Open m3ngzhang opened this issue 4 years ago • 2 comments

Hi, I'm seeking for a way to persist data after relaunching teaclave services. I read your roadmap, and I found you guys have done a persistent database implementation work. Can I use this database to save like register information and data owner meta info? If not, do you have a other way that you guys maybe discussed before? Really need a way out.

m3ngzhang avatar May 29 '20 04:05 m3ngzhang

Thanks for asking.

We have two places for data storage in services:

Authentication service: https://github.com/apache/incubator-teaclave/blob/master/services/authentication/enclave/src/user_db.rs#L96 Storage service: https://github.com/apache/incubator-teaclave/blob/master/services/storage/enclave/src/lib.rs#L80

Current implementations only open DB in memory.

To persist DB into disk, you can use these APIs to encrypt DB into disk:

https://github.com/apache/incubator-teaclave/blob/master/tests/integration/enclave/src/rusty_leveldb_sgx.rs#L103

However, we haven't implemented and provided interfaces to support this in our services right now.

mssun avatar May 29 '20 04:05 mssun

@mssun what extra interfaces should I look forward to? I mean if I replace memory DBs in both authentication service and storage service with level-db, like what is happening in rusty_leveldb_sgx test, is it not enough?

m3ngzhang avatar Jun 09 '20 06:06 m3ngzhang

I think we have already supported persistent data storage through rusty-leveldb-sgx. It can be enabled in storage service. Do I miss anything? @mssun @m4sterchain

henrysun007 avatar Dec 28 '22 03:12 henrysun007

Yes. This issue can be closed.

mssun avatar Dec 28 '22 03:12 mssun