This is the monorepo for the TypeScript version of Hyper Hyper Space, version 3.0 (roadmap).
Hyper Hyper Space is a data sync engine focused on Authority Decentralization. It enables applications to run locally with full autonomy, and to sync their state securely over the open Internet even in the presence of malfunctioning or adversarial peers. Furthermore, it provides support for sophisticated behavioral rules, intended to enable applications that foster cooperative and productive interactions.
This new version has two main goals:
-
Greater modularization. Previous versions of Hyper Hyper Space were bundled as a monolithic JavaScript app for usage in web browsers. While we still see the browser as a possible target, we're now trying to build a collection of modules that can be re-used on any platform. See below for the modules that have been ported to v3 so far.
-
A new data model. We've developed a new formalism for coordination-free replication, Monotone View Types, in which observations are monotonic but explicitly version-scoped, allowing historical views to be refined as additional information becomes available. MVTs are a powerful monotonic transformation mechanism, that helps application developers create coordination-free approximations for applications in any domain. Learn more in the mvt module.
The core sync engine is complete: the mvt (Monotone View Types), replica, sync (synchronizer), and mesh (networking) layers are all implemented and working together to enable live peer-to-peer state synchronization. A formal protocol specification covers the full architecture — from authenticated mesh channels through DAG exchange to type-level validation. Standard replicable types (starting with RSet) are available in the std_types module. We're now developing rdb_adapter, which keeps a local relational database in sync with an HHS replica, enabling integration with existing information systems. Please see the individual module specs and the roadmap for details.
This monorepo is organized as a collection of modules. This is of course WIP.
Data
modules/mvtMonotone-View Types: DAG-based replicable object type system with nesting supportmodules/replicaA replica that orchestrates Monotone View Type instances for synchronizationmodules/dagA DAG-based append-only log with fast fork/merge & covering operationsmodules/dag_sqlSQL-backed storage for DAG entries and indices, using an abstract SQL connection interfacemodules/dag_sqliteSQLite bindings for the SQL DAG storage layermodules/dag_testShared test suites (backend parity, DAG creation helpers) reusable across DAG storage backendsmodules/std_typesStandard replicable types (RSet for now) built on the MVT framework
Synchronization
modules/syncSynchronizer for the replica module, using the mesh
Networking
modules/meshPeer discovery, authentication, connection pooling, topic multiplexing, swarm management, incoming connection handling with topic negotiation, and per-swarm authorizationmodules/mesh_wsWebSocket transport implementation for the mesh modulemodules/mesh_tracker_clientTracker-based peer discovery client (PeerDiscovery implementation)modules/mesh_trackerTracker server for peer discovery with identity management
Libraries
modules/cryptoCryptographic primitives: hashing, signing, KEM, AEAD, KDF with classical, hybrid and post-quantum suitesmodules/jsonJSON module for content-based addressing data structuresmodules/utilCollection of helper utilities used across HHS v3.0
To build the system, run
npm install
npm run build
