cardano-foundation / developer-portal

The Cardano Developer Portal
https://developers.cardano.org
MIT License
371 stars 885 forks source link

Tool Compatibility Matrix #1091

Open scarmuega opened 1 year ago

scarmuega commented 1 year ago

Hi Maintainers!

This issue describes a feature request to augment the available information for the tools section of the Developer Portal. I present this proposal in representation of the Cardano Blockchain Infrastructure Alliance (CBIA). The implementation details are far from being defined. Feedback from maintainers and other members of the CBIA would be greatly appreciated.

Context

The Cardano tool ecosystem is rich and heterogeneous. These are good qualities, but developers face many challenges when trying to orchestrate these tools together to fulfill a particular use-case / application. One of the main challenges is understanding compatibility between the different components.

The Cardano Developer Portal provides a rich index of the tools in the ecosystem. Seasoned Cardano developers rely on this information for updates and new developers use it as reference for their onboarding process.

The motivation behind this initiative is to build on top of the existing work by providing a new dimension of the data listing that focuses on interdependencies, compatibility between tools and compatibility against Cardano protocol features. This data can be used to provide new visualization to support the development process of complex applications.

Schema Changes

Currently, each tool is represented as a JSON object with properties such as "title", "description", "preview", "website", etc. I propose adding a new property named releases to the payload of each tool. This new property will contain an array of objects, where each object holds a description of a released version.

Here's how the enriched JSON payload for the "cardanocli-js" tool could look like:

DISCLAIMER: The data in the example isn't accurate, it's just a sample to facilitate the description of the idea.

{
  "title": "cardanocli-js",
  "description": "A library that wraps the cardano-cli in JavaScript.",
  "preview": "require('./builder-tools/cardanocli-js.png')",
  "website": "https://github.com/Berry-Pool/cardanocli-js",
  "getstarted": "/docs/get-started/cardanocli-js",
  "tags": ["javascript", "sdk"],
  "releases": [
    {
      "version": "3.1.2",
      "latest": true,
      "dependencies": ["cardano-node"],
      "traits": ["babbage", "alonzo", "cip31", "cip32"]
    },
    {
      "version": "3.1.1",
      "dependencies": ["cardano-node"],
      "traits": ["alonzo"]
    }
  ]
}

Each release object contains the following properties:

About Dependencies

The goal of the dependencies array is to provide pointers to other tools available in the same dataset (same JSON). If a tool version doesn't depend on any others, it will be represented as an empty array. The string value of each element in the array should match the title value of the corresponding tool.

These values are NOT meant to become a strict dependency graph as we can find in full-blown package management systems (eg: npm's package.json), but rather an informational field that provides a way to render dependency links on the web based visualization of the portal.

Example:

"dependencies": ["tool_a", "tool_b"]

About Traits

The goal of traits array is to provide indication of broad capabilities that the component supports. In the context of this proposal, traits should be restricted to big-picture concepts of the Cardano protocol, such as hard-forks, eras, CIPs or Plutus versions. If a tool version doesn't have any traits, it will be represented as an empty array.

The list of traits should be predetermined by the maintainers of the portal. Tool developers should conform to the list of well-known traits when adding or updating the metadata for their tool within the context of the portal.

Example:

"traits": ["babbage", "cip31", "plutusV2"]

I rely on feedback and support from CBIA members and maintainers of the portal to compose the initial list of traits.

Visualization Ideas

This proposal doesn't provide any particular visualization of the data, I consider that before reaching that stage we should first gather some data. Nevertheless, here are some ideas to be taken into account for when / if we reach that stage of the project:

Dependency Graph: We could create a visual diagram showing the dependencies between the tools' versions. Each tool version can be a node, and each dependency can be an arrow or a line connecting two nodes. The graph can be interactive to allow developers to better understand the connections between different tool versions.

Trait Matrix: We could implement a matrix in which one axis represents the tools and the other represents the traits. Each cell in the matrix shows the oldest version of the tool that supports the corresponding trait. This feature will enable users to quickly find tool versions that have the traits they need. The matrix could be represented as a table in this way:

Trait 1 Trait 2 Trait 3
Tool A v1.0 - v2.0
Tool B - v1.0 v1.5
Tool C v2.0 - v3.0

Proposed Roadmap

  1. Gather feedback about the proposal from different stakeholders (Developer Portal Maintainers, members of the CBIA, developer community).
  2. If approved, reach consensus regarding the new schema of the json and include the pertinent documentation for tool authors.
  3. Implement the required changes to the Developer Portal web so that it supports the new schema while maintaining backward compatibility with the previous one (no fancy visualization, just text representation of the new data).
  4. Reach out to tool authors requesting that they update their corresponding entries by submitting a PR.
  5. Evaluate gathered data and discuss next steps regarding custom visualizations of the new data (eg: trait matrix, dependency graph).

Your input and feedback on this proposal are highly appreciated.

rdlrt commented 1 year ago

I would fully support this idea, it is also a good touch point for those who have added tools and have not touched it again in a while, as the landscape changes vastly every few months - and some tools can become stale if not actively maintained (and an added incentive to keep tools up to date on dev portal for representation)

katomm commented 1 year ago

Thank you Santiago for taking the time to put this feature request together.

MarvinBertin commented 1 year ago

After discussion with @wolf31o2, we have the suggestion to remove the release field and only add dependencies and tags at the root level. The reasoning for this are:

Regarding traits, on top of the traits suggested ("babbage", "cip31", "plutusV2"), we could also add major Cardano protocol versions (not specific node versions) like protocol-v8

OlofBlomqvist commented 1 year ago

I think @MarvinBertin and @wolf31o2 is right in that we would very soon see stale data regarding some tools here.

Anyone that actually depend on a specific tool probably would imo. be better of relying on github (or whatever other system used by that tool) for release notifications rather than a statically built site which could be possibly a month behind at all times.

Also, I think if this is implemented, sooner or later people would come to expect dev-portal maintainers to keep these release versions up to date for all tools, which just seems unfair to me.

This would partly be solved by the suggestion of having a way to programatically fetch release info from github, but that also relies on tools using github and not bitbucket, gitlab, etc., or even worse: closed source on some random website.

Vardominator commented 1 year ago

Nice proposal. Some thoughts:

gufmar commented 1 year ago
  • Let’s assume cardano-node as the axiom, the source of truth, a starting point.

Shouldn't it be more like (Hardfork) era, block- and network-protocol numbers and specifications?

wolf31o2 commented 1 year ago

Agreed. The node itself isn't a target for many of us. Libraries such as gOuroboros and Pallas target protocol versions or hard fork functionality. Nodes don't advertise their node version during communication. They advertise their various protocol versions.