Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
matharmin
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
12 ms
·
91.
▲
by
matharmin
3y ago
As I read those caveats, it's pretty-much just "do all of this and you'll be fine". I practice, developers do often skip some steps, and it still works in 99% of cases, until you hit that 1% and have data loss. I'm
92.
▲
Using DNS to estimate the worldwide state of IPv6 adoption
(blog.cloudflare.com)
5 points
by
matharmin
3y ago
|
0 comments
93.
▲
by
matharmin
3y ago
I'd recommend doing these benchmarks with WAL mode and synchronous = NORMAL as well. It makes quite a big difference in performance especially with many small transactions (e.g. the first example that inserts without explicit transacti
94.
▲
by
matharmin
3y ago
You don't need JSONB for this - doing this with plain JSON is simpler and already faster than individual inserts for most bindings in my experience. I typically do bulk inserts using a single JSON argument like this: WITH ins AS
95.
▲
by
matharmin
3y ago
There are a couple of similar projects - ElectricSQL, cr-sqlite and PowerSync (which I'm working on) all support React Native.
96.
▲
by
matharmin
3y ago
SQLite does actually provide the mechanisms required to listen for changes via update hooks. It's unfortunate that many SQLite bindings don't expose that. I'm using it in a very simple way - automatically rerun the query if d
97.
▲
by
matharmin
3y ago
Thanks for the link, I haven't come across SymmetricDS before. The list of supported databases is impressive. It appears to be primarily aimed at server-to-server replication. It does support Android and iOS, but I don't see much
98.
▲
by
matharmin
3y ago
> How similar is this to MeteorJs minimongo collections? > Does this provide an architecture where a client subscribes to a collection and the server keeps track of which data the client has and only sends minimal update messages? It
99.
▲
by
matharmin
3y ago
IndexedDB is fine - just use some wrapped that makes it easier to work with. Our current SQLite implementation actually stores the underlying data inside IndexedDB - mostly due to a lack of better options (but that's busy changing with
100.
▲
by
matharmin
3y ago
I just scanned through the video, but it seems to focus on persisting client-side changes locally when offline, which only covers one part of the bigger problem. Difficulties quickly come in if you want to: 1. Persist large amounts of data
101.
▲
by
matharmin
3y ago
You're right that you'll have exactly the same issues if you use Date with a string. However, with a string date you can bypass the Date class completely in many use cases. My experience with this is anecdotal, but I've ran i
102.
▲
by
matharmin
3y ago
I find this concept is important in understanding causal ordering for distributed systems, for example in the context of CRDTs. For events generated on a single device, you always have a complete ordering. But if you generate events on two
103.
▲
by
matharmin
3y ago
We've been in business for over 10 years, and the company (JourneyApps) is profitable - we're not going out of business any time soon. Also see the other comments regarding our current status and plans around open source.
104.
▲
by
matharmin
3y ago
To expand on what prawnstar said - it's exactly because of this that we recommend using uuids as the primary key (uuid v4 specifically). While you can use integer ids, you need some workarounds such as pre-generating sets of unique ids
105.
▲
by
matharmin
3y ago
Thanks for chiming in! ElectricSQL is great - we see it come up a lot in discussions since on the surface it solves the same problems (syncing between Postgres and SQLite), despite the details being very different. I love seeing all the inn
106.
▲
by
matharmin
3y ago
You can do it in a consistent way, for example always store the timestamp at 00:00 UTC. But that's not obvious just by looking at the values, which is why it can be ambiguous. And when parsing those values, you could do for example (JS
107.
▲
by
matharmin
3y ago
> Also, for the replication piece is the SQLite bit actually important or could you actually support arbitrary backends and SQLite is just convenient? Eg could you support browser LocalStorage instead of WASM SQLite or is there some piec
108.
▲
by
matharmin
3y ago
Personally I prefer the shortened ISO8601 format (YYYY-MM-DD). While it's not the most efficient, efficiency doesn't often matter on that level. It's unambiguous, can be parsed by practically any library, and easily human-rea
109.
▲
Show HN: Bi-directional sync between Postgres and SQLite
(powersync.com)
356 points
by
matharmin
3y ago
|
105 comments
110.
▲
by
matharmin
3y ago
I see what you mean about promise chain cancellation, I misunderstood that part. You can still structure Promises using nesting instead of chains to get the same effect as with callbacks, but in reality I just use async/await instead.
111.
▲
by
matharmin
3y ago
De-facto doesn't mean it's the only option, it means it's the dominant option, and that is true. Promises don't have a built-in way to cancel chains (neither do plain callbacks), and I think that was the right decision.
112.
▲
by
matharmin
3y ago
How do you deal with shapes and permissions not being available yet?
113.
▲
by
matharmin
3y ago
How does this compare to Yjs/y-crdt?
114.
▲
by
matharmin
3y ago
SQLite's json1 works pretty well for arrays
115.
▲
by
matharmin
3y ago
SQLite comes up a lot on HN, but it's not PR - it's content that others find interesting, myself included. In most cases it's not even official SQLite content being posted, but rather other projects or blogs around it.
116.
▲
by
matharmin
3y ago
I can definitely see where ORDER BY in aggregates would be useful - I recently used it with Postgres, and didn't even know it's not available in SQLite. Often you can do the sorting in the app code, but it's nice to do direct
117.
▲
by
matharmin
3y ago
Azure KeyVault costs are about 10% that of the certificate (I think it's $6/month).
118.
▲
by
matharmin
3y ago
I'm probably not gonna get to a full post anytime soon, but I'll summarize here. This is from memory, so I may have some things wrong. 1. DigiCert CS certificate. You can validate your organization before paying anything, but it f
119.
▲
by
matharmin
3y ago
I recently went through this same issue at my company - only found out about the change in requirements when I couldn't renew my cert at the previous provider. There is surprisingly little info available on how to do code signing for W
120.
▲
by
matharmin
3y ago
SQLite is by far my favorite database for any client-side application - mobile and desktop (and perhaps embedded). I still wouldn't use it server-side for anything serious. While you can do it, especially with tech such as LiteFS, I mu
More ›