mirror of
https://github.com/corda/corda.git
synced 2025-05-01 08:20:15 +00:00
Convert proposed structure into a doc source file and include in index
This commit is contained in:
parent
ff2824780c
commit
e672344639
@ -48,4 +48,5 @@ Read on to learn:
|
|||||||
visualiser
|
visualiser
|
||||||
codestyle
|
codestyle
|
||||||
building-the-docs
|
building-the-docs
|
||||||
|
project-structure-proposal
|
||||||
|
|
||||||
|
@ -1,36 +1,58 @@
|
|||||||
Proposed module structure
|
Proposed module structure
|
||||||
|
=========================
|
||||||
|
|
||||||
:r3prototyping - gradle top level module. No actual code, just resources for this project to make distributable artefacts, plus drives build of code modules.
|
``:r3prototyping`` - gradle top level module. No actual code, just resources for this project to make distributable artefacts, plus drives build of code modules.
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
folders/namespaces under src/main/kotlin and src/test/kotlin
|
||||||
|--docs - docs for developers
|
|--docs - docs for developers
|
||||||
|--scripts - scripts to start\stop nodes, run demos, etc
|
|--scripts - scripts to start/stop nodes, run demos, etc
|
||||||
|--tools - utilities such as tools to create keys, etc
|
|--tools - utilities such as tools to create keys, etc
|
||||||
|--libs - external libs not available on maven, or signed specific versions
|
|--libs - external libs not available on maven, or signed specific versions
|
||||||
|--contracts - fully signed and versioned contract jars for approved contracts that other contracts might reference.
|
|--contracts - fully signed and versioned contract jars for approved contracts that other contracts might reference.
|
||||||
|
|
||||||
:core - gradle module for language helpers, pure algorithms, etc
|
``:utilities`` - gradle module for language helpers, pure algorithms, etc
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
folders/namespaces under src/main/kotlin and src/test/kotlin
|
||||||
|--crypto - helpers for crypto
|
|--crypto - helpers for crypto
|
||||||
|--math - helpers for calculations e.g. financial rounding
|
|--math - helpers for calculations e.g. financial rounding
|
||||||
|--utilities - stuff
|
|--utilities - stuff
|
||||||
|
|
||||||
:client-api - gradle module for a jar that can be embedded inside JVM compatible clients. Depends only on :core
|
``:client-api`` - gradle module for a jar that can be embedded inside JVM compatible clients. Depends only on :core
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
folders/namespaces under src/main/kotlin and src/test/kotlin
|
||||||
|--api - standard rpc services exposed on a node for supporting bank side interactions and node management
|
|--api - standard rpc services exposed on a node for supporting bank side interactions and node management
|
||||||
|--transport - support for concrete transport layers
|
|--transport - support for concrete transport layers
|
||||||
| |--jaxrs - e.g. annotated api interface for rest-json
|
| |--jaxrs - e.g. annotated api interface for rest-json
|
||||||
| |--mq - e.g. wrapper for using messaging to communicate to the node
|
| |--mq - e.g. wrapper for using messaging to communicate to the node
|
||||||
|--serialization - abstraction\helpers for client side serialisation via JSON (e.g. pre-configured jackson mapper), Kryo, etc (doesn't have to line up with node to node communication formats)
|
|--serialization - abstraction/helpers for client side serialisation via JSON (e.g. pre-configured jackson mapper), Kryo, etc (doesn't have to line up with node to node communication formats)
|
||||||
|
|
||||||
:contract-api - Gradle module to make minimum jar library required to write a contract jar, but should not contain business logic. Depends only on :core
|
``:contract-api`` - Gradle module to make minimum jar library required to write a contract jar, but should not contain business logic. Depends only on :core
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
folders/namespaces under src/main/kotlin and src/test/kotlin
|
||||||
|--financetypes - basic finance types and helpers
|
|--financetypes - basic finance types and helpers
|
||||||
|--protocol
|
|--protocol
|
||||||
| |--api - node services available internally only to contracts.
|
| |--api - node services available internally only to contracts.
|
||||||
| |--core - protocol support and implementation functions e.g. our TwoPartyDealProtocol
|
| |--core - protocol support and implementation functions e.g. our TwoPartyDealProtocol
|
||||||
|--contract - base\abstract types for smart contracts e.g ContractState, Transaction, Command
|
|--contract - base/abstract types for smart contracts e.g ContractState, Transaction, Command
|
||||||
|--extensionsapi - marker interfaces\annotations for contracts to extend a node's public network interface and allow clients to interact with a contract e.g. register a servlet
|
|--extensionsapi - marker interfaces/annotations for contracts to extend a node's public network interface and allow clients to interact with a contract e.g. register a servlet
|
||||||
|--utilities - helpers\builders without any business logic
|
|--utilities - helpers/builders without any business logic
|
||||||
|--test - hooks to allow testability of contracts
|
|--test - hooks to allow testability of contracts
|
||||||
|--serialization - helpers for state object storage and transport by nodes
|
|--serialization - helpers for state object storage and transport by nodes
|
||||||
|
|
||||||
:contract-core - Gradle module for important financial concepts modelled as smart contracts. R3 mjaintained reference implementations. Depends upon :core and :contract-api.
|
``:base-contract`` - Gradle module for important financial concepts modelled as smart contracts. R3 mjaintained reference implementations. Depends upon :core and :contract-api.
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
|
||||||
|
folders/namespaces under src/main/kotlin and src/test/kotlin
|
||||||
|--validators - helpers for standard business validations e.g. must be positive, net cash must be equal, etc
|
|--validators - helpers for standard business validations e.g. must be positive, net cash must be equal, etc
|
||||||
|--utilities - some common code for business day calculations and holiday oracle
|
|--utilities - some common code for business day calculations and holiday oracle
|
||||||
|--cash
|
|--cash
|
||||||
@ -46,7 +68,11 @@ Proposed module structure
|
|||||||
| |--contract
|
| |--contract
|
||||||
| |--protocol
|
| |--protocol
|
||||||
|
|
||||||
:contract-demos - Gradle module for external developers to play with and modify. Depends upon :core, :contract-api and :contract-core for complicated contracts
|
``:demos`` - Gradle module for external developers to play with and modify. Depends upon :core, :contract-api and :contract-core for complicated contracts
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
folders/namespaces under src/main/kotlin and src/test/kotlin
|
||||||
|--minimum - hello world of smart contracts
|
|--minimum - hello world of smart contracts
|
||||||
| |--states
|
| |--states
|
||||||
| |--contract
|
| |--contract
|
||||||
@ -59,10 +85,14 @@ Proposed module structure
|
|||||||
| |--minimum
|
| |--minimum
|
||||||
| |--demo1
|
| |--demo1
|
||||||
|
|
||||||
:node - Gradle module for the actual runtime implementation of node. Must NOT depend upon :contract-core, or :contract-demos, otherwise references :core, :client-api and :contract-api
|
``:node`` - Gradle module for the actual runtime implementation of node. Must NOT depend upon :contract-core, or :contract-demos, otherwise references :core, :client-api and :contract-api
|
||||||
|--bootstrap - start\stop sequence, config loading, dependency injection, loading service plugins,etc
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
folders/namespaces under src/main/kotlin and src/test/kotlin
|
||||||
|
|--bootstrap - start/stop sequence, config loading, dependency injection, loading service plugins,etc
|
||||||
|--clientapi - implementation of the common public API entry point via JAX-RS, MQ, etc, perhaps does some security checking and then passes to actual services
|
|--clientapi - implementation of the common public API entry point via JAX-RS, MQ, etc, perhaps does some security checking and then passes to actual services
|
||||||
|--recovery - code to carry out checking on startup and possibly recovery\undo\redo of the transactions
|
|--recovery - code to carry out checking on startup and possibly recovery/undo/redo of the transactions
|
||||||
|--services - services listed below are only suggestions!!
|
|--services - services listed below are only suggestions!!
|
||||||
| |--api - internal non-serialised service interfaces and data types. Used for decoupling
|
| |--api - internal non-serialised service interfaces and data types. Used for decoupling
|
||||||
| |--messaging
|
| |--messaging
|
Loading…
x
Reference in New Issue
Block a user