4 releases
0.1.3 | Oct 22, 2022 |
---|---|
0.1.2 | Oct 21, 2022 |
0.1.1 | Oct 20, 2022 |
0.1.0 | Oct 20, 2022 |
#2615 in Database interfaces
27KB
135 lines
Metals - Meta Programming Language for Composable Systems
Metals is a meta programming language for building composable systems.
It is a library that provides the meta programming language environment for domain modeling and schema management to compose complex systems from simpler components.
This project is still Work in Progress.
Getting started
You can refer to the library documentation for metals
.
The metals book contains introduction to modeling,
guides for modeling with metals
and deeper dive into technical and
mathematical background.
Please note that the book is still work in progress.
Copyright 2022 Weavers @ Eternal Loom. All rights reserved.
lib.rs
:
Metals is a meta programming language for building composable systems.
It is a library that provides the meta programming language environment for domain modeling and schema management to compose complex systems from simpler components.
About Domains and Modeling in Computation
A domain is a field or an area under investigation. In a computational context, we are interested in developing computational models of domains in the real world and use these models to build solutions to the problems at hand.
Modeling or model development is the first step in any project. They are essential to communication among stakeholders and used throughout the development process. They may be formal or informal, documented or not, explicit or implicit.
The power of models essentially decides the type of problems we can address and the quality of our solutions.
Key Ideas
The domain modeling capabilities and the required meta programming support within metals are based on the following key ideas.
-
Simple models, complex domains: Models based on simple rules can exhibit complex behavior. Ability to model domains of arbitrary complexity does not necessarily mean that the models have to be unreasonably complex as well. We strive to promote simple models throughout.
-
Compositional models: Complex models are compositionally built from simpler ones. It is our fundamental belief that the compositionality of our mental models underlie the extraordinary human cognitive capabilities.
-
Context Aware Computing: Next to compositionality, context awareness or mode dependent computation is the most important aspect of the computational models supported by metals. This is especially important in the context of distributed, heterogeneous computing environments. The models are not used by a single system or environment as we traditionally assume when we build computational models.
-
Combinatorial generalization: the ability to learn increasingly complex concepts by synthesizing simple ideas, enabling both rapid learning and adaptation of knowledge
Our goals
The modeling capabilities provided by metals shall meet the following goals.
-
Enable Communication: The models should serve as the communication medium between different teams, especially with domain experts. We shall not expect any programming expertize from the domain experts or other teams outside of the development or engineering teams, nor shall we want the developers to leave their tools of choice and familiarity to build communication models.
-
Modeling Data and Behaviors: The models should be able to represent both data and their associated behaviors. The compositionality and combinatorial generalization shall apply to both data and behaviors.
-
Executable models: The models should be executable. It should be possible to convert the models developed through collaborative modeling process to executable artifacts with minimal effort.
-
Make Illegal States Unrepresentable: The models should be able to capture the domain constraints explicitly and make all illegal states unrepresentable. The models should fully and faithfully represent the domain constraints so that they can serve as a single source of truth about accuracy our requirements and the subsequent implementation.
-
Uniform Structured representations: The modeling language shall support structured representations that can be used across heterogeneous environments. The models should be able to provide uniform view of the domain across many boundaries that exists in the development and runtime environments such as programming languages, frameworks, platforms, networks, etc.
-
Lazy Evaluation and Transparency: A state represented in the model shall be evaluated lazily in a location transparent way. When one models a domain, the domain objects represent data that eventually resolve to appropriate values, not necessarily eagerly computed. For example, when one refers to a User in the model, it could be an object that is returned by a network call or a database query. The models should be able hide such details. The transparency also means that the model builders are not burdened by idiosyncrasies such as different query semantics, implementation details and access protocols of the underlying systems or environment.
-
Distributed and Independently Evolving Models: Building a uniform model for a given application does not necessarily mean a single global model. Global models are complex to build and a nightmare to maintain. Our goal is to support smaller, distributed models that can evolve independently. An application (or solution) context will be able import the relevant models and create a unified view of the domain as it pertains to that application.
Organization
The metals library is organized into the following set of packages or libraries (crates).
metals
: This library (current crate) brings the overall functionality together.metals-poly
: Poly library provides the interface and interface type abstractions that form the foundations of the meta programming.
Metals book
The metals book contains introduction to modeling,
guides for modeling with metals
and deeper dive into technical and
mathematical background.
Please note that this is still work in progress.
Dependencies
~305–415KB