You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@teaclave.apache.org by GitBox <gi...@apache.org> on 2020/03/10 14:09:14 UTC
[GitHub] [incubator-teaclave] sammyne opened a new issue #236: A little idea
about arranging the project structure
sammyne opened a new issue #236: A little idea about arranging the project structure
URL: https://github.com/apache/incubator-teaclave/issues/236
Currently, compiling the project relies heavily on the cmake, rendering CMakeLists.txt so large. That's not so friendly for starters to play with it.
It would be nice if the the CMakeLists.txt is slimmed down, delegating part of its job to cargo workspaces, which would make the CMakeLists.txt easier to understand.
Therefore comes the proposal of arranging the project structure as follows (only `examples`, `services` folders is of interest)
```text
|-teaclave
|-...
|-examples // A CARGO WORKSPACE
|-CMakeLists.txt // passing env variables to help building examples
|-Cargo.toml // just list the examples of interest, and exclude any dislikes
|-...
|-services
|-apps // A CARGO WORKSPACE, gathering all untrusted applications driven by enclaves
|-CMakeLists.txt // passing env variables to help building apps
|-Cargo.toml // lists all apps
|-access_control // the app part of the access control service
|-authentication // the app part of the authentication service
|-execution // the app part of the execution service
|-frontend // the app part of frontend service
|-management // the app part of the management service
|-scheduler // the app part of the scheduler service
|-storage // the app part of the storage service
|-enclaves // A CARGO WORKSPACE, gathering all trusted enclaves
|-CMakeLists.txt // passing env variables to help building enclaves
|-Cargo.toml // lists all enclaves
|-access_control // the enclave part of the access control service
|-authentication // the enclave part of the authentication service
|-execution // the enclave part of the execution service
|-frontend // the enclave part of frontend service
|-management // the enclave part of the management service
|-scheduler // the enclave part of the scheduler service
|-storage // the enclave part of the storage service
```
Pro:
- Crates serving similar functions are categorized into the same workspace
- It's clear to see the trusted and untrusted parts
- The utility cmake function like `add_cargo_build_target` can be removed
- Some utility scripts such as `setup_cmake_tomls` and `parse_cargo_package.py` can be removed
- The Cargo.*.toml in cmake/tomls designated for the virtual cargo workspaces now go into the actual
place, rather than the ones built indirectly by cmake
- Delegating some jobs from cmake to cargo should make the CMakeLists.txt not so large, which is
good for guys interested to dig into the project
Just some personal ideas ~
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org
[GitHub] [incubator-teaclave] sammyne commented on issue #236: A little idea
about arranging the project structure
Posted by GitBox <gi...@apache.org>.
sammyne commented on issue #236: A little idea about arranging the project structure
URL: https://github.com/apache/incubator-teaclave/issues/236#issuecomment-597405757
Under every relevant folders (services/tests), the **cmake targets** to build enclaves should depend on the ones to build apps, and this dependency is achieved through CMakeLists.txt in the services/tests folders.
So I don't get the following point~
> For the current proposal, I believe the tests apps/enclaves will be compiled separately, resulting compiling same crates twice
Help me out, please 😄
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org
[GitHub] [incubator-teaclave] mssun commented on issue #236: A little idea
about arranging the project structure
Posted by GitBox <gi...@apache.org>.
mssun commented on issue #236: A little idea about arranging the project structure
URL: https://github.com/apache/incubator-teaclave/issues/236#issuecomment-597331077
Thanks, I suggest we can discuss this proposal in several aspects:
- readability
- complexity of the building system (maintenance, adding/deleting new services, etc.)
- compilation time
I also added test in your proposal:
```
|-teaclave
|-...
|-examples // A CARGO WORKSPACE
|-CMakeLists.txt // passing env variables to help building examples
|-Cargo.toml // just list the examples of interest, and exclude any dislikes
|-hello-world // examples
|-...
|-...
|-services
|-apps // A CARGO WORKSPACE, gathering all untrusted applications driven by enclaves
|-CMakeLists.txt // passing env variables to help building apps
|-Cargo.toml // lists all apps
|-access_control // the app part of the access control service
|-authentication // the app part of the authentication service
|-execution // the app part of the execution service
|-frontend // the app part of frontend service
|-management // the app part of the management service
|-scheduler // the app part of the scheduler service
|-storage // the app part of the storage service
|-enclaves // A CARGO WORKSPACE, gathering all trusted enclaves
|-CMakeLists.txt // passing env variables to help building enclaves
|-Cargo.toml // lists all enclaves
|-access_control // the enclave part of the access control service
|-authentication // the enclave part of the authentication service
|-execution // the enclave part of the execution service
|-frontend // the enclave part of frontend service
|-management // the enclave part of the management service
|-scheduler // the enclave part of the scheduler service
|-storage // the enclave part of the storage service
|-proto
|-tests
|-apps
|-CMakeLists.txt
|-Cargo.toml
|-functional
|-integration
|-unit
|-enclaves
|-CMakeLists.txt
|-Cargo.toml
|-functional
|-integration
|-unit
|-fixtures
|-...
```
The only draw back for me is code of same service are separated in two different places. Another important issue we need to take consideration is the compilation performance. We don't want to see any downgrade on the compilation time caused by multiple compilation. For the current proposal, I believe the tests apps/enclaves will be compiled separately, resulting compiling same crates twice.
In terms of our building system with cmake, I'm not sure whether this will make it more simpler. I can imagine that our previous workarounds with symlinks can be removed.
Overall, I'm okay with the new directory organization. However, since this is a major changes of a lot of files, I'd like to suggest to put this change on hold before we finished all service implementations to avoid potential merging conflicts.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org
[GitHub] [incubator-teaclave] sammyne edited a comment on issue #236: A
little idea about arranging the project structure
Posted by GitBox <gi...@apache.org>.
sammyne edited a comment on issue #236: A little idea about arranging the project structure
URL: https://github.com/apache/incubator-teaclave/issues/236#issuecomment-597405757
Under every relevant folders (services/tests), the **cmake targets** to build enclaves should depend on the ones to build apps, and this dependency is achieved through CMakeLists.txt in the services/tests folders.
So I don't get the following point~
> For the current proposal, I believe the tests apps/enclaves will be compiled separately, resulting compiling same crates twice
Help me out, please 😄 @mssun
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org
[GitHub] [incubator-teaclave] mssun commented on issue #236: A little idea
about arranging the project structure
Posted by GitBox <gi...@apache.org>.
mssun commented on issue #236: A little idea about arranging the project structure
URL: https://github.com/apache/incubator-teaclave/issues/236#issuecomment-597452652
I see. Okay, then it seems that the compilation time won't be changed.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org