Core Concepts
Actionbase is a database for serving user interactions—not a general-purpose graph database.
Design Goals
Section titled “Design Goals”- Write-Time Optimization — Pre-compute read structures at write time. Reads become simple lookups.
- Leverage Proven Storage — Build on HBase for durability and scale. Don’t reinvent storage.
User Interactions
Section titled “User Interactions”Actionbase handles:
- Recent views (products, content)
- Likes and reactions
- Follows
These share common characteristics: who did what to which target, real-time access, predictable query patterns.
Property Graph Model
Section titled “Property Graph Model”Actionbase models interactions as edges:
- Source: who (e.g., user_id)
- Target: what (e.g., product_id, content_id, user_id)
- Properties: schema-defined attributes (e.g.,
created_at,reaction_type)
User --[likes]--> Product (edge) ├─ source: "user123" ├─ target: "product456" └─ properties: { created_at: 1234567890, reaction_type: "heart" }
User --[follows]--> User (edge) ├─ source: "user123" ├─ target: "user789" └─ properties: { created_at: 1234567891 }See Schema for defining your edges.
State and Event Model
Section titled “State and Event Model”Actionbase uses a state-based mutation model:
- State: current state (e.g., “user liked product”)
- Event: input that transitions state (e.g., “user clicked like”)
When an interaction occurs:
- Read current state
- Apply state transition
- Store new state
Clients attach timestamps to events. Even if events arrive out of order, Actionbase computes the correct final state.
See Mutation for details.
Write-Time Optimization
Section titled “Write-Time Optimization”When an edge is written, Actionbase pre-computes:
- State — current relationship between source and target
- Index — ordered structures based on properties (e.g.,
created_at DESC) - Count — counters (e.g., number of likes per item)
Reads use simple GET, COUNT, SCAN operations without query-time computation.
See Mutation for how these are created. See Query for how to access them.
Data Flow
Section titled “Data Flow”Write Path
Section titled “Write Path”Client → Server → Engine → WAL → Storage → CDC- Write to WAL for durability
- Acquire lock
- Read current state
- Apply state transition
- Compute indexes and counters
- Write to storage
- Emit CDC for downstream systems
See Mutation.
Read Path
Section titled “Read Path”Client → Server → Engine → Storage → Response- COUNT → EdgeCounter
- GET → EdgeState
- SCAN → EdgeIndex
See Query.