Live data from Hacker News

Local-first software: you own your data, in spite of the cloud

blog.acolyer.org

181–190 of 243 posts

Re: Local-first software: you own your data, in spite of the cloud

#181
post #5

any marginally successful "local-first" app is going to go and raise $10m in vc, switch to software as a service, and add an enterprise mode that requires user permissions and data access to be managed on the server

I don't see what's wrong with that. Local First really just means distributed, fault tolerant, and eventually consistent but designed for user devices instead of a cloud "scale" service.

Why couldn't an enterprise run a "device" (a server) which others can easily sync to ("sync.enterprise.com") and which also only allows authorized users to access data which they're allowed to access? Maybe using Macaroons or something and devices can still sync locally via Bluetooth, Wifi, or whatever.

Now you have a full back up of everything on that server which IT could now more easily ensure it backed up, secured, and etc.

Not to mention the same idea could be used by a normal person just running a NAS at home or a server in DO/AWS/GCS/etc.

Re: Local-first software: you own your data, in spite of the cloud

#182
post #129
post #56

As far as possible, I'm following a local-first methodology for a recipe search, meal planner, and shopping list application: https://www.reciperadar.com There's a 'collaboration' mode which allows peer-to-peer sharing of a session via CRDTs over IPFS. My partner and I select our meals for the week, and then when one of us is doing the shopping, we can mark ingredients as found -- the other person's view reflects tho…

Thank you for the peer-base link. I've been investigating data storage on IPFS for application interop and I love the idea about using an existing library rather than re-inventing one. I will definitely be taking a closer look at this project.

yes, lots of good things happening on top of IPFS already. Also check out Textile & 3Box.

Re: Local-first software: you own your data, in spite of the cloud

#183

Earlier quoted context omitted.

> It's a self-hosted solution with a web UI That sounds great, thanks! Is there an easy way for me to distinguish photographs from my photography work from snapshots I took with my phone? By the way, your "Get early access" button does nothing on Firefox beta with uBlock/Privacy Badger. > People post pirated, abusive, and generally bad things Oh ugh :( I was hoping this would be curtailed by the fact that this servic…

> Is there an easy way for me to distinguish photographs from my photography work from snapshots I took with my phone? Yeah! You can browse by camera (and by lens). Thanks for the heads-up on the get early access button issue! The link just scrolls you down to the bottom of the page where the login form is. I use FF with privacy badger and ublock (and a pihole) on linux and android, and both of those work. What OS ar…

> Yeah! You can browse by camera (and by lens).

That's not entirely helpful because I have multiple cameras... Is there something like a smart category where I can specify multiple cameras, or directories, or something like that?

I'm running 71.0b5 (64-bit) Ubuntu, by the way.

Re: Local-first software: you own your data, in spite of the cloud

#184

Earlier quoted context omitted.

With regards to identity management, maybe there should be a formalized integration between browsers and password managers such that the concept of "registration" goes away and new logins just automatically create user accounts with default permissions, according to email address.

Centralized identity management was the grand promise of OAuth. It seems that somehow ended up, in most practical applications, as a "login with Facebook" button. There are a number of startups working on simplified or "passwordless" auth, but it seems that none have substantive traction. I'd love to be proven wrong, here, though!

The Web Authentication API is already implemented in the major browsers (excluding old IE and Safari). https://developer.mozilla.org/en-US/docs/Web/API/Web_Authent...

Re: Local-first software: you own your data, in spite of the cloud

#185
post #139

I spent a lot of time with photos (Picasa) trying to do this peer to peer - this is what we built in the 2002 era. Here are a few issues: 1. Identity is hard to do on the LAN, so any sharing ends up using the cloud to figure out who has access. Similarly, identity is hard to move around, so representing your Facebook comments feed outside Facebook is difficult to do. 2. Any time you have a "special" server that handl…

Thanks for taking the time to share this! The issue I face with PhotoStructure is that people's home network frequently has throttled upstream rates. I'd love to provide a caching CDN, but I want all content encrypted. I don't want my pipes to see any data from my users. How would you do perfect forward secrecy when only the library owner's key is available at upload time? Is it possible? If not, it seems that every…

One option is an envelope keys.

Content is encrypted and published by the owner, but the owner uses a new random key to do the encryption. This new random key is the "envelope key."

