Anything is Event (AE): A Method for Implementing a Digital Universe Based on Whitehead's Process Philosophy——Spatiotemporal Engine Technical White Paper
Simultaneously published at: https://zhang.blog.csdn.net/article/details/159661988
Author: Zhang Liang
Version: 1.0
Copyright: Copyright © 2026 Zhang Liang. All rights reserved.
Date: February 2026
Contact: 350137278@qq.com
License: This document is licensed under the CC BY-ND 4.0 license. You are free to share (copy and redistribute) this document, but you may not modify it, nor imply or claim authorship. Any reproduction, redistribution, or dissemination of this document must attribute the original author. The engine source code described herein, Aether, is closed-source and not covered by this license.
Disclaimer: Descriptions of commercial engines such as Unity and Unreal in this document are solely based on the author's personal experience and public information including AI-assisted research, representing subjective understanding. They do not represent official technical documentation from the respective product vendors. The author welcomes corrections for any inaccuracies or omissions. This document aims to expound the design philosophy and implementation methods of this engine, with no intention to disparage or deny the value of any commercial products.
This document is the first systematic technical literature to engineer and implement Alfred North Whitehead's process philosophy into a runnable digital universe, i.e., a spatiotemporal computing engine. Based on the author's comprehensive search across the internet, as of March 2026, no other work has been found to fully map core concepts such as "actual entity → event," "prehension → ECS component read/write," and "objective immortality → state accumulation" into an engine architecture and publicly implement it. This paper aims to provide a novel, philosophically self-consistent construction pathway for domains such as digital twins, real-time simulation, real-time GIS applications, and game servers.
The "Anything is Event" philosophical architecture expounded herein, the complete mapping method from Whitehead's process philosophy to engineering implementation, and all technical designs or implementations described in this document (including but not limited to the event bus evbuf, time multi-resolution event wheel, ECS component system, lock-free ringbuf, 2D, 3D, 4D pyramid spatial multi-resolution index, memarena memory pool, and the extension plugin system based on dyncall) are the independent original work of the author, Zhang Liang. The author has engaged in foundational research and engineering practice since 2012, undergoing multiple reconstructions and philosophical deepenings, ultimately forming the self-consistent system presented in this white paper. Without the author's written permission, any individual or organization shall not adapt, interpret, plagiarize, or otherwise use the core ideas, methodologies, or technical designs presented herein for publishing papers, applying for projects, or commercial development. The author reserves all legal rights.
libae.so / libae.dll are the reserved standard library names for the engine's core modules, where "ae" is an abbreviation for "Anything is Event" or Aether.
Due to time constraints, errors and omissions are inevitable. Feedback and corrections are welcome.
This paper proposes a novel method for implementing a digital universe—the Spatiotemporal Engine design—whose core philosophical foundation is the Process Philosophy of Alfred North Whitehead (1861–1947, an influential British mathematician and philosopher of the 20th century, founder of process philosophy). The engine takes "event" as the primary reality, completely abandoning the traditional "entity-first" worldview, and constructs a trinity architecture of event bus, ECS component system, and pyramid spatial index, implemented entirely in C. By directly mapping Whitehead's core concepts such as "actual entity," "prehension," "objective immortality," and "eternal object" into data structures and scheduling mechanisms, the engine achieves unprecedented levels of determinism, performance, and auditability. This paper aims to demonstrate: Only an engine built upon a correct philosophy can truly simulate change and causality, providing a trustworthy spatiotemporal computing foundation for digital twins, real-time simulation, gaming, and mission-critical systems.
Design Scope and Extended Significance: The engine described herein focuses on core underlying mechanisms of the digital universe such as spatiotemporal management, event scheduling, entity-component systems, and memory control. It does not include high-level presentation or communication layers such as graphics rendering, physics simulation, audio processing, or network protocols. The engine core can run independently on servers, embedded environments, etc., while the rendering layer can interface with external renderers through the system's event interface, achieving complete decoupling of presentation and logic.
This design endows the engine with significant extended significance:
- Core Purity: The engine kernel is entirely based on Whitehead's process philosophy, maintaining determinism, auditability, and hard real-time capabilities, free from interference from high-level presentation layers or external libraries.
- Plugin-based Extension: Through standardized interfaces and dynamic loading mechanisms (such as the dyncall plugin system), users can freely add their own extension modules for rendering, audio, networking, physics, algorithms, business logic, etc., without modifying the kernel source code. This "stable kernel, open extension" design pattern protects users' core intellectual property while providing flexible customization capabilities for different application scenarios.
- Cross-domain Adaptability: The engine can be embedded in game clients (connecting to Unity/Unreal rendering), digital twin platforms (connecting to Cesium, Three.js, GIS visualization), or run as a pure backend server, seamlessly collaborating with various frontends or services through the same event stream and component data.
- Ecosystem Friendly: Developers of extension modules only need to adhere to the extension interface protocol to build rich high-level functions of the digital universe without compromising core determinism.
Therefore, this engine is not just a "mathematical computing engine" for spatiotemporal simulation, but also a growable and integratable digital universe kernel, providing a solid and open underlying foundation for future virtual worlds, industrial simulation, and mission-critical systems.
Systems such as real-time simulation, digital twins, and large-scale games are essentially simulations of changes in the real world. However, mainstream commercial engines (Unity, Unreal) and even traditional ECS frameworks are rooted in an entity-first metaphysical worldview—the world consists of persistent material entities, change is merely an accident of entities, and time and space are considered containers external to entities. This philosophical presupposition leads to:
- Fragmentation of State and Change: Entity states are stored as snapshots; changes are temporarily modified through "update functions," making causal chains untraceable.
- Difficulty in Embedding Time: Time is treated as a global clock independent of entities, failing to express the processual nature of "becoming as being."
- Concurrency Challenges: Multiple events modifying the same entity state concurrently necessitate locks or transactions, sacrificing determinism.
- Non-auditability: System behavior is difficult to reconstruct from state snapshots; security and reliability depend on black-box optimizations.
The root cause of these issues is a lack of philosophical consciousness. When attempting to construct a "digital universe" rather than a simple business system, we must first answer: What is the fundamental unit of the universe? How is change possible? How is causality transmitted? These questions cannot be answered by algorithm libraries or design patterns; we must return to philosophy.
Whitehead's process philosophy is the most profound and self-consistent answer to "change." It posits: The fundamental reality of the universe is not matter, but instantaneous events (actual entities); so-called persistent objects are merely abstractions of stable patterns within sequences of events; time and space derive from relationships between events; causality is transmitted through "prehensions" between events. This idea perfectly aligns with the intuition that "anything is event" and provides an indisputable metaphysical foundation for a digital spatiotemporal engine.
In Process and Reality, Whitehead constructs a cosmology with the "actual entity" as the ultimate reality. We map these core concepts one by one to the engine's design principles:
| Whiteheadian Concept | Philosophical Meaning | Engine Mapping |
|---|---|---|
| Actual Entity | The most fundamental existent in the universe; each is an instantaneous, self-constituting event. Its "being" is "becoming." | Everything in the engine is an event: the AeEvent instance is the sole fundamental unit. Any state change, timer trigger, user input, or system update is encapsulated as an event. The entire process from event creation, scheduling, to execution completion constitutes its "becoming." |
| Prehension | The "feeling" or "reference" of one actual entity towards others; the sole means of causal transmission. Each actual entity internally contains the data of other entities it prehends. | Events can only influence each other by reading and writing ECS components. Events do not directly reference other events but instead modify shared components, allowing subsequent events to "prehend" these changes. Components constitute the "public data layer" of the objective world. |
| Objective Immortality | Once an actual entity's becoming is completed, it is preserved forever as objective material, available for prehension by subsequent entities. | After an event executes, its modifications to components take effect immediately and persist permanently (unless explicitly undone). The world state is always the cumulative result of all executed events. The state at any moment can be reconstructed from the event log. |
| Eternal Object | Formal, unchanging patterns of possibility, such as geometric shapes, numbers, types. They are not actual in themselves but participate in the constitution of actual entities. | Static metadata such as event types, component types, signatures, and spatial index levels. They define the "space of possibilities"; concrete events are instantiations of these eternal objects. |
| Concrescence | The synthesis of multiple actual entities into a unified whole (e.g., a complex event within a time slice). | The engine supports batch scheduling and aggregation of events within time wheel slots, allowing a set of atomic events to concresce into a higher-order event (e.g., "a transaction"). |
| Spatiotemporal Structure | Space and time are not pre-existing containers but are derived from the extensive order of prehensive relationships among actual entities. | The pyramid spatial index and hierarchical time wheel do not presuppose absolute space-time but are dynamically organized by the timestamps and spatial coordinates of events. Each event carries its own spatiotemporal markers; the index structures exist solely for query optimization. |
Based on the mapping above, the engine establishes the following iron laws:
- No Event, No State: Any persistent state change must be accompanied by at least one event.
- Events as Sole Communication: Events cannot call each other directly; they can only interact indirectly through components.
- Space-Time as Derived: The time wheel and spatial index are dynamically constructed from event attributes and do not exist independently of events.
- Types as Eternal Objects: Metadata such as event types and component types are immutable once defined, but instances can be generated infinitely.
These principles ensure the engine's behavior is isomorphic with Whitehead's cosmology, thereby guaranteeing determinism and comprehensibility at the root.
The engine is implemented entirely in pure C, all original work by Zhang Liang, with all data structures transparent and auditable. The core modules strictly adhere to the philosophical mapping described above.
The event bus is the core for realizing the becoming and transformation of "actual entities." It utilizes time multi-resolution—a hierarchical time wheel (maximum 8 levels, 256 slots per level) to provide O(1) complexity timing management, supporting timeout ranges from 10 nanoseconds to thousands of years. Key components:
- Lock-free Ring Buffer: Multi-producer, single-consumer model, using atomic variables for high-throughput event submission, avoiding lock contention—corresponding to the characteristic of "actual entities" arising independently without mutual interference.
- Atomic State Machine: Worker threads and timer threads switch states via atomic flags, ensuring lock-free synchronization—ensuring the deterministic order of the "becoming" process.
- Cross-platform Semaphores: Precisely wake up threads, avoiding busy-waiting—simulating the transmission of "objective immortality" between events, where subsequent events are awakened only after previous events complete.
Event Lifecycle:
- Creation: Allocate
AeEventfrom the memory pool, populate type, timestamp, parameters. - Submission: Enqueue into the lock-free ring buffer, simultaneously insert timing information into the time wheel.
- Scheduling: Time wheel triggers, event enters a worker thread.
- Execution: Call the corresponding handler, read/write ECS components during execution.
- Completion: Event marked as complete; its effects (component modifications) persist permanently; the event object itself can be recycled.
This entire lifecycle corresponds to the process of an "actual entity" becoming and entering objective immortality.
ECS (Entity-Component-System) is not an entity store in the traditional sense but a medium for "prehension" between events. Designed as follows:
- ECS Stores Pyramid Grid Components: Each grid cell acts as an entity; user graphics are components attached to these entity grids.
- Components Pooled by Type: Each component type has a contiguous memory pool; components of the same type are stored contiguously, offering cache friendliness.
- Entity as Flag: Entities themselves hold no data; only a 1-byte flag marks the component types they possess. Entity IDs are the link for references between events.
- Components as Traces of Prehension: When an event executes, it reads or modifies components via component IDs. Modification results are immediately globally visible; subsequent events "prehend" by reading the same components.
- Reference Counting: Allows components to be shared by multiple entities (e.g., sharing geometric data), corresponding to Whitehead's notion that "prehension can be universal."
This design makes the data layout completely transparent, allowing developers to precisely control cache lines and avoid hidden overhead. Simultaneously, the traversal process of the ECS system is a cumulative scan of "objective immortality."
The spatial index does not presuppose an absolute coordinate system but is dynamically constructed from the position attributes carried by events:
- Spatiotemporal Multi-Resolution Grid: 2D/3D/4D (including time dimension) pyramid index, automatically selecting levels based on the bounding box of objects.
- Partition Callback: Splits complex objects into multiple sub-parts stored at different levels, supporting LOD and view frustum culling.
- Grid as Entity: Each grid cell itself can be considered an ECS entity, storing an ordered linked list pointing to object cards—embodying the idea that "space is derived from event relationships." User spatiotemporal event data are components of the grid, supporting arbitrary custom components.
- Reverse Mapping: O(1) mapping from object ID to all its card positions, ensuring the index synchronizes when events update positions.
The spatiotemporal index exists solely for query optimization; the world's spatiotemporal structure itself is entirely defined by the sequence of events. Any spatiotemporal query is a computation projecting from events that have already occurred.
Whitehead's "objective immortality" requires event effects to persist permanently, whereas traditional dynamic allocators lead to unpredictable fragmentation and latency. memarena implements:
- Tail Stack Recorder: A stack area growing inversely at the tail of each memory block, recording allocation sizes and deallocation markers, enabling O(1) positioning.
- Free in Arbitrary Order: Supports non-sequential deallocation via markers and batch rollback, adapting to the uncertainty of event lifecycles.
- Multi-page Pool: Manages memory pages with a bidirectional circular linked list, automatically expanding and performing lazy reclamation.
- Performance: Over 30% faster than system allocators.
All component storage, event objects, and temporary buffers are allocated from memarena, ensuring predictable memory behavior and meeting hard real-time requirements for mission-critical tasks.
Unifies GIS and game engine development under a single paradigm. Through a unified spatiotemporal index management, events can be transformed between the two coordinate systems—for example, a GIS weather event triggering an in-game particle effect. This capability stems from Whitehead's view that "spatiotemporal structure is derived": as long as coordinate transformation rules are defined, event relationships can be mapped to any spatiotemporal expression.
| Aspect | This Engine (Whitehead's Process Philosophy) | Unity / Unreal (Entity-First) |
|---|---|---|
| Core Abstraction | Event-first; everything is an event; state is the cumulative result of events | Entity-first; state is an entity attribute; events are invocations of entity methods |
| Time Handling | Time wheel scheduling; time embedded in events | Global frame clock; time external to entities |
| Causality Model | Events influence each other via component prehension; explicitly traceable | Message passing or direct invocation; causal chain implicit |
| Memory Management | memarena, no dynamic allocation, deterministic | Non-deterministic |
| Auditability | World state fully reconstructible from event log | Only current snapshot saved; history unrecoverable |
| Concurrency Model | Lock-free event scheduling, atomic state machine | Task system + locks; prone to contention |
| Mission-Critical Suitability | ✅ Deterministic, auditable | ❌ Hard to predict, black box, licensing restrictions |
The fundamental philosophical difference yields essential engineering advantages: When change is primary, all mechanisms are designed for change; when entities are primary, change is always a second-class "patch."
In mission-critical fields such as defense, aerospace, industrial simulation, and autonomous driving, software determinism, auditability, and real-time performance are non-negotiable. The Whiteheadian foundation of this engine provides unique value:
- Fully Auditable: All state changes are permanently stored as an event log; the world state at any moment can be reconstructed from this log. This meets the highest levels of security compliance requirements.
- Deterministic Behavior: Event scheduling is based on absolute timestamps and the time wheel, with no randomness; the same input sequence yields exactly the same output.
- Hard Real-Time Capability: No GC, no hidden dynamic allocations; memory operation times are predictable, with microsecond-level response latency.
- No Licensing Risk: Pure C, self-developed, independent of third-party black-box components; deployable in any environment (including bare metal, RTOS).
Empirical data further support this:
- Insertion of 800,000 GIS Polygons into Pyramid Index: From file read to insertion into the pyramid takes approximately 1.2 seconds.
- Event Throughput: One thread writing, one thread reading: over 7 million events per second (64 bytes per event).
- Memory Allocation Speed: Approximately 30% faster than system allocators.
Building upon the continued deepening of Whitehead's process philosophy, we will further refine:
- Formal Verification: Perform process logic modeling of core scheduling algorithms to formally prove determinism.
- Distributed Event Synchronization: Serialize events for transmission across networks to achieve global-scale digital twins.
- Quantum Process Extension: Explore combining process philosophy with quantum theory to simulate superposition and entanglement.
- Visualization Toolchain: Event-stream-centric visualization debugging and time-travel debugging.
We did not begin with code; we began with philosophy. Whitehead's process philosophy reveals: To be is to become; reality is event. Based on this insight, we constructed the "Anything is Event" digital spatiotemporal engine—event as primary reality, state as cumulative event outcome, space-time as derived from event relationships. Implemented in pure C, with transparent data structures, lock-free scheduling, and high-performance memory management, the engine surpasses traditional solutions in determinism, auditability, and real-time capability.
In the journey to construct a digital universe, philosophy is not decoration but a foundational constraint. Only by being isomorphic with the fundamental laws governing the universe can software achieve true trustworthiness and freedom. The birth of this engine demonstrates the feasibility of moving process philosophy from speculation to engineering. We firmly believe this is the inevitable direction for the next generation of digital spatiotemporal engines.
"The real world is a process which passes from one state of reality to another state of reality. Each state is a product of causal efficacy and is a cause for future states." ——Alfred North Whitehead, Process and Reality
| Whiteheadian Term | Engine Correspondence |
|---|---|
| Actual Entity | AeEvent instance |
| Prehension | Event read/write of components |
| Objective Immortality | Persistent accumulation of component states |
| Eternal Object | Event types, component types, signatures |
| Concrescence | Batch processing of events within a time wheel slot |
| Extensive Continuum | Pyramid spatial index + time wheel |
Zhang Liang is an independent researcher and systems programmer with over 30 years of experience in low-level C development. He specializes in high-determinism systems, digital spatiotemporal engines, and the engineering implementation of process philosophy. He has provided system architecture consulting for several technology companies and is currently dedicated to researching and building next-generation digital universe spatiotemporal computing engines based on Whitehead's process philosophy, exploring the path from philosophy to fully self-consistent code.
For collaboration, academic exchange, or technical consultation inquiries, please contact via email: 350137278@qq.com.
Document Version: 1.0
Last Updated: February 2026