From f34235924b3ee03e9bdc63bb0fdce51fcabae7d0 Mon Sep 17 00:00:00 2001 From: Christian Sailer Date: Tue, 21 Jan 2020 13:03:09 +0000 Subject: [PATCH 1/2] Update CorDapp overview for Open Core changes. --- docs/source/cordapp-overview.rst | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/source/cordapp-overview.rst b/docs/source/cordapp-overview.rst index 4829eebd57..9a4f32966b 100644 --- a/docs/source/cordapp-overview.rst +++ b/docs/source/cordapp-overview.rst @@ -49,7 +49,8 @@ updates related to issuance, sale, purchase and exit of bonds. Writing and building apps that run on both Corda (open source) and Corda Enterprise ----------------------------------------------------------------------------------- -Corda and Corda Enterprise are compatible and interoperable, which means you can write a CorDapp that can run on both. +Corda and Corda Enterprise are moving towards an Open Core approach, which means in practice that the APIs and dependencies for CorDapps +should all be open source, and all CorDapps need to be compiled against the Open Source Corda core library. To make this work in practice you should follow these steps: 1. Ensure your CorDapp is designed per :doc:`Structuring a CorDapp ` and annotated according to :ref:`CorDapp separation `. @@ -61,12 +62,8 @@ To make this work in practice you should follow these steps: .. note:: It is also important to understand how to manage any dependencies a CorDapp may have on 3rd party libraries and other CorDapps. Please read :ref:`Setting your dependencies ` to understand the options and recommendations with regards to correctly Jar'ing CorDapp dependencies. -2. Compile this **CorDapp kernel** Jar once, and then depend on it from your workflows Jar (or Jars - see below). Importantly, if - you want your app to work on both Corda and Corda Enterprise, you must compile this Jar against Corda, not Corda Enterprise. - This is because, in future, we may add additional functionality to Corda Enterprise that is not in Corda and you may inadvertently create a - CorDapp kernel that does not work on Corda open source. Compiling against Corda open source as a matter of course prevents this risk, as well - as preventing the risk that you inadvertently create two different versions of the Jar, which will have different hashes and hence break compatibility - and interoperability. +2. Compile this **CorDapp kernel** Jar once, and then depend on it from your workflows Jar. In terms of Corda depdendencies,this should only + depend on the ``corda-core`` package from the Corda Open Source distribution. .. note:: As of Corda 4 it is recommended to use :ref:`CorDapp Jar signing ` to leverage the new signature constraints functionality. @@ -75,5 +72,9 @@ To make this work in practice you should follow these steps: to your CorDapp for when it is run on Corda Enterprise (perhaps it uses advanced features of one of the supported enterprise databases or includes advanced database migration scripts, or some other Enterprise-only feature). + When building a CorDapp against Corda Enterprise, please note that the ``corda-core`` library still needs to come from the open source + distribution, so you will have dependencies on Corda Enterprise and a matching open core distribution. Specifically, any CorDapp targeted + to run on Corda Enterprise should have unit and integration tests using Corda Enterprise. + In summary, structure your app as kernel (contracts, states, dependencies) and workflow (the rest) and be sure to compile the kernel against Corda open source. You can compile your workflow (Jars) against the distribution of Corda that they target. From de2a868d6eb42ed9453feba01011777fb72f0347 Mon Sep 17 00:00:00 2001 From: Christian Sailer Date: Thu, 23 Jan 2020 14:08:47 +0000 Subject: [PATCH 2/2] Slight rewording to underline the change for the better. --- docs/source/cordapp-overview.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/source/cordapp-overview.rst b/docs/source/cordapp-overview.rst index 9a4f32966b..2d7e52f7fe 100644 --- a/docs/source/cordapp-overview.rst +++ b/docs/source/cordapp-overview.rst @@ -50,7 +50,8 @@ updates related to issuance, sale, purchase and exit of bonds. Writing and building apps that run on both Corda (open source) and Corda Enterprise ----------------------------------------------------------------------------------- Corda and Corda Enterprise are moving towards an Open Core approach, which means in practice that the APIs and dependencies for CorDapps -should all be open source, and all CorDapps need to be compiled against the Open Source Corda core library. +should all be open source, and all CorDapps (whether targeting Corda open source or Corda Enterprise) can now be compiled against the Open +Source Corda core library, as Corda Enterprise itself is compiled against the Open Source core library. To make this work in practice you should follow these steps: 1. Ensure your CorDapp is designed per :doc:`Structuring a CorDapp ` and annotated according to :ref:`CorDapp separation `.