How tsuna/gohbase works
Main Components Identification
a) Client Interface Layer:
• High-level API methods (Get, Put, Scan) that users interact with
b) HRPC (HBase Remote Procedure Call) Layer:
• Hrpc package which contains all RPC definitions
• Different types of operations (get.go, put.go, scan.go, etc.)
c) Region Management Layer:
• Region package handling region client operations
• Region discovery and management components
d) Protocol Buffer Layer:
• Pb directory containing all protobuf definitions
• Communication protocol with HBase
e) ZooKeeper Integration:
• Zk package that handles cluster discovery and configuration
Component Relationships
[Client Application] → [GoHBase Client Interface]
• ↓
[HRPC Layer] ← → [Region Management] ← → [Protocol Buffers]
• ↓
[ZooKeeper Client] ← → [HBase Cluster]
Specific Elements
• Rectangles: Main client interface
• Hexagons: HRPC operations
• Parallelograms: Protocol buffer interfaces
b) Support Components:
• Compression handling (compression package)
• Filtering mechanisms (filter package)
• Caching layer (caches.go)
Data Flow Representation
• Client request flow: Application → Client Interface → HRPC → Region Management → HBase
• Response flow: HBase → Protocol Buffers → Region Management → Client Interface → Application
• Metadata flow: ZooKeeper ← → Region Management
Important Details to Highlight
• Green: Read operations (Get, Scan)
• Blue: Write operations (Put, Delete)
• Yellow: Admin operations
• Gray: Support functions
• Annotations for:
• Compression options
• Filter capabilities
• Error handling paths
• Retry mechanisms
Technical Specifications
Technical notes for:
• Protocol Buffer message types
• Supported HBase versions (≥ 1.0)
• Go module dependencies
• Compression codecs supported