The owner then takes the envelope key, encrypts it with the public key of recipient A, and publishes the encrypted message containing the envelope key. (This message with the envelope key should also be signed by the owner using the owner's private key.)

Anyone who obtains the envelope key effectively has read-only access to the content. The owner can publish a separate message with the envelope key, all these messages have recipient B, C, and D's different public keys, so if you are a recipient you will want to know which message is likely to be encrypted by your public key, after which you can decrypt it to get the envelope key.

The owner also needs to sign the content. Signing the content and later verifying the content is done with the owner's public/private keypair, not the envelope key.

A glaring weakness of envelope keys is that the recipient can share the content freely once they have it. There's no content protection after the content and the envelope key are published.

The recipient can easily just share the envelope key if they want to. But they can also just copy the content (once they have decrypted it).

Re: Local-first software: you own your data, in spite of the cloud

#186

Earlier quoted context omitted.

Yeah. I was definitely very AdHoc. A typical grocery store here in the US has about like, what, 20k SKUs? But I personally only really deal with maybe 200 of those, so at the time I just managed the data manually. (Plugged that USB scanner into a laptop and scanned every item into Excel --Scan, type. Scan, type. Then imported that into MySQL.) I looked into data providers mostly because I wanted item photos. (Ultimat…

Why did you stop using this scanner setup?

but abandoned it when we hired a nanny who took care of cooking

Re: Local-first software: you own your data, in spite of the cloud

#187
post #120

Earlier quoted context omitted.

Thanks! Having to experience the inventory management problem regularly certainly helps inspire & validate solutions :) The setup you had sounds extremely cool - did you hit any particular challenges around the SKU data wrangling? I've added a naive rules-based approach to categorizing products into supermarket departments (bakery, fruit & veg, ...) - it's really barebones at the moment, but already helps planning wa…

Yeah. I was definitely very AdHoc. A typical grocery store here in the US has about like, what, 20k SKUs? But I personally only really deal with maybe 200 of those, so at the time I just managed the data manually. (Plugged that USB scanner into a laptop and scanned every item into Excel --Scan, type. Scan, type. Then imported that into MySQL.) I looked into data providers mostly because I wanted item photos. (Ultimat…

I like systems I've seen in Europe(eg Carrefour) much more, where you get a handheld scanner and scan your items as you put them in the cart. When it comes time to pay you just put your scanner back and swipe your credit card.

Re: Local-first software: you own your data, in spite of the cloud

#188
post #56

As far as possible, I'm following a local-first methodology for a recipe search, meal planner, and shopping list application: https://www.reciperadar.com There's a 'collaboration' mode which allows peer-to-peer sharing of a session via CRDTs over IPFS. My partner and I select our meals for the week, and then when one of us is doing the shopping, we can mark ingredients as found -- the other person's view reflects tho…

This is really neat, thank you for sharing and developing! I plan to use this to simplify mealtime in my household.

One note, as I have not used it much: the "Most relevant" sorting scheme (or perhaps just the search function itself) needs some love. I searched for "chicken" as the sole ingredient, and of the 10 results on page one, only the ninth result is a recipe containing chicken. Many of the rest are desserts. I'm guessing this works better when you include multiple ingredients, but I would think that if chicken isn't in a recipe, it wouldn't be included in the results at all. I'm curious to know if you have experienced this.

Re: Local-first software: you own your data, in spite of the cloud

#189
post #118

Earlier quoted context omitted.

This is neat. I developed something similar, but specifically for keto recipes: https://ketohub.io How are you parsing the ingredients? I went deep into the rabbit hole on that part and ended up spinning off a separate ingredient parsing SaaS: https://zestfuldata.com I wrote about the experience last year: https://mtlynch.io/shipping-too-late/

Awesome, hello mtlynch :) It's great that you found this post; as it happens I'm using your fork of nytimes/ingredient-phrase-tagger (thanks a lot for updating and containerizing it!) in combination with 'ingreedypy' for ingredient parsing. How's zestful doing? It looks great and I did consider using it; the quantity of parsing I was doing led me to choose the container version just to keep my own operational costs d…

Oh, cool! I'm glad it was helpful.

Zestful's doing okay. It's in maintenance mode at the moment, but when I have spare time, I like to tinker with it to bump up the accuracy. Customers seem to mostly use it in big bursts, so it'll be a few thousand requests one month, then the next month, it'll drop to only a few dozen.

If you ever have patches you want to push back upstream to the open source tagger, I'm happy to review. And if you ever want to do a bulk parse of ingredients on Zestful, I can certainly offer volume discounts.

Re: Local-first software: you own your data, in spite of the cloud

#190
post #45
post #30

When I select software these are among the list of things I am looking for generally: - file formats that won’t lock you in or are even openly hackable (allows you to automate things) - no clouds that will break the software once it is gone - local storage with custom syncing or backup options - strictly no weird data collection or “We own the rights to your data”-Type of terms So if I get the slightest feeling of a…

While I fully agree with your selection criteria, please consider the other side of the equation, because engineering (and the world) is all about compromises. I am the author of a SaaS app ( https://partsbox.io/ ). I export in open formats (JSON), there is no lock-in, it's easy to get all of your data at any time. But the app is online and will remain so. Why? Economics. Maintaining a self-hosted solution is an enor…

> Believe me, if you don't have VC money to burn, you will not be experimenting with CRDTs and synchronizing distributed data from a multitude of versions of your application.

While you're right that doing this is less convenient, I can say with the personal experience of developing a few such projects on a shoestring that doing this isn't as hard or expensive as you're making out. It's entirely doable. It just requires thoughtful engineering.

Post reply on HN