Skip to content

hyperhyperspace/hhs3-ts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hyper Hyper Space

Hyper Hyper Space Sync Engine 3.0 (TypeScript)

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.

Current status

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.

Organization

This monorepo is organized as a collection of modules. This is of course WIP.

Data

  • modules/mvt Monotone-View Types: DAG-based replicable object type system with nesting support
  • modules/replica A replica that orchestrates Monotone View Type instances for synchronization
  • modules/dag A DAG-based append-only log with fast fork/merge & covering operations
  • modules/dag_sql SQL-backed storage for DAG entries and indices, using an abstract SQL connection interface
  • modules/dag_sqlite SQLite bindings for the SQL DAG storage layer
  • modules/dag_test Shared test suites (backend parity, DAG creation helpers) reusable across DAG storage backends
  • modules/std_types Standard replicable types (RSet for now) built on the MVT framework

Synchronization

  • modules/sync Synchronizer for the replica module, using the mesh

Networking

  • modules/mesh Peer discovery, authentication, connection pooling, topic multiplexing, swarm management, incoming connection handling with topic negotiation, and per-swarm authorization
  • modules/mesh_ws WebSocket transport implementation for the mesh module
  • modules/mesh_tracker_client Tracker-based peer discovery client (PeerDiscovery implementation)
  • modules/mesh_tracker Tracker server for peer discovery with identity management

Libraries

  • modules/crypto Cryptographic primitives: hashing, signing, KEM, AEAD, KDF with classical, hybrid and post-quantum suites
  • modules/json JSON module for content-based addressing data structures
  • modules/util Collection of helper utilities used across HHS v3.0

Building

To build the system, run

npm install
npm run build

About

TypeScript implementation of Hyper Hyper Space v3

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors