One approach that I've found useful for offline data is to use event-driven architecture so that each change made offline is stored as an event. Rather then sending the content of the underlying data (i.e.: records from a table), you simply send all of the event's that have occurred since the app was last online. Yes there can still be conflicts, but in my opinion they are much easier to manage.
You have just peaked my interest into event-driven architecture. I've watch tons of Derek's from CodeOpinion videos, but for the first time I want to know more.
@@vbaclasses3553 derek’s videos are great. I’ve only had the chance to use event driven architecture once, and it definitely makes a difference if you know what your doing. Especially in scenarios like this.
That gives you a better picture of the order of things, which does help with some issues, but it doesn’t really address data conflicts, which is the biggest issue.
@@IAmTimCorey I completely agree, conflicts are always challenging. However, with the above approach you don’t have to worry about conflicts like primary keys in tables when you are inserting data, just as an example.
Regarding comments that Tim is not providing a solution. The solution is specific to your business and what the user requirements are. One scenario not mentioned is not just that you have 2 changes from 2 locations, but that the changes are logically inconsistent. If user 1 changed the city to match the state, and user 2 changed the state to match the city. Each independent change is valid, but cannot be merged properly. This is where we earn our pay. Providing options to the business team and then making those options a reality.
Thanks Tim, that was a really helpful nugget of architectural reasoning. We need more of this 😅. I myself have never sofar come across to some similar requirement to this (consolidating delayed and possibly incompatible conflicts, effectively reconstructing the past), and I am glad I came across your video early.
Hello Tim, First thank you for your great videos. I have watched too many already. I want to build a WPF with offline database synchronization Level 4. maybe level 5, not sure yet. Can you point me in some direction on what library to use? or samples? I dont mind to use Azure or google, etc. I have seen too many different options but I would like to use one where the trend is going to guarantee a long term support. Thank you.
Years ago with a desktop application we built. We used sql server and localdb. We used dacpacs to check for db schema changes to update the localdb. Anyways when they created offline data and needed to sync back to the main server we used syncframework and totally customized it. We also used guids and had logic of what to "take" if there is conflicts from the server or client. It got pretty complicated to where eventually we built our own custom sync. Curious do you recommend a certain framework for syncing and then customizing it? Again I know it all depends on what you are doing. Just wondering if you have used any sync frameworks yourself or just built your own.
There are frameworks out there, and I mentioned a few technologies in this video, but at the end of the day they all take customization based upon your specific circumstances. I've found that even inside your specific scenario, you end up having different rules for different data.
@@IAmTimCorey You mentioned sqllite and pouchdb. but just curious which ones you liked working with personally and have used for any given project. Do you usually build your own... i know it all depends, just wondering what you have worked with and liked
Tim I've been following you for years and this was the first video of yours that I didn't like. you talked about a common problem for all developers, but you didn't give any solutions. only brought questions and no answers.
This is because I took you as far as I could. Each situation is specific and needs to be handled that way. There are high level concepts that we can talk about (this video), but I can’t say “do this”. Even for your specific situation, you will need to do things differently for different parts of your data. Offline data is HARD.
I got you as close as I could. Even for your specific situation, you will probably mix and match these solutions. Offline data is either simplistic (read-only) or it is a custom solution for a given situation. Anyone that says “just do this” is incorrect and giving bad advice. Offline data that isn’t just read-only is HARD!
One approach that I've found useful for offline data is to use event-driven architecture so that each change made offline is stored as an event. Rather then sending the content of the underlying data (i.e.: records from a table), you simply send all of the event's that have occurred since the app was last online. Yes there can still be conflicts, but in my opinion they are much easier to manage.
You have just peaked my interest into event-driven architecture. I've watch tons of Derek's from CodeOpinion videos, but for the first time I want to know more.
@@vbaclasses3553 derek’s videos are great. I’ve only had the chance to use event driven architecture once, and it definitely makes a difference if you know what your doing. Especially in scenarios like this.
That gives you a better picture of the order of things, which does help with some issues, but it doesn’t really address data conflicts, which is the biggest issue.
@@IAmTimCorey I completely agree, conflicts are always challenging.
However, with the above approach you don’t have to worry about conflicts like primary keys in tables when you are inserting data, just as an example.
@@jamesmussett u just use guids and won't be an issue
Regarding comments that Tim is not providing a solution. The solution is specific to your business and what the user requirements are. One scenario not mentioned is not just that you have 2 changes from 2 locations, but that the changes are logically inconsistent. If user 1 changed the city to match the state, and user 2 changed the state to match the city. Each independent change is valid, but cannot be merged properly. This is where we earn our pay. Providing options to the business team and then making those options a reality.
Thanks for sharing. Excellent points.
Thanks Tim, that was a really helpful nugget of architectural reasoning. We need more of this 😅. I myself have never sofar come across to some similar requirement to this (consolidating delayed and possibly incompatible conflicts, effectively reconstructing the past), and I am glad I came across your video early.
I am glad it was helpful.
Really enjoyed the video. Lots of food for thought and guidelines of how to approach these challenges. Thank you.
Glad it was helpful!
Hello Tim, First thank you for your great videos. I have watched too many already. I want to build a WPF with offline database synchronization Level 4. maybe level 5, not sure yet. Can you point me in some direction on what library to use? or samples? I dont mind to use Azure or google, etc. I have seen too many different options but I would like to use one where the trend is going to guarantee a long term support. Thank you.
Years ago with a desktop application we built. We used sql server and localdb. We used dacpacs to check for db schema changes to update the localdb. Anyways when they created offline data and needed to sync back to the main server we used syncframework and totally customized it. We also used guids and had logic of what to "take" if there is conflicts from the server or client. It got pretty complicated to where eventually we built our own custom sync. Curious do you recommend a certain framework for syncing and then customizing it? Again I know it all depends on what you are doing. Just wondering if you have used any sync frameworks yourself or just built your own.
There are frameworks out there, and I mentioned a few technologies in this video, but at the end of the day they all take customization based upon your specific circumstances. I've found that even inside your specific scenario, you end up having different rules for different data.
@@IAmTimCorey You mentioned sqllite and pouchdb. but just curious which ones you liked working with personally and have used for any given project. Do you usually build your own... i know it all depends, just wondering what you have worked with and liked
Tim I've been following you for years and this was the first video of yours that I didn't like. you talked about a common problem for all developers, but you didn't give any solutions. only brought questions and no answers.
This is because I took you as far as I could. Each situation is specific and needs to be handled that way. There are high level concepts that we can talk about (this video), but I can’t say “do this”. Even for your specific situation, you will need to do things differently for different parts of your data. Offline data is HARD.
You explained the different situations but you didn't actually give us any techniques that we can you to resolve those situations 🤔
I got you as close as I could. Even for your specific situation, you will probably mix and match these solutions. Offline data is either simplistic (read-only) or it is a custom solution for a given situation. Anyone that says “just do this” is incorrect and giving bad advice. Offline data that isn’t just read-only is HARD!
@@IAmTimCorey Thanks Tim for all your efforts we really appreciate it.
You use one drive and all of the rest. C'mon man, say it. Say it that it's Google drive 😂 🥴😜
I actively avoid Google drive. Google has burned me too many times with cool tech that they've dropped.
@@IAmTimCorey 😆🤣