Network Topology Engine

Stable

← Back to Network Automation


Concept

Graph operations on network topologies demand native performance — Python’s NetworkX caps out on large topologies. The Network Topology Engine provides a Rust-native topology engine with Python bindings, giving the Network Modeling & Configuration Library the speed of compiled code with the ergonomics of Python.

Quick Facts

   
Status Stable
Language Rust (with PyO3 Python bindings)
Started 2026

What This Is

The Network Topology Engine is the Rust backend that powers the Network Modeling & Configuration Library’s graph operations. Originally embedded within the Network Modeling & Configuration Library as ank_nte, it has been extracted into its own repository as the engine matured and its scope grew beyond a simple backing store.

It provides native-speed graph algorithms, query execution, and data storage for network topology operations. It uses petgraph’s StableDiGraph for topology representation and Polars for columnar data storage.

Why It Was Split Out

As the Network Modeling & Configuration Library evolved, the Rust core grew into a substantial system with its own architectural concerns:

Separating the Network Topology Engine enables independent versioning, faster CI, and clearer ownership boundaries.

Architecture

The Network Topology Engine is organized as a Cargo workspace with specialized crates:

Crate Purpose
nte-core Graph topology primitives, node/edge types
nte-query Query engine for composable topology queries
nte-domain Network domain models (protocols, devices)
nte-backend Backend abstraction layer
nte-datastore-polars Polars-backed columnar storage
nte-datastore-duckdb DuckDB storage backend
nte-datastore-lite Lightweight in-memory backend
nte-server Distributed computation support
nte-monte-carlo Monte Carlo simulation engine

Query Engine (nte-query)

The nte-query crate provides a composable query API that executes against the topology graph. Queries are built as chains of filter, select, and aggregate operations that compile down to efficient graph traversals:

Queries execute in Rust and return results to Python via PyO3, avoiding the overhead of Python-side graph traversal.

Storage Backends

The Network Topology Engine supports pluggable storage through the nte-datastore-* crates:

Integration with the Network Modeling & Configuration Library

The Network Modeling & Configuration Library imports the Network Topology Engine as a Python package built with Maturin/PyO3. All graph mutations and queries flow through the engine’s Rust core:

Network Modeling & Configuration Library (Python API)
    
    
NTE Python bindings (PyO3)
    
    
nte-query  nte-core  nte-datastore-*

Python users interact with the Network Modeling & Configuration Library’s Pydantic models. The Network Topology Engine handles the performance-critical work underneath.

Tech Stack

Rust, petgraph (StableDiGraph), Polars, DuckDB, PyO3/Maturin for Python bindings


← Back to Network Automation