Building my own versioning/change tracking system

Building my own versioning/change tracking system

  

Hi guys,

I'm building a collaborative calendar app. A major feature is to track the changes being made to events by different users.

Below is the Entity Diagram I've designed. I'm using the 'Edit' Entity to track the difference between the old and new value in the event. I was thinking about just versioning the entirety of the event but it would lead to a lot of duplicate data.



Does anyone have any experience on how to design this in Outsystems? Are there any built in functions that I utilise?

Best,

Barnett



Hi Barnett,

Really nice subject to discuss. Without thinking too much on it I would have an event table with the eventId and all the fields that don't change. Than I would have a Event_Version with the fields, the person who change it and if is active or is historic. For the participants I'm in doubt, because depend on the queries that you want to do, But you can link to the event and have some active others inactive and know in which version they were added and removed.

Also is that really needed to save all versions? Isn't this enough https://www.outsystems.com/forge/component-details/374/Human-readable+Change+History/? You can have a log of all the changes that happen.

Regards,

Marcelo


Marcelo Ferreira wrote:

Hi Barnett,

Really nice subject to discuss. Without thinking too much on it I would have an event table with the eventId and all the fields that don't change. Than I would have a Event_Version with the fields, the person who change it and if is active or is historic. For the participants I'm in doubt, because depend on the queries that you want to do, But you can link to the event and have some active others inactive and know in which version they were added and removed.

Also is that really needed to save all versions? Isn't this enough https://www.outsystems.com/forge/component-details/374/Human-readable+Change+History/? You can have a log of all the changes that happen.

Regards,

Marcelo



Hi Marcelo,

Thanks so much for replying!

I did think of storing entire copies of the events. Just wondering if the simplicity of it outweighed the duplicate data.

For example if the old event was {startTime: 0800, endTime: 0900, location: hall}, to move the startTime forward would be {startTime: 0700, endTime: 0900, location: hall}. All the other data is duplicated in the new event. Admittedly the storage consumed may not be that much more.

I looked at Human Readable history. Unfortunately, my app is mobile so I haven't found a way to integrate it. 

The reason I'm thinking of storing multiple versions is because multiple parties are to propose edits which are then approved. Some of those edits may be deleted so we need to be able to backtrack on the edits. Basically it's like Git but for calendars.

I'm looking at AutoEntityDiff at the moment to implement your event version idea.

If you have any other ideas or are available to discuss further how to implement please let me know! Your help would be greatly appreciated!


Best,

Barnett

hi,

its not a problem as long as you clean the history.

do you need to keep track of changes which are 3 months old for example?


J. wrote:

hi,

its not a problem as long as you clean the history.

do you need to keep track of changes which are 3 months old for example?


hi J,

Are you referring the forge component Human Readable Change History? Can I use this component in mobile apps?

Best,

Barnett


Hi Barnett, 

What J. is saying is that you will not have a problem of saving everything as long you don't need to keep the history forever. You said that you need to keep the information of history till everything is approved. Maybe you can have other table (event_version_history) that after approve you move all the versions to there. and maybe even after some time you delete versions from this other table.

Regards,

Marcelo

Marcelo Ferreira wrote:

Hi Barnett, 

What J. is saying is that you will not have a problem of saving everything as long you don't need to keep the history forever. You said that you need to keep the information of history till everything is approved. Maybe you can have other table (event_version_history) that after approve you move all the versions to there. and maybe even after some time you delete versions from this other table.

Regards,

Marcelo

Hi Marcelo,


Oh I see. You are right. Perhaps I do not need to store all the versions. I was just taking reference from Git where we have the ability to go as far back into the past edits as we need. I'll give your idea a shot. Will y'all know how it goes thanks!


Regards,


Barnett