-
Notifications
You must be signed in to change notification settings - Fork 83
How do you suppose to write an SQL implementation of db.go ? #23
Comments
I am in a vacation. I will answer your questions when I arrive. Thank you. |
@dimiro1 Take your time and have a nice vacation! |
Yes it is something that need to get better.
The initial idea was to save references in database or use a Redis PubSub
I agree with you
Could be a SQL database to store apps and a Redis Server to store connections and handle the pubsub stuff.
Cool, feel free to hack in this project, I am not using in production anymore. You can send patches if we are aligned i can give you write permissions in this repo. |
@dimiro1 , thanks for your answers. I will keep sending you just a few PR's. I do not think that I need to have write permission to this repo as of yet. But thanks for offering. I close this thread now. |
I did write one and all interface functions worked perfectly, these:
However, the following from the app struct should be kept in memory for all apps at all times IMO:
You don't really think these should be serialized and saved to the database as well? (and when to save these? when anything inside these changes???)
IMO, only these should be stored in the database from the app struct::
and when these get updated in the database then we should re-read these (maybe check for db changes periodically from a go routine) and update the in-memory database with the new values. When we do this updating, we should never touch the app's Channels, Connections and Stats in memory, I think.
What is your opinion on this? How do you suppose to store the AppIDs and the other app data in an SQL database with the current Ipe code base? IMO, some restructuring might be needed for this.
The text was updated successfully, but these errors were encountered: