APPNETOS is under active development This website and its documentation are being prepared for public launch. Content and features may change.
Select Theme
Loading

Data & Persistence

Annotation-driven documents and collections, MongoDB persistence, and optional Redis caching.

Less querying. More building.

Traditional data access often revolves around writing and repeating queries. APPNETOS takes a different approach: concrete Document and Collection classes are connected through PHP annotations. Collections manage document loading, reuse, and persistence, while the framework handles the underlying database operations.

The result is a nearly queryless development experience. Developers work with typed document objects and collection APIs instead of manually assembling MongoDB requests for routine operations. Advanced filters and native database operations remain available when needed.

Annotation-driven

Declare the relationship between your Document and Collection classes once, then let APPNETOS resolve the mapping.

Memory-first

Already loaded documents can be reused from the request-local Collection cache without another database read.

Redis-accelerated

When enabled, Redis stores documents and reusable result references across requests.

A high-performance persistence stack

APPNETOS combines two complementary data technologies. MongoDB is the durable document database; Redis provides a fast, optional caching layer. Both are integrated through Core controllers so application code can remain focused on business objects.

MongoDB — flexible, persistent data

MongoDB stores APPNETOS documents as BSON records and supports document-oriented queries, indexes, and aggregation pipelines. APPNETOS maps these records to application-specific Document classes and coordinates reads, writes, and changes through Collections.

The document model is well suited to evolving application data. Native MongoDB capabilities remain available for complex operations, even though routine application development does not require handwritten queries.

Redis — fast, reusable data

With database caching enabled, APPNETOS can automatically cache individual documents by class and ID, store find-result references, and retain cacheable aggregation results. It first reuses request-local documents where possible, then resolves missing data from Redis.

Expiration, collection revisions, and document-to-result references support cache consistency. Changes to documents trigger synchronization and invalidation of related cached results.

Redis database caching is optional and must be enabled in the relevant implementation/configuration. MongoDB remains the persistent source of truth. Cluster-capable deployments can be prepared through the database and Redis infrastructure configuration; topology, failover, and availability depend on the deployed infrastructure.

How APPNETOS minimizes database work

Layer Responsibility Benefit
Document Typed application data and document behavior Simple, predictable developer API
Collection Annotation mapping, persistence, and request-local document reuse Reduces repeated reads during a request
Redis database cache Optional document, find-result, and pipeline-result caching Reuses data across requests when cache entries are valid
MongoDB Durable document storage and aggregation execution Flexible, scalable persistence foundation

On a cache hit, APPNETOS can serve data without repeating the corresponding MongoDB operation. A cache miss, disabled cache, or unsupported operation may still require MongoDB access. Queryless describes the application development model and the goal of minimizing database round trips; it does not mean MongoDB is never queried.

Load connected data with pipelines

APPNETOS aggregation pipelines go beyond isolated document retrieval. A pipeline following the supported document schema can load related records together, convert them into their respective Document types, and register them in the request-local Collection caches.

This lets subsequent application logic reuse already prepared records instead of fetching each relation individually. Cacheable pipelines can additionally store their structured document references and underlying documents in Redis. For unrestricted statistical or custom-shaped aggregations, native non-cacheable pipelines remain available.

Simple tools for everyday development

When an application needs more than direct document access, APPNETOS provides ready-to-use helpers without forcing developers to build a query abstraction from scratch.

  • Filter: chainable MongoDB-compatible field conditions, comparisons, membership tests, and regular expressions.
  • Search: searchable fields, search text, and optional filters combined with collection execution.
  • Pagination: page size, offsets, sorting, result totals, and page navigation.

Search and Pagination are configuration/result containers; Collections execute the corresponding database operations.

Performance you can inspect

High performance should be observable, not merely promised. The APPNETOS Debugbar provides visibility into Redis and MongoDB operations, including individual queries and their loading and processing times. Developers can identify cache hits, expensive database access, and opportunities to optimize data-loading strategies while building their applications.

This transparency complements the queryless approach: fewer manual queries for developers, with detailed diagnostics when deeper inspection is required.

Built for growing workloads

APPNETOS is designed around efficient document reuse, reduced database round trips, and an infrastructure layer that can be prepared for clustered MongoDB and Redis deployments. Caching and aggregation help applications serve complex data efficiently, while the underlying database technologies provide deployment options for larger workloads.

Actual throughput, resilience, and scaling characteristics depend on workload, indexes, cache configuration, and the selected MongoDB/Redis topology.

Next Steps

Document

Explore Document

Collection

Explore Collection

Pipeline

Explore Pipeline

Database Cache

Explore Database Cache