3tusk / kramh Goto Github PK
View Code? Open in Web Editor NEWThrough the looking glass, it reveals... [REDACTED]
Through the looking glass, it reveals... [REDACTED]
It comes into my mind after Darkhax from Diluv suggests to decouple the SMMART from Minecraft.
Time to drop a "M" from SMMART and rename the spec to SMART, "Schema for Mod Artifact Resource Tracking"
Currently the spec has two field that are tied to Minecraft, which are
minecraft
field in the artifact schema. It defines the Minecraft version that the given artifact relies on.framework
field in the artifact schema. It defines the loader/API that the given artifact relies on, e.g. Bukkit, Fabric, Forge, Sponge, etc..If we want to decouple it, this will become an element in the dependencies
array. Something like [email protected]
. Similar for the framework
field, e.g. [email protected]
.
And this is where the problem kicks in: dependency semantics. Informally speaking, "dependency semantics" are interpretations and behaviors resulting from specifying some or no dependencies. Examples:
forge
dependency, we know that this artifact can be used as a Forge mod. We can make similar interpretation if the dependency is fabric
.minecraft
dependency… there are several things can happen.
minecraft.jar
. Old artifacts that are based on beta-1.x.x age may need such interpretation.minecraft
is also a dependency. We can also include minecraft
into our catalog, and it is the base game, which apparently doesn't need to have specify dependencies at all. Unless you count Java as a dependency.
As such, as a spec for cataloging mod artifacts, we want:
These are absolutely non-goals:
According to Darkhax from Diluv, they plan to use SHA512 to avoid hash collision, and thus uniquely identify a file (an "artifact", in SMMART terminology).
Currently, in SMMART, the artifact schema has several fields related to this:
id
in entry, which uniquely identify a mod entry in a certain catalog.version
in artifact schema, which, combining with id
, uniquely identify an artifact.checksum
in artifact schema, used as a preliminary integrity check.Darkhax's suggestion is to drop id
because it is more or less Minecraft specific. Ideas to consider:
id
is uniqueness. The following SQL should explains my intentions:
CREATE TABLE catalogs (
id TEXT PRIMARY KEY
-- other keys
);
CREATE TABLE artifacts (
id TEXT,
version TEXT,
-- other keys
PRIMARY KEY (id, version)
);
id
field does not necessarily imply "mod id" from Modded Minecraft world. We can, however, give some recommendations. For example, UUID.id
in favor of fields in checksum
.
checksum
being an JSON object. Flattening that object should help.id
means that we have to use a long hash to index an artifact. Can we use similar approach featured in Docker container, where we can name a container while still being able to index it with hash? i.e. alias
field.A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.