-
Notifications
You must be signed in to change notification settings - Fork 7
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
maintenance hasn't implemented a database storage yet #49
Comments
So, I've been trying to work on this, but I think we need to consider changing the format that we send and receive information about the maintenance windows, both through REST API, and through the event bus. First, we should partition the list of items used to contain the ids for all the switches, links and UNIs into three separate lists on the REST API end. Managing all three types of objects through just the items list is ergonomically awkward, and increases the required complexity to parse the incoming data. Additionally, we are already storing the three types of objects in separate lists internally. Using separate lists should also help towards fixing #25. Next, for the purpose of being able to serialize the database, we should change how we store information to only use the IDs of these objects. Currently it seems that for UNIs and Links, it is expected that we will be storing a reference to the object, rather than its ID. Finally, we should change how we communicate the event to other NApps to use there IDs. Currently we send references of the objects entering maintenance, which can work. but for Links the reference isn't the actual object, so the receiver extracts the ID from the reference. What I have done so far still isn't in a necessarily usable state, but this seems to be the direction I'm moving in. Let me know if this seems to be the right way to go. |
Agreed.
I think it's great to store effectively what the application needs to perform its responsibilities and also be able to restore scheduling states such as what mef_eline does, we want to defer to DB as much as we can eliminating
IDs could work and simplify things, ultimately we'll need a NApp responsible who is managing that resource to update in memory
@Ktmi, very good points and initial approach. What I'll advise is let's first also make sure that the requirements that @italovalcy, Jeronimo and Arturo previously mapped are also reviewed and assessed, @italovalcy has posed them here #59 (comment), let's refine it first, and them I think you could start a lightweight blueprint consolidating what it's feasible for this version and aligned with the requirements/expectations, cc'ing @ajoaoff (since we also had a PR in draft, we'll need to sync this blueprint and if there might be possibility to divide and conquer the scope), how does that sound? Thanks, if you need my help let me know, happy to help with reviews or brainstorm sessions if you need. |
In the initial iteration, this NApp is still storing the maintenance windows in a Python dict, however, to be prod grad and provide permanent storage it should implement a NoSQL storage (for more context, in this kytos-ng release 2022.2, topology will be migrated, and other NApps will follow suit later, so maintenance also being a potential candidate too depending on the priorities for 2022.3).
The text was updated successfully, but these errors were encountered: