Live data from Hacker News

A Principled Approach to Querying Data – A Type-Safe Search DSL

claudiu-ivan.com

21–22 of 22 posts

Re: A Principled Approach to Querying Data – A Type-Safe Search DSL

#21
post #10

Earlier quoted context omitted.

any underlying negative consequences on letting prisma schema handle the underlynig model/migrations I found out about stackzen yesterday, really like the RBAC/ABAC backed up into the models/codegen stuff, been thinking about just using that for our custom logic and maybe add RLS pg a la supabase but also codegen from the same .zmodel from zenstack model that generates prisma models/migrations have it generate RLS sq…

Prisma doesn't cover plenty of SQL features. custom types, more complex indexes (like where clause). It is also a VC backed biznes, need to be ready to drop it at almost any time, SQL/postgres on the other hand is here to stay. RLS is hard to work with, hard to debug, hard to reason about, cumbersome. It is however powerful.

Right! for RLS i found out about atlasgo, which lets you do Schemas as Code including RLS stuff,

so my mind went to leverage the .zmodel to generate not only the prisma schemas through it and the client api codegen sdk, but also the RLS stuff either with plain sql migrations or a specific framework for rls.

all in all this is probably too much and as long as the app-api level is secure with zenstack and i dont use pg directly anywhere else it should be 'safe' i just wanted to harden all the stack speaking of sorts... idk

Re: A Principled Approach to Querying Data – A Type-Safe Search DSL

#22

> Users expect near-native responsiveness, even when offline Do they? I think users are amazed if anything works without internet with modern applications.

In my mental model of an offline app, I expect instant responses. However, I know to the complexities of apps, the diverse wants of a big, diverse user base that it can be hard/impossible for an app to be well-architected enough to achieve this ideal.

Failover is hard, and there generally aren't hard rules for what to do if data isn't available or how to communicate to a user in a specific offline situation on how the current state of an offline app affects what they see -- and even when they would care or what they could do about it when they do care

Post reply on HN