Live data from Hacker News

Show HN: Bi-directional sync between Postgres and SQLite

powersync.com

11–20 of 107 posts

Re: Show HN: Bi-directional sync between Postgres and SQLite

#11
post #5
post #4

Earlier quoted context omitted.

SQLite has a number of functions to work with time but the underlying storage format is just going to be--depending on what precision/range of timestamp you want--a float or an integer... to the extent, of course, that SQLite has types at all (as it frankly doesn't, thereby making this question kind of moot).

SQLite has five types, documented here: https://www.sqlite.org/datatype3.html null, integer, real, text, blob It has a historically cavalier attitude to enforcing them (which I believe it inherited from TCL) but that changed in November 2021 with the release of strict table mode in version 3.37.0: https://www.sqlite.org/stricttables.html

> It has a historically cavalier attitude to enforcing them (which I believe it inherited from TCL)

Richard Hipp (inventor, principal dev of SQLite) called it “manifest typing”[0], indeed likely inspired by Tcl[1], of which he is a Core Team member emeritus, and of which SQLite was initially born, as a loadable Tcl package.

[0] https://www.sqlite.org/different.html

[1] https://wiki.tcl-lang.org/page/Everything%20is%20a%20string?...

Re: Show HN: Bi-directional sync between Postgres and SQLite

#12
Thank you - it’s great to have an alternative to electric-sql.

I actually need a local first, disconnected framework. What many people don’t realize is that even in the US, there are many parts without any network connectivity like our parks and preserves. Rangers still need to make queries in those areas.

Re: Show HN: Bi-directional sync between Postgres and SQLite

#16

I couldn’t tell whether I could integrate my SQLite app with my own Postgres database? E.g. is it free to self host, and the paid services are a convenience? Or the cloud hostage is mandatory?

You can use any Postgres database as long as it supports enabling logical replication and PowerSync can connect to it. Details here: https://docs.powersync.com/usage/installation/database-setup

The PowerSync Service is currently a hosted cloud service. A self-hostable version is coming soon.

Re: Show HN: Bi-directional sync between Postgres and SQLite

#17
post #10

Sorry, unfortunately I am a bit lost on what this does (on my phone, so couldn't see the demos on the website). I'm an android developer, but I am not sure what this would do. Do you have an example of an app/backend at which you can explain where Powersync helps?

The goal is basically to help you build offline-first apps. In the offline-first paradigm, app code works directly with a client-side embedded database, which automatically syncs with a backend database in the background. This is in contrast to cloud-first apps which primarily use a cloud datastore via APIs. Working with a local database (e.g. SQLite) means that apps feel instant to use because of low latency, and re…

Oh that's very interesting. I guess it's easier to deal with "only" sqlite than to have a store, keep track of mutations, and then upload/download the mutations when the device is reconnected.

Re: Show HN: Bi-directional sync between Postgres and SQLite

#18
Heads up:

The submission link https://powersync.com/ results in ERR_ADDRESS_UNREACHABLE

You linked the proper landing page here: https://www.powersync.com/

Your web infrastructure doesn't redirect root visitors to www (or pass those requests on to your web server)

Post reply on HN