Skip to content

Commit

Permalink
[FABN-973] Improve ChannelEventHub doc for node sdk
Browse files Browse the repository at this point in the history
Clarify usage scenarios for channel-based event service.

Change-Id: I9a44964b46fda6513e618a01616240f3180663e7
Signed-off-by: David Enyeart <enyeart@us.ibm.com>
  • Loading branch information
denyeart committed Oct 16, 2018
1 parent ddf9c61 commit 9f5a2dd
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions docs/tutorials/channel-events.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@

This tutorial illustrates the use of channel-based events. These events are
similar to the existing events, however are specific to a single channel.
The client handling of channel-based events has a few new options when setting
up a listener. Channel-based events are a new feature of the
Hyperledger Fabric Node.js client as of v1.1.
This tutorial illustrates the use of channel-based events.
Channel-based events are a new feature of the Hyperledger Fabric Node.js client
as of v1.1. It replaces the event hub from v1.0, with a more useful
and reliable interface for applications to receive events.

For more information on getting started with Fabric check out
[Building your first network](http://hyperledger-fabric.readthedocs.io/en/latest/build_network.html).
Expand All @@ -22,9 +21,19 @@ transactions or chaincode events. This allows a client application to be
notified of transaction completion or arbitrary chaincode events without having
to perform multiple queries or search through the blocks as they are received.

The service allows any user to receive "filtered" block events (which contain no
sensitive information, in other words). Receiving "unfiltered" block events
requires read access to the channel. The default behavior is to connect to
Applications may use block or chaincode events to provide channel data to
other applications. For example an application could listen for block events
and write transaction data to a data store for the purpose of performing
queries or other analytics against the channel's data.
For each block received, the block listener application could iterate through
the block transactions, and build a data store using the key/value writes from
each valid transaction's 'rwset' (see the {@link Block} and {@link Transaction}
Type Definitions for details of these data structures).

The event service also allows applications to receive "filtered" block events
(which allow for receiving transaction validation status without providing
other sensitive information). Access to "filtered" and "unfiltered" events
can be configured independently in Fabric. The default behavior is to connect to
receive filtered block events. To connect to receive unfiltered block events
call `connect(true)` (see below).

Expand Down

0 comments on commit 9f5a2dd

Please sign in to comment.