Live data from Hacker News

A future for SQL on the web

jlongster.com

101–110 of 227 posts

Re: A future for SQL on the web

#101
post #74
post #47

Earlier quoted context omitted.

Tim Cook basically lied to Congress when he stated that developers can create web apps as an alternative to using the app store. Edit: In order for this to be true, Apple (at the very least) needs to enable push notifications and an install prompt for progressive web apps.

Apple did plan to make web apps first class on iPhones. But changed their minds when developers complained about not getting hard metal access. Maybe they thought that supporting web apps would get them more apps, but developers gave them apps for free and it allowed Apple to have a monopoly. Microsoft tried the same with their phones but somehow failed... Google went the web app route on ChromeOS with decent success…

Makes sense because even my oldish Macbook Pro goes into afterburner mode trying to browse the modern Internet.

Re: A future for SQL on the web

#102
post #53
post #47

Earlier quoted context omitted.

Tim Cook basically lied to Congress when he stated that developers can create web apps as an alternative to using the app store. Edit: In order for this to be true, Apple (at the very least) needs to enable push notifications and an install prompt for progressive web apps.

If you add the website to homescreen (make it an “app”) then the 7 day storage limit does not apply. This makes total sense to me, and I’m happy Facebook can’t store tracking data in my Safari for longer than 7 days.

> I’m happy Facebook can’t store tracking data in my Safari for longer than 7 days.

They’re storing it somewhere, no? I feel like the benefit here is more so the browser file system doesn’t get bloated

Re: A future for SQL on the web

#103
i wonder if it's possible to plug any kind of streaming replication onto this. i don't have much sqlite experience, but maybe someone here has an idea if it would be possible to run litestream or something of the sort, as both master and slave - in the browser.

that would solve the safari indexeddb 7 day ttl issue to start with.

and if replication could be made to work on top of something like webrtc we're looking at a great foundation to start building distributed, decentralized browser apps.

Re: A future for SQL on the web

#104

Earlier quoted context omitted.

Came here just to say this. Each SQL program needs to run on a blockchain so that there's no central authority that can unduly influence the data.

I legitimately can no longer tell if this was being suggested sarcastically, or if you guys are being serious.

[x] Yes.

Re: A future for SQL on the web

#105
post #6
post #2

What's kind of bonkers here is that IndexedDB uses sqlite as its backend. So, this is sqlite (WASM) -> IndexedDB -> sqlite (native). The Internet is a wild place...

I'm going to build a business that offers SQLite as a web service. It will be backed by a P2P network of browser instances storing data in IndexedDB. Taking investment now.

First, you need to write an ipfs implementation that uses indexedb so that can handle the sync ...

Re: A future for SQL on the web

#107

I stopped reading after this "If you are writing a web app today, you’ll probably choose IndexedDB to store data. It’s the only option for something database-like that works across all browsers." RDBMS all the way baby

Then you stopped reading before the part where he implemented SQLite using IndexedDB for the storage, thereby completely missing the point.

It's a fun article, I'd recommend trying reading all of it.

Re: A future for SQL on the web

#108
post #47

> browsers may delete your IndexedDB database under certain conditions Safari will happily delete your IndexedDB database after 7 days of inactivity. It deletes "all of a website’s script-writable storage after seven days of Safari use without user interaction on the site". That includes: - Indexed DB - LocalStorage - Media keys - SessionStorage - Service Worker registrations and cache Source: https://webkit.org/blog…

Tim Cook basically lied to Congress when he stated that developers can create web apps as an alternative to using the app store. Edit: In order for this to be true, Apple (at the very least) needs to enable push notifications and an install prompt for progressive web apps.

But it's totally a valid option to have an app that is a web app and does not have push notifications. For the vast majority of apps regardless of platform, I absolutely do not want push notifications. It seems bizarre to consider that feature as a litmus test for whether the web is a usable platform on iPhones. Would you also require web apps to appear in the App Store in order to consider a web as a usable platform on iPhones?

Re: A future for SQL on the web

#110
post #48

Earlier quoted context omitted.

I wish every browser does that! Web site has no business storing data on my computer more than 4093 bytes (that is already too much) per domain in my computer just because I visited a web page. 10 MB - 10GB of data is too much.

Yes, send all your data to someone’s server instead.

If you're concerned about a web site silently having access to personal data from your phone, surely it doesn't matter whether that web site is storing it silently in your device's browser storage, or storing it on the web site's servers.

If, on the other hand, you're explicitly uploading or entering data on a web site, well then yes, the default assumption would certainly be that the data is getting saved on the web site's servers (if it's being saved at all). That's how the web has worked for a very long time, with the exception of cookies and a few other more recent but not widely known storage mechanisms which in most cases aren't considered sufficiently robust for persistent on-device storage.

Post reply on HN