Skip to content

maglietti/ignite3-java-api-primer

Repository files navigation

Apache Ignite 3 Java API Primer

Apache Ignite 3 is a distributed database that combines in-memory storage, distributed SQL processing, and compute capabilities in a single platform. It provides ACID transactions across multiple nodes, automatic data partitioning, and the ability to execute code where data resides, eliminating the complexity of managing separate database, cache, and compute systems.

This primer provides practical guidance for learning Ignite 3's Java API through working code examples and realistic distributed data management patterns. Using a consistent music store dataset, it teaches distributed systems concepts with a progression from basic connections to production-scale implementations.

Prerequisites

  • Java 17+
  • Maven 3.8+
  • Docker 20.10+

Quick Start

  1. Start the 3-node Ignite cluster:

    cd ignite3-reference-apps/00-docker
    ./init-cluster.sh
  2. Load sample music store data:

    cd ../01-sample-data-setup
    mvn compile exec:java
  3. Run any reference application:

    cd ../[app-directory]
    mvn compile exec:java

Learning Path

Documentation Modules

  1. Foundation - Distributed systems concepts and architecture
  2. Schema Design - Data modeling for distributed systems
  3. Data Access APIs - Table API, SQL API, and Key-Value operations
  4. Distributed Operations - Transactions and compute operations
  5. Performance & Scalability - Streaming, caching, and optimization

Reference Applications

Each module includes working code examples in ignite3-reference-apps/:

Key Concepts Covered

  • Distributed Architecture - Multi-node clusters with automatic failover and partition awareness
  • Schema Design - Data colocation strategies for optimal join performance
  • Multiple APIs - Table API for objects, SQL API for analytics, Key-Value API for performance
  • Distributed Transactions - ACID guarantees across multiple nodes
  • Compute Colocation - Execute code where data resides
  • High-Throughput Streaming - Process millions of events per second
  • Caching Patterns - Cache-aside, write-through, and write-behind strategies

Project Structure

ignite3-java-api-primer/
├── docs/                                   # Learning modules and documentation
│   ├── 01-foundation/                      # Distributed systems concepts
│   ├── 02-schema-design/                   # Data modeling patterns
│   ├── 03-data-access-apis/                # API usage and selection
│   ├── 04-distributed-operations/          # Transactions and compute
│   └── 05-performance-scalability/         # Performance optimization
└── ignite3-reference-apps/                 # Working code examples
    ├── 00-docker/                          # 3-node cluster setup
    ├── 01-sample-data-setup/               # Music store dataset
    ├── 02-getting-started-app/             # Basic connections and operations
    ├── 03-schema-annotations-app/          # Schema-as-code patterns
    ├── 04-table-api-app/                   # Object-oriented data access
    ├── 05-sql-api-app/                     # SQL operations and analytics
    ├── 06-transactions-app/                # ACID transaction patterns
    ├── 07-compute-api-app/                 # Distributed job execution
    ├── 08-data-streaming-app/              # High-throughput ingestion
    ├── 09-caching-patterns-app/            # Cache strategies
    ├── 10-file-streaming-app/              # Reactive file processing
    └── 11-performance-optimization-app/    # SQL optimization

Sample Dataset

All examples use a consistent music store dataset with realistic data relationships:

  • Core Entities: Artist → Album → Track hierarchy colocated for optimal joins
  • Business Data: Customer → Invoice → InvoiceLine workflows
  • Reference Data: Genre and MediaType lookup tables
  • 11 Tables Total: ~200 artists, ~500 albums, ~3000 tracks

Data is distributed across two zones:

  • MusicStore (2 replicas): Primary business data
  • MusicStoreReplicated (3 replicas): Reference data

Additional Resources

License

This project is dual-licensed:

Documentation License

The documentation in the docs/ directory is licensed under CC BY-SA 4.0, which allows:

  • Share: Copy and redistribute the material in any medium or format
  • Adapt: Remix, transform, and build upon the material
  • Attribution: You must give appropriate credit and indicate if changes were made
  • ShareAlike: If you remix or transform the material, you must distribute your contributions under the same license

Code License

The code examples in the ignite3-reference-apps/ directory are licensed under Apache License 2.0, which allows:

  • Use: Run the code for any purpose
  • Modify: Make changes to the code
  • Distribute: Share the code with others
  • Private Use: Use the code in private projects
  • Commercial Use: Use the code in commercial projects

For full license terms, see LICENSE, LICENSE-CC-BY-NC-SA-4.0, or the headers in individual files.

About

Apache Ignite 3 Java API primer with working code examples and documentation

Topics

Resources

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •