Discovery of Community Objects #18419
Labels
kind/feature
Categorizes issue or PR as related to a new feature.
priority/minor
Lowest priority. Work that may be scheduled
rfc-feature
sig/content
Categorizes an issue or PR as relevant to SIG Content.
sig/platform
Categorizes an issue or PR as relevant to SIG Platform.
sig/ui-ux
Categorizes an issue or PR as relevant to SIG UI-UX.
triage/accepted
Indicates an issue or PR is ready to be actively worked on.
Discovery of Community Objects
We need a clear and easy way for community objects to be discoverable to the users of O3DE. We need an easy, decentralized way to help our users find community objects.
Why do we need to help the user find other community objects?
The goal of O3DE is to be the most flexible, modular, extensible and distributed open source engine in the world. In order to achieve the distributed aspect of the engine we need a simple and straight forward way to encourage community members to share their objects with everyone else in the community. Currently, we have a way for the user to link to remote objects, however we have no way of telling the user where these distributed community object can be found. So we need to have a way for a community member to communicate the existence of their objects to other users. We need to do this in a safe way, for us and them. We do not want any liability either, like a search engine.
How can we implement this?
The best place for this type of discovery is the Project Manager. It is the place where the user goes to configure their engines, projects, etc. so it is used often by the user. It is also where we currently have a gui that allows users to add remote objects. Therefore, I would like to see a simple list of community objects just below the section where I am asked to type in the remote uri such that if I click on one of the entries it is filled in for me. Once added an new entry in the o3de_manifest.json should appear. Once added I should see an aggregation of all the remote objects read from all local O3DE objects registered.
How do remote objects work?
The engine has only declares a couple canonical remotes, one being the o3de-extras repo. The engine could simply directly link to o3de-extras repo by adding this remote repo link to the engine.json:
added to engine.json
This is declaring to the project manager that this engine "knows about" a remote repo object, and we would like that object (and its children objects and all their remotes) to be shown to the user in the project manager. This is true fro any O3DE object type not just repos. So if there were remote gems or templates, etc. that the engine "knows about" that could be added here as well.
The remote link format:
To make this easy for the most situations these remote links should be able to handle direct links to object json or zip file on an http or ftp server or a source control link to a git repo. These remote links can one of a few kinds of links should be explicit but may be inferred.
Or an inferred link to a object json file on a web server.
Since this link is in the "gems" list and gem.json is not explicitly stated, it will infer that "/gem.json" to be appended to the link.
Or an inferred link to a object json file on a ftp server:
Since this link is in the "gems" list and gem.json is not explicitly stated, it will infer that "/gem.json" to be appended to the link.
This zip file contains all the files for this gem, and therefore the gem.json is in the zip. The zip file is downloaded and the gem.json is extracted. Zip file names can not inferred.
This zip file contains all the files for this gem, and therefore the gem.json is in the zip. The zip file is downloaded and the gem.json is extracted. Zip file names can not inferred.
This git repo contains all the files for this gem, and therefore the repo will shallow clone the gem.json (if possible, if not full clone). Git repos names can not inferred.
Or an inferred link to a local object json file on the filesystem:
Since this link is in the "gems" list and gem.json is not explicitly stated, it will infer "/gem.json" to be added onto the link.
An explicit link to a local object json file on a unix filesystem:
Or an inferred link to a local object json file on a unix filesystem:
Since this link is in the "gems" list and gem.json is not explicitly stated, it will infer "/gem.json" to be added onto the link.
Also uri notation for a local file will also work:
Since this link is in the "gems" list and gem.json is not explicitly stated, it will infer "/gem.json" to be added onto the link.
Or omitting the domain infers 'localhost':
Since this link is in the "gems" list and gem.json is not explicitly stated, it will infer "/gem.json" to be added onto the link.
These link types can be mixed and matched:
Indirection: linking to a repo.json
Instead of the engine.json directly linking to the extras repos, we can indirectly link to the extras repo. By having the engine link to a different repo.json on a web server somewhere, and then have that repo.json list the repos, which is what the engine currently does. That server is https://canonical.o3de.org. So the engine json would add this instead:
added to engine.json
And then that repo.json would look like this:
canonical.o3de.org/repo.json
We do this indirection because we may need to update this list often i.e. at a higher frequency than the O3DE engine object release. Since the engine.json is part of a release it would take a minor release to update it. But since the engine indirectly links, the repo.json it links to can be updated at any time, is not dependent on any release, and no one would have to update anything on their side for the change to propagate.
So what does this have to do with discovery of community objects?
The point here is that O3DE wants all users to know about all canonical O3DE objects. Users did not have to "discover" these objects because we added this link to the engine object for them. It is important to understand that this remote link to "https://canonical.o3de.org/repo.json" is the only reason why these objects are present in the project manager currently. So, if we just put all the links in this file then everyone would see all the objects, but the user may not want to see ALL of the objects. So we need a way to suggest other uris to the user without cramming them all into this file.
How exactly does this work?
The initial goal here is to download and cache the object json file, so if it is linked directly to an object json, we just download it directly into the cache. This is the fastest, most efficient way. If it is not directly linked then the object json is only available indirectly, meaning we have to download/clone something else and extract the object json from it. This could be a zip file download, then we extract the object json file out of it. Or it could be a shallow clone of a git repo just to get the object json. Some git providers offer raw file access via a web api, which can be used, but is somewhat unreliable because the web apis are almost always throttled. (i.e. "https://raw.githubusercontent.com/o3de/o3de/refs/heads/development/engine.json") Which ever way we get the object json, once the object json is cached, it should be read and any tertiary files mentioned in that object json that program manager would show the user should also then be downloaded and cached, such as the icon file for a gem. If the object json revels this object has children then those object jsons should also be processed. Then the remotes declared in each of these objects should be downloaded, cached, read and so on until all objects have been processed.
How can we implement link suggestions?
We can created two repo.json files, one which lists curated objects (objects that hve a higher bar for being maintained) and another which lists uncurated objects (this is the wild west, low bar, unvetted, potentialy dangerous, just has to actually work). This file will not be linked to by the engine but will be read by project manager to populate link suggestions to the user.
canonical.o3de.org/src/curated/repo.json -> https://o3de.org/curated/repo.json
canonical.o3de.org/src/uncurated/repo.json -> https://o3de.org/uncurated/repo.json.
Keeping these in separate files is better as we can put restrictions on who can update them:
These two main universal community files are for every country. But there is the consideration that we do not want to violate any local laws. Since laws vary by country, we may want to consider localized community files. The country file would have a repo link to the universal repo so that simply including your country you get your countries repos plus the universal ones. i.e. canonical.o3de.org/src/curated/US/repo.json -> https://o3de.org/curated/US/repo.json
canonical.o3de.org/src/uncurated/US/repo.json -> https://o3de.org/uncurated/US/repo.json.
canonical.o3de.org/src/curated/CHN/repo.json -> https://o3de.org/curated/CHN/repo.json
canonical.o3de.org/src/uncurated/CHN/repo.json -> https://o3de.org/uncurated/CHN/repo.json.
We would then detect and set the country default on o3de_manifest.json. As with anything in the o3de_manifest.json the user can change the country to their choice. This would make it viable to accept a repo that is legal in one country that would be illegal in a another country. It could also be a grouping of countries that have the same/similar laws US-CAN-UK or CHN-CBA-NK to minimize duplication of data.
These are repo.json files, so the user COULD just add this repo link and they would see ALL the objects, however that is not the purpose of these files. These files will be read by the project manager and its links presented to the user. The Mock up below is how the user will see the suggestions.
Mock up
This is a mock up of what community repos UI would look like: (note the "Community Repos" here would be "Curated Repos" and an identical box below this one for "Uncurated Repos" would be present.
The user presses the entry and the URI is copied into the dialogs Repository Path for the user.
They then can press "Add"
The same can be done for project discovery: (note the "Community Projects" would be "Curated Projects" and an identical box below it for "Uncurated Projects" would be present.
They select the one they want on the list:
Eventually we can add support for engine objects and template objects and extension objects, etc. in new screens when we get to them.
The text was updated successfully, but these errors were encountered: