Abstract
The Distributed Class language is a DSL which defines the communication, or the network contract, of your networked application based on object-oriented design principles. In essence, a distributed class specifies an “interface” for an object that is “shared” between multiple processes or “exposed” in a remote process. (Kevin “Kestred” Stenerson, 2013) The instances of the Distributed Classes defined in the DC file are known as Distributed Objects.
Unlike similar domain-specific languages for network protocols, such as Protocol Buffers, the DC file inlines security, routing, and data persistence all in one file. The DC file itself gives you a topdown overview of the networking of your application. (Kylie Smith, 2024)
Technical Context
The Distributed Class language specification can be described using
context-free grammar and should be parsed by an LALR(1)
parser. The file extension for DC files should be .dc
.
The Distributed Class language was originally developed in Disney VR Studios for the Online Theme Park server. Since Disney released the source for the Panda3D game engine under a free software license, the original source for the DC file parser is available on GitHub.
The original DC parser uses GNU Bison to generate its LALR(1) parser, and Flex to generate its lexical analyzer. Donet uses Plex, which makes use of Rust procedural macros to generate the lexer and parser at compile time.
The grammar specification for the DC language is written in Extended Backus-Naur Form (EBNF) notation. The EBNF specification followed in this document is ISO/IEC 14977.