|
| 1 | +# Project Map & Architecture |
| 2 | +This is a java+maven project. |
| 3 | + |
| 4 | +## /src |
| 5 | +The core application logic. |
| 6 | +* `/src/main/java/couchbase`: Couchbase SDK wrappers, N1QL query templates, load generation, REST API, and transaction support. [Owner: BaseCoder] |
| 7 | + - `sdk/`: Core SDK integration and query execution |
| 8 | + - `transactions/`: Transaction management utilities |
| 9 | + - `loadgen/`: Document load generation templates |
| 10 | + - `rest/`: REST API endpoints |
| 11 | +* `/src/main/java/mongo`: MongoDB SDK integration and load generation utilities. [Owner: MongoCoder] |
| 12 | + - `sdk/`: Core MongoDB client integration |
| 13 | + - `loadgen/`: Document load generation templates |
| 14 | +* `/src/main/java/elasticsearch`: Elasticsearch client integration (EsClient.java) |
| 15 | +* `/src/main/java/RestServer`: REST server infrastructure (RestApplication.java, TaskRequest.java) |
| 16 | + - `RestApplication.java`: Spring Boot application entry point with REST endpoint handlers (RestHandlers class) that delegate to TaskRequest for Couchbase, MongoDB, and SIFT document loading operations |
| 17 | + - `TaskRequest.java`: Business logic and implementation methods for REST endpoints including task management, document loading (Couchbase/MongoDB/SIFT), client creation, and task lifecycle operations |
| 18 | +* `/src/main/java/utils`: Shared utilities and helper classes |
| 19 | + - `common/`: Common utility functions |
| 20 | + - `FileDownload.java`: Handles file downloads from URLs, decompression (GZIP), and file operations for SIFT datasets |
| 21 | + - `docgen/`: Document generation logic and workload management. Used by all document loaders (Like Couchbase, Mongo, Elastic, etc within this project) |
| 22 | + - `DocumentGenerator.java`: Abstract base class for key-value document generation with vbucket targeting, sub-document operations, and workload settings |
| 23 | + - `WorkLoadSettings.java`: Configuration class for workload parameters (key size, doc size, operations distribution) |
| 24 | + - `DocRange.java`: Manages document range specifications and indexing |
| 25 | + - `DocType.java`: Document type definitions and enumeration |
| 26 | + - `DRConstants.java`: Constants for document range operations |
| 27 | + - `WorkLoadBase.java`: Base workload configuration |
| 28 | + - `anySize.java`: Handles arbitrary size specifications |
| 29 | + - `mongo/`: MongoDB-specific document generation utilities |
| 30 | + - `key/`: Key generation strategies and utilities |
| 31 | + - `RandomKey.java`: Generates random alphanumeric keys based on workload settings |
| 32 | + - `SimpleKey.java`: Basic key generation with vbucket distribution |
| 33 | + - `CircularKey.java`: Circular key distribution for load testing |
| 34 | + - `ReverseKey.java`: Reverse order key generation |
| 35 | + - `HotKey.java`, `ColdKey.java`: Temperature-based key generation for cache testing |
| 36 | + - `RandomSizeKey.java`: Keys with random size variations |
| 37 | + - `taskmanager/`: Task orchestration and management |
| 38 | + - `TaskManager.java`: Manages thread pool execution, task submission, cancellation, and result tracking for concurrent operations |
| 39 | + - `Task.java`: Task definition with result tracking and abort capabilities |
| 40 | + - `val/`: Value templates and validation schemas |
| 41 | + - `Cars.java`, `MiniCars.java`: Automotive document templates |
| 42 | + - `Hotel.java`, `HeterogeneousHotel.java`: Hospitality document templates with nested structures |
| 43 | + - `Product.java`: E-commerce product document template |
| 44 | + - `Vector.java`: Large vector data generation (81KB) |
| 45 | + - `SimpleValue.java`, `anySizeValue.java`: Basic value generators |
| 46 | + - `SimpleSubDocValue.java`: Sub-document value templates |
| 47 | + - `RandomlyNestedJson.java`: Random nested JSON structure generator |
| 48 | + - `NimbusM.java`, `NimbusP.java`: Nimbus-specific document types |
| 49 | + - `siftBigANN.java`: SIFT BigANN dataset document representation |
| 50 | + - `ESSiftIndex.json`: Elasticsearch SIFT index configuration |
| 51 | + - `Dictionary.java`: Dictionary-based value generation |
| 52 | +* `/src/main/java/Loader.java`: Main Couchbase document loader entry point |
| 53 | +* `/src/main/java/MongoLoader.java`: MongoDB document loader entry point |
| 54 | +* `/src/main/java/SIFTLoader.java`: SIFT-based document loader |
| 55 | +* `/src/main/resources`: Runtime configuration files |
| 56 | + - `log4j.properties`: Log4j logging configuration |
| 57 | + |
| 58 | +## /.agents |
| 59 | +The operational brain of the AI workforce. |
| 60 | +* `index.md`: The Agent Registry. |
| 61 | +* PROJECT_MAP.md: This file. |
| 62 | +* `profiles/`: Deep-dive instructions for each agent. |
| 63 | + |
| 64 | +## /pom.xml |
| 65 | +Maven project configuration with dependencies and build rules. |
| 66 | +- **Project Info**: Java 8 Maven project (com.couchbase.capella:capella:0.0.1-SNAPSHOT) |
| 67 | +- **Key Dependencies**: |
| 68 | + - Couchbase SDK (java-client 3.4.10) |
| 69 | + - MongoDB Java Driver (3.12.14) |
| 70 | + - Elasticsearch Java Client (8.11.3) |
| 71 | + - Spring Boot Web Starter (2.6.4) for REST server |
| 72 | + - DJL (Deep Java Library) with PyTorch models and HuggingFace tokenizers (0.25.0) |
| 73 | + - AWS Java SDK Core (1.8.10.2) |
| 74 | + - Apache Commons libraries (codec, lang3, io, cli) |
| 75 | + - Jackson JSON binding (2.12.3), JAXB API (2.3.1) |
| 76 | + - JavaFaker (1.0.2) for test data generation |
| 77 | + - SLF4J with Log4j12 (1.7.30) for logging |
| 78 | +- **Build Configuration**: |
| 79 | + - Compiles to Java 8 target |
| 80 | + - Builds standalone JAR with dependencies copied to `magmadocloader/lib/` |
| 81 | + - Main class: Loader |
| 82 | + - Final artifact: `magmadocloader/magmadocloader.jar` |
| 83 | + |
| 84 | +## /target |
| 85 | +Dir consists of compiled java class and jar files. Usually nothing to look into this unless something related to output files missing issues |
0 commit comments