dal-service-patterns

Community

Standardize DAL patterns for scalable data access

AuthorPremModhaOfficial
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Data Access Layer (DAL) patterns enable entity services to delegate all data operations to a centralized database service, ensuring tenant isolation, consistent QueryStruct messaging, and safe caching strategies.

Core Features & Use Cases

  • NATS request-reply flow for QueryStruct messages between entity services and DAL
  • QueryStruct building in entity services and MsgPack response pass-through
  • L1 freecache checks before calling DAL to reduce latency
  • Batch transaction support for atomic multi-entity writes
  • DAL internal execution pipeline handling SQL compilation and data retrieval
  • Cache invalidation events to keep L1/L2 caches consistent
  • Clear separation: entity services do not execute SQL or import pgx; DAL handles SQL
  • Cross-tenant and per-tenant schema handling with provenance and routing rules

Quick Start

Configure your entity service to package queries as QueryStruct MsgPack and send them to the DAL via NATS.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: dal-service-patterns
Download link: https://github.com/PremModhaOfficial/motadata-ai-pipeline/archive/main.zip#dal-service-patterns

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.