As hinted in the previous post, this v0.4.0 release is a MVP to show sync between different devices using slightly patched tarpc . Currently sync works between desktop and desktop, desktop and mobile when they are on the same LAN/WiFi.
The schema of
note table is updated to have an extra
uuid column to uniquely identify and dedup records for sync. At the end of sync operation, both devices will end up with same set of
uuid by appending the diff from the other device.
Mobile device can scan a QR code encoding the server address and port to connect to the server to start sync.
iOS sync screenshot:
Desktop server screenshot:
This release also hides ssb sync, public and image screenshot from UI to keep things focused.
I have not cut a release yet, but the work-in-progress Local Native v0.4.0 introduced a new
uuid4 field into
This serves as a unique key for each record, syncing between different devices could leverage this new column. Actual code for syncing is still yet to be written. The idea is uuid4 could be used as a record identifier to compare with records with other devices.
I considered using key based on actual content, but decided that's too much and preferred true randomness.
To migrate v0.3.x schema to v0.4.0, an upgrade sub module is also written to create a
meta table with
This schema change might already break the ssb sync code.
I tried to tackle the syncing problem before. The wired sync is not convenient. Sync via ssb the keys setup steps seems cumbersome (Yes, some UI could be put on top of it to make it feel better), but there are 3 real issues I see it is not fit to at least my desire:
I decided sync over LAN or WiFi when devices are on the same local network with a different protocol should be my next bet.
So what protocol?
I started higher on the stack, even looked at GraphQL, then just try to spin up HTTP server in rust, then hit some build error on Android for
openssl. The dead body of
localnative_sync is the experiment.
Maybe I don't need full HTTP(s) server but just RPC?
So here it is, the code now have tarpc as a dependency.
Like any FLOSS libraries, those supported by large players might have a better chance of being actively maintained and being aligned with the "trend".
gRPC is HTTP/2. It is good for bidirectional communication between components in server farm(s). gRPC-Web now allows web client directly connected to centralized server(s).
I also recall in the old days we 8 teenagers rushing into an internet cafe, ironically it's not connected to internet but just 8 PC connected to a router. Then the group just playing StarCraft for hours, no cloud subscription, no need for earphone but directly shout to your teammates, and you can also shamelessly perform physical distraction to your enemy commanders for the win.
I miss those days.
This release adds QR code display for url.
Maybe the biggest drawback of not using a centralized service is losing the "convenience" of everything synced on every device.
There are definitely plenty room for improvements, some known ones among many others:
However, given this release now satisfied my day to day bookmarking needs, my limited spear time will be mostly on trying more aspirational things.
This serves as the proof that one has a choice to not use a centralized service to manage web bookmarking and note taking.
It seems applications today are "Cloud Native" by default. For end user, it becomes expected for a "meaningful" application to have all its data available on all the devices all the time. However this assumed convenience comes with drawbacks:
What if things are stored locally natively?
When I was implementing the type ahead search for Local Native App, a brute force database query upon every keystroke just worked. Scaling issue seems goes away if you do not need to deal with network latency and multiple users competing with each other for CPU. I start to appreciate how fast the hardware becomes today.
Enough said about privacy (freedom) concerns.
I used to have tens of social media profiles out of curiosity to checkout "what's on the internet". Util time itself becomes increasingly limited resource, and I figured most of the time I just need a bookmarking tool for the internet, so I can go back to something quickly, and maybe also run some SQL against those url and tags myself.
What if things are stored locally natively?
Without a traditional remote server, syncing across devices does become a challenge, but opportunity may lie here as well. Local Native App currently is able to sync via ssb, with some serverless setup first.
Toolchains today seem are all for centralized services, but 15 years ago where are those toolchains for modern mobile and web apps?
Mozilla 上有人给了一星，好像和 Waterfox 有关，“被迫”要上线网站提供上下文。
用 s3 redirect 不行，怀疑是
.app 哪里强制用 https 的问题。