From 14e85cedd21c6e2f487e70b424313447fe04f50d Mon Sep 17 00:00:00 2001 From: NIKHIL E GUPTA Date: Mon, 12 Aug 2019 11:53:26 -0400 Subject: [PATCH] [FAB-16274] - Add link to off_chain_data sample Change-Id: I77fe329bd4467180af5ee35bd2997a24c5fd30e2 Signed-off-by: NIKHIL E GUPTA --- docs/source/couchdb_tutorial.rst | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/source/couchdb_tutorial.rst b/docs/source/couchdb_tutorial.rst index ad493582657..0e13083901b 100644 --- a/docs/source/couchdb_tutorial.rst +++ b/docs/source/couchdb_tutorial.rst @@ -516,7 +516,7 @@ of data or blocks on your network. It is also important to plan the indexes you install with your chaincode. You should install only a few indexes per chaincode that support most of your queries. Adding too many indexes, or using an excessive number of fields in an index, will -degrade the performance of your network. This is because the indexes are updated +degrade the performance of your network. This is because the indexes are updated after each block is committed. The more indexes need to be updated through "index warming", the longer it will take for transactions to complete. @@ -605,7 +605,7 @@ ledger, this query will take a long time to respond or may timeout. While it is important to follow best practices with your queries, using indexes is not a solution for collecting large amounts of data. The blockchain data -structure is optimized to validate and confirm transactions, and is not suited +structure is optimized to validate and confirm transactions and is not suited for data analytics or reporting. If you want to build a dashboard as part of your application or analyze the data from your network, the best practice is to query an off chain database that replicates the data from your peers. This @@ -616,8 +616,10 @@ You can use block or chaincode events from your application to write transaction data to an off-chain database or analytics engine. For each block received, the block listener application would iterate through the block transactions and build a data store using the key/value writes from each valid transaction's ``rwset``. The -:doc:`peer_event_services` provide replayable events to ensure the integrity of -downstream data stores. +:doc:`peer_event_services` provide replayable events to ensure the integrity of +downstream data stores. For an example of how you can use an event listener to write +data to an external database, visit the `Off chain data sample `__ +in the Fabric Samples. .. _cdb-pagination: @@ -633,7 +635,7 @@ chaincode that executes the query until no more results are returned. For more i this `topic on pagination with CouchDB `__. -We will use the `Marbles sample `__ +We will use the `Marbles sample `__ function ``queryMarblesWithPagination`` to demonstrate how pagination can be implemented in chaincode and the client application.