Separation of app logic and framework code #4062
eddyashton
started this conversation in
Design
Replies: 2 comments 2 replies
-
Tasks
|
Beta Was this translation helpful? Give feedback.
1 reply
-
I've been experimenting with gRPC APIs in this repo, initially in Python. The code there's extremely sketchy, but should be a testing ground for a PoC protobuf service definition. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Each CCF node currently executes a single binary containing both framework systems and application code. This means an update to either component requires a rebuild of this binary, the application code has a limited API and dependency list, and the application code must be written in C++ (or a scripting language via an embeddable interpreter).
We want to remove this coupling in future to support independent versioning and updates, broad support for alternative languages and dependencies, and separate scaling of application capacity.
The plan is to do this by separating each CCF node into multiple binaries, each deployed and managed as a separate container: a CCF-Core container written and maintained by the framework, communicating over a well-defined interface with Business Logic containers written in any other language. We will use gRPC for this inter-container communication interface, so that the Business-Logic containers can easily be written in any language with gRPC support.
Business-Logic containers will need to attest to their own identity, and CCF governance will determine the set of acceptable identities - those containers will then have full access to the confidential ledger contents, in the same way that application code does today.
A Business-Logic container will register to handle some set of
(HTTP-method, HTTP-url)
pairs (as endpoint handlers currently do), will receive requests parsed by a CCF-Core node over a gRPC interface, will execute their business logic using a gRPC KV API to read and write ledger entries, and produce some HTTP response to be returned when the transaction is to be applied. Beyond that, the containers may do any additional indexing or book-keeping they wish inside or outside that container (while considering confidentiality of everything they process). They may execute long-lived async requests to resolve user queries, or utilise external hardware for expensive computations.This discussion is intended to be a central collection of the various decisions, designs, and tasks to achieve this.
Beta Was this translation helpful? Give feedback.
All reactions