Inspiration
I work in the world of confidential computing where we use hardware enabled trusted execution environments to provide secure compute even from the operating system of the computer. This is the best fully Turing complete secure compute solution out there leveraging Intel SGX/TDX, AMD SEV-SNP and Arm TrustZone. I also come from the world of banking and ultra low latency development. My personal interests have been in RPC the means to instantiate objects remotely and call their functions as if they are local to the caller, Microsoft COM and CORBA were the best examples of that. I also have a fascination in C++ coroutines due to their highly efficient use of IO and CPU resources.
What it does
It is a simple app that tries to take a video stream from a browser, pass it to a websocket gateway and onto an image recognition engine, which then passes telemetry to a llm. The llm tries to then guess based on looking up the internet to guess if it is a book film or play.
Canopy is the combination of all these ideas into a universal low latency RPC that is serialisation and transport agnostic able to support SOAP, REST, WebSockets, JSON RPC that works with both blocking IO calls and asynchronously using Coroutines. It is also the backbone for other languages that need to communicate efficiency over distributed compute with partially completed implementations for Node.js family of languages and Rust.
Canopy also works with Intel SGX whereby you can have a secure attested RPC over numerous untrusted links between 2 or more nodes. This guarantees that a client knows that it is interacting with some code living in a secure enclave and not in an emulated environment.
It is heavily meta data driven so for instance I can convert OpenAPI swagger files to and from Canopy IDL providing direct C++ (and other languages) bindings to use, serve or interpose REST services. It can also translate REST or gRPC service into an MCP endpoint for instance, and run it very efficiently.
In most C++ code 70% is code talking to other code, depending on the language and use case this ratio may vary, Canopy is there to try and reduce this ratio by producing a canonical implementation that democratises a lot of this complex work.
C++ is often attacked for not being memory safe, with 80% of bugs being safety bugs, first I think that AI will allow people to write memory safe code in any language, secondly of that 80% I believe most bugs are due to data parsing and memory arithmetic around it. If you use code generators and off the shelf serialisers 80% of that 80% problem will go away, and Canopy is here to help.
How we built it
Codex worked with Canopy to build an app in C++ using CMake and javascript
Challenges we ran into
Ran out of time, having difficulty to my main server for heavy processing.
Accomplishments that we're proud of
Getting something to work at all
What we learned
Better preparation helps
What's next for Computer Charades
I would like to implement WebRTC soon and use OpenCV perhaps
Built With
- c++
- coroutines
- grpc
- javascript
- json
- lowlatency
- mcp
- rest
- rpc
- websockets
Log in or sign up for Devpost to join the conversation.