...
Upside Down Data Synchronization

Sunday • November 13th 2022 • 5:34:02 pm

Upside Down Data Synchronization

Sunday • November 13th 2022 • 5:34:02 pm

It is all fun and games, until somebody needs to synchronize UI data.

-- Abraham Lincoln


The CouchDB server, browser PouchDB, Svelte, Svelte Stores, and Svelte data binding along with and automatic User Interface updates, are pretty fancy.

The data synchronization approach where we wrap simple values, with information that makes the universally unique for the purpose of storage and tracking...

Makes synchronization, automatic, and synchronization is a very hard problem.


When you say a = 1; and x = a + a; x will equal two.

If if you ever change a, x will not automatically update.

In fact, x will try to slowly sneak up, and goose you.


Every programmer at this point will say, that it is supposed to be that way.

If things were any other way, nothing would work.

But that is not true on the User Interface and Network Data level, and to fix this, a lot of software has been written to over-complicate the matter.


This is a very big problem, of course.


The a + a example is just that, a simple example.

But monitoring variables for change, and updating all the necessary values is serious business.

Deep down programmers are ignoring this problem, because they can't understand it.


If you grasp this problem early on, while still learning basics of programming - you will become mighty.

And sure, such ideas seem wacky at first, but the more you think about all the technologies we created, the more delicious the CouchDB way looks it looks.


On the UI end at least, It maybe that whatever does not fit, the CouchDB to Svelte stores and automatic User Interface updates, just doesn't matter.


Even on the low operating system data level, having something as low level as, the RPMs of a fan, or the GPIO readout of an LED light, or whatever sensor, as a CouchDB style object.

Could change the world of programming, because whatever applications are showing that value - just updates automatically.

There is no specific Firebase, GraphQL, Server Push, WebSocet or whatever code involved here, just whatever makes the packets flow into view - a generic five line program to pass them on.


Finally, these little five line filters and views, is really all it takes to secure and shape data for various purposes.

These are just streams of similarly formatted objects, with a type or format, or kind property that matches a simple filter statement.

Oh sure, the world will never be ready for such drastic change, but you can still use it as a multiplier in your own programming to write nifty networked applications.