Skip to content

Krestianstvo | Electric - Clojure. Implementing a scalable Croquet VM.

License

Notifications You must be signed in to change notification settings

NikolaySuslov/krestianstvo-electric

Repository files navigation

Krestianstvo | Electric Clojure. Implementing a scalable Croquet VM.

Update 2024

Introducing the second iteration of Krestianstvo | Electric Clojure with the code name Portal.
Read more about the concept here, which is now available in Krestianstvo | Electric Clojure. Recursive portals are on the way. The code is running on Electric v2 (incremental) and is preparing for changes coming with Electric v3 (differential) in the near future.

Please read the blog post reflecting the changes introduced in the new version of Krestianstvo (documentation).

Try the new Portals feature in Krestianstvo World Browser

Updated demo prototype is running at: https://e.krestianstvo.org

Work In Progress

This repository contains the implementation of the Croquet VM (based on Krestianstvo SDK 4 and Virtual World Framework) in Electric Clojure programming language.

The big idea here is to use the Electric distributed runtime as a basis for a higher level scene graph sync abstraction for use in collaborative virtual worlds.

Here are the first steps video with a <200 LoC classic Croquet VM implementation from Krestianstvo SDK 4:

20230508.Nikolai.Electric.Krestianstvo.mp4
  • In <200 LoC all parts of the classic Croquet VM are implemented, including Reflector server, Virtual Time, Recursive Future Messages etc. VM is distributed in a single Electric application as a DAG.
  • Krestianstvo in Electric makes Croquet VM being scalable. Meaning, that previous single Reflector server can be scaled up across networks organising the fleet of Reflectors.
  • Internal dispatcher of the Croquet VM messages queue can be distributed across hardware threads safely.
  • Krestianstvo applications can be potentially run not only in web-browsers, but also in any Clojure hosted environment, scaling horizontally & vertically.

Demo prototype is running at: https://e.krestianstvo.org

Learn more about Krestianstvo SDK 4 here: https://play.krestianstvo.org

Background

Croquet is a software development kit (SDK) for use in developing collaborative virtual world applications. The Croquet software architecture is known for its radical synchronization system with the notion of virtual time.

The video of David P. Reed at OOPSLA '05, talking about core concepts of the Croquet architecture.
Designing croquet's TeaTime: a real-time, temporal environment for active object cooperation

Krestianstvo SDK 4 is the Open Source implementation of the Croquet application architecture in Functional Reactive Paradigm.

Electric Clojure is a new web development paradigm that uses a compiler to build frontend/backend network sync directly into the programming language itself.

The Virtual World Framework (VWF) is a means to connect robust 3D, immersive, entities with other entities, virtual worlds, content and users via web browsers.

Examples

Video demonstrates embedded virtuality featuring pausing and replaying the stream of messages, that are passing through the shared VM.

canvas.mp4

Development

Current version of Krestianstvo is developed and running as Electric Fiddle.
For quick start do:

npm install
clj -A:dev:krestianstvo
  1. Navigate to http://localhost:8080
  2. Corresponding source code is in src/krestianstvo

Documentation on working with Electric Fiddle.

About

Krestianstvo | Electric - Clojure. Implementing a scalable Croquet VM.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published