New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
usam rfc draft #2858
base: main
Are you sure you want to change the base?
usam rfc draft #2858
Conversation
|
||
There will be a `.beamable` folder in the root of the Unity project. Inside the folder, there is a `beamoLocalManifest.json` file that contains details about the availalable Microservices in a project. Also, there is a `config-defaults.json` file that contains the connection strings required to start a Microservice. | ||
|
||
Unity will make sure these files are up to date by scanning assets in the project, and making declarative calls to the beam CLI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to Unity, in 2021+, we should use the SearchService instead of AssetDatabase for this. They say the performance is better due to some indexing/cacheing that this new service has. I haven't measured it, but... I don't think (or rather, I hope) that we can trust unity's own measurements about this.
The following steps must be taken for each Microservice | ||
1. create a hidden Microservice folder in the location the `.asmdef` used to be, | ||
2. populate it with the required service files by using the `beam project add` command, | ||
3. copy the entire contents of the folder into the hidden folder's service folder. However, if there are subfolders with their own `.asmdef` files, do not copy those folders, or their decendents. This means we need to write our own recursive file copier. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should keep this code as simple as possible. I believe this should be one or more simple functions to run a Breadth-First-Search over the directory tree using the usual Directory/Path/string types as opposed to any sort of complex abstraction.
Personally, I'd do this with a FIFO Queue over recursion, as there are opportunities to early out and recursion makes that harder to read, IMHO. To be a tad more specific on the implications to the algorithm, we don't need to find every nested asmdef
. If a sub-tree contains a asmdef
at its root, we don't need to expand it at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am all aboard the BFS queue approach over recursion 👍
Much of this RFC has been adapted to JIRA tickets,
https://disruptorbeam.atlassian.net/browse/BEAM-3882
https://disruptorbeam.atlassian.net/browse/BEAM-3883
https://disruptorbeam.atlassian.net/browse/BEAM-3884
https://disruptorbeam.atlassian.net/browse/BEAM-3885
https://disruptorbeam.atlassian.net/browse/BEAM-3886
https://disruptorbeam.atlassian.net/browse/BEAM-3887
https://disruptorbeam.atlassian.net/browse/BEAM-3888
https://disruptorbeam.atlassian.net/browse/BEAM-3891
https://disruptorbeam.atlassian.net/browse/BEAM-3892
https://disruptorbeam.atlassian.net/browse/BEAM-3893
https://disruptorbeam.atlassian.net/browse/BEAM-3895