You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently it is not possible to have an overview of templates that are used during Cobbler runtime. Promoting templates to first-level entities would enable better control over them during runtime.
Provide a detailed description of the proposed feature
During the discussion of #3259 it become evident that it is needed to cache templates during the runtime of Cobbler. Thus it is reasonable to promote templates to first-level objects, so all code is accessing templates equally.
The advantages are:
We inform Cobbler users what templates are detected.
We open ourselves up to caching templates
We have control over the flow of data
We enable new sources for storing the templates (like an external webserver)
Alternatives you've considered
Caching this on a "per-file" basis is of course possible but then the flow of data is not very transparent as multiple places introduce other methods of caching for the different modules of code. We want to reuse and control the flow of data. Thus a maybe quick thing to implement but not a proper thing to do. Caching is hard, let's make it not harder.
Additional information
This is not necessarily a performance improvement but it can't hurt to cache templates and promote them.
Going forward the goal for the PR is to do the following:
Reduce the amount of attributes present for no good reasons at the different item types - aka slim down item.py and introduce additional classes for those who need similar attributes.
Introduce computable properties that won't get saved on disk. Attributes like parents can be calculated during startup and don't need a setter anymore (thus saving time hopefully).
Use attribute UUIDs as primary keys in Cobbler to enable an easier rename operation. This must introduce a cache that enables an easy name based lookup as this is a frequent data-access-path.
Finally add the templates a first-level objects.
The text was updated successfully, but these errors were encountered:
I have started to create a drawio diagram of the current state of the items so I can play drag & drop with the properties and create new classes as desired later on.
Is your feature request related to a problem?
Currently it is not possible to have an overview of templates that are used during Cobbler runtime. Promoting templates to first-level entities would enable better control over them during runtime.
Provide a detailed description of the proposed feature
During the discussion of #3259 it become evident that it is needed to cache templates during the runtime of Cobbler. Thus it is reasonable to promote templates to first-level objects, so all code is accessing templates equally.
The advantages are:
Alternatives you've considered
Caching this on a "per-file" basis is of course possible but then the flow of data is not very transparent as multiple places introduce other methods of caching for the different modules of code. We want to reuse and control the flow of data. Thus a maybe quick thing to implement but not a proper thing to do. Caching is hard, let's make it not harder.
Additional information
This is not necessarily a performance improvement but it can't hurt to cache templates and promote them.
Going forward the goal for the PR is to do the following:
item.py
and introduce additional classes for those who need similar attributes.parents
can be calculated during startup and don't need a setter anymore (thus saving time hopefully).The text was updated successfully, but these errors were encountered: