How unipop-graph/unipop works
Main Components
• Core Engine (Unipop Core): This module (located in the “unipop-core” directory) is where most of the business logic resides. It handles query processing (traversal steps, predicate processing, grouping, ordering, etc.), schema definitions, and execution strategies.
• Data Source Connectors/Providers: There are separate modules for different data sources:
– Unipop-elastic: Provides an implementation for integrating with ElasticSearch. It includes configuration resources and supports document- and nested-schema based graph elements.
– Unipop-jdbc: Handles JDBC-based integrations, providing schemas, controllers, and utilities for connecting to relational databases.
– Unipop-rest: Offers a RESTful interface with server-side endpoints (and related configurations and templates) for exposing the engine via HTTP APIs.
• Configuration and Resource Files: The multiple “resources/configuration” directories across modules indicate that the system is highly configurable to map data source schemas to a “property graph” model.
• Testing Modules: The “unipop-test” module contains integration and unit tests that exercise the engine and its connectors.
Relationships and Interactions
• Client Applications (Console, Embedded, Server): These consumers of Unipop, as outlined in the README (via “Getting Started”), initiate graph queries. They send requests to the engine over diverse interfaces (such as REST endpoints provided by unipop-rest).
• Core Query Processing: The engine receives a query which is processed in multiple layers (query parsing, traversal assembly, predicate translation, and execution strategies).
• Integration via Connectors: Once a query is processed, the core engine delegates data fetching/manipulation operations to the underlying source provider (Elastic, JDBC, or REST), each of which retrieves data from its respective data store.
• Configuration and Schema Mapping: Config files present in several modules inform how external data is mapped into the internal graph model (e.g., Vertex/Edge schema definitions are provided in unipop-core and supported by similar concepts in connector modules).
Architectural Patterns and Technologies
• Modular Design: The project is structured as a multi-module Maven project. Each module (core, elastic, jdbc, rest, test) encapsulates distinct responsibilities.
• Plugin/Extension Model: Through the usage of configuration files (like META-INF/services) and clearly separated “SourceProvider” classes, the system appears designed for extensibility – allowing additional data sources to be integrated easily.
• Layered Architecture: You have a separation between the presentation interfaces (REST, Console, Embedded) and the internal graph processing logic which then interfaces with external data services.
• Use of Apache Tinkerpop: Unipop leverages Apache Tinkerpop’s Gremlin framework to enable graph traversal and query language features.