Uploaded image for project: 'Fabric'
  1. Fabric
  2. FAB-2998

External database and data services in Fabric discussion



    • Story
    • Status: Closed
    • Medium
    • Resolution: Won't Do
    • None
    • None
    • None
    • Unset
    • Unset
    • Unset


      Related FAB-60

      Currently Fabric has a pluggable database used to cache the state of the ledger to provide quick queries. The built-in database is LevelDB, which provides limited queries based on keys. The framework enables plugging in a database by implementing some interfaces. An example provided is CouchDB, a JSON database that allows much richer queries using CouchDB native query language. However there are issues with this approach that we should discuss and find resolutions for.

      1. Once a chaincode uses native query language, wherever the chaincode runs, the supporting database must be present. It could force the entire network to install and support the database.
      2. The result of the query is not guaranteed to be stable between endorsement and validation/commit time, potentially causing phantom reads (e.g. item inserted by another tran that should have been considered in current tran).
      3. The database (like CouchDB) runs in a separate process from the Peer, so additional security considerations must be observed to satisfy the security policies configured on the blockchain network.

      So the question is should we define a common abstraction layer (like JDBC) to allow portable OLTP in chaincodes, pick an existing ORM/DAL, or stay with what we have which is DB vendor specific?


        Issue Links



              Unassigned Unassigned
              binhn Binh Nguyen
              0 Vote for this issue
              6 Start watching this issue