Skip to content

An entity component system (ECS) framework featuring strong articulations among components from different systems through controller interfaces. 'Everything is a Component' & 'ECS Modules' is what makes it special!

License

Notifications You must be signed in to change notification settings

Electrostat-Lab/Articular-ES

Repository files navigation

Articular-ES

An entity component system (ECS) framework featuring strong articulations among components from different systems through controller interfaces. The API is powered by a caching system that enables caching data in different configurations. Operational interactions take place within the system manager through the controller objects. The API provides a strong abstraction based on the data-centered architecture with the ability to model complex systems, such as: Human Interface Devices (HID) APIs, and language processing and translational APIs.

Software specification:

Part Description
Problem In software detailed design phase, generalization or inheritance, a crucial part of OOP paradigm, has already created a lot of mess in regard to data association between objects, and re-usability or extensibility of these associations which becomes a burden in the implementation phase.
General Approach This is a structural problem (requires a structural architecture), thus a generalized proposed solution is to build solution repositories that take hold of exclusive independent data units (composition applied). A solution repository will also take care of the instructional code by providing action-holder interfaces (strategy pattern applied), then organizational problems can be decomposed into systems and solved by incrementally providing output processed packets using design-patterns. Two commonly used patterns are the recursive pattern, and the finite-state automaton pattern. The architecture, in-use here, can be well categorized under the data-centered architectural patterns.
Articular-ES Approach Articular-ES approaches this problem similarly by providing a system manager(solution repository) that takes hold of components(data units) in a system-first memory format (system-[entity]-component). A system manager is an instantiable object that is once instantiated, it can composite components in their respective systems. A system manager also provides the ability to perform user-defined actions on this memory map format through the strategic patterns.
Data caching Caching data in other formats can help the system manager to provide operational actions on even bizarre memory configurations, for example: (entity-[system]-component); where all the components under an entity can be accessed with a single CPU clock phase without the need to execute a searching algorithm of any sort.
Articular-ES parts The main building blocks in articular-es is the Component interface and the memory maps, and the composition between these basic constituents is the power of articular-es. System managers provide an interactive environment among systems' components through system controllers, while the Component and its descendents provide the structural capabilities for the framework. ECS modules act as components' collections, and are considered components from an abstractive perspective to enable reusability in the same API, and seemless extensibility.
Data-pipes Data-pipes are used for encapsulating data between systems. A data pipe could be registered to an ecs manager, and instantiated when needed. Data pipes can encapsulate algorithms with return value, as well (e.g. filtering algorithms and machine learning algorithms).
Articular-monkey Articular-ES is a generalized architectural API. Specializations can be implemented easily bearing in mind the pros and weaknesses. Articular-monkey is a WIP specialization.

Provisional architectural component diagram:

Development phases:

  • Architecture.
  • Detailed design.
  • Constructional design.
  • Articular-monkey design.
  • Deployment design.
  • Testing and tech-demos.
    • TestArticularManager: tests the articular manager utility composing both the standard ecs manager, and the cache manager in a embedded data-flow environment.
    • TestArticularJme: migrated TestJaime.java to use articular-es; where Jaimes and Cinematics (Components) are built, and added to the JumpKickCinematic System.
    • TestDataPipes: tests the new data pipe featured interface in a sensor module example that envisions calculating data using linear algebra, the connection is made between two systems (DataCollector and DataProcessor).
  • Documentation.
  • Deployment scripting.
  • Deployment.
  • Real life examples (Serial4j).

In-use architectural patterns:

  • Data-centered architectural pattern.
  • Hierarchical architectural pattern.
  • Data-flow pipe architectural pattern.

In-use detailed-design patterns:

  • Strategy pattern.
  • Template pattern.
  • Composite pattern.
  • Finite-state-automata (FSA).

In-use DSA libraries:

  • Java Collection framework.
  • Arithmos.

Quick usage:

repositories {
    mavenCentral()
}
dependencies {
    implementation "io.github.software-hardware-codesign:articular-es:$version"
}

Appendix

  • Overview:
2024-02-16.19-19-54.mp4
  • Resources:
Software Design Data-oriented Design (DoD)