DEV Community

Cover image for Good Bye CRUD APIs, Hello Sync: Realtime PostgreSQL with ElectricSQL

Good Bye CRUD APIs, Hello Sync: Realtime PostgreSQL with ElectricSQL

Athreya aka Maneshwar on October 29, 2023

The Tangle of APIs: Are We Over-Complicating Interactions? Every action on a web application triggers a cascade of network calls. Take t...
Collapse
 
deathwaiting profile image
ahmed galal • Edited

What about data abstraction and aggregation, business logic validations, reporting, monitoring, logging, integration with other services and so on.
Will all this be on the client side as well.

This seems applicable only for very simple/prototype applications, I am not sure this can scale well ...

Collapse
 
scibarite profile image
Rafael

The title says goodbye CRUD APIs, not goodbye to "data abstraction and aggregation, business logic validations, reporting, monitoring, logging, integration with other services and so on"

The purpose here is not scaling up, but scaling down: utilizing simpler approaches for simpler problems.
Which seemed to be a forgotten art for a long time, and now finally back.

Collapse
 
deathwaiting profile image
ahmed galal

I think we are on same page that this works only for very simple solutions.
I am not against using simple solutions to simple problems, but I would prefer a solution that also gives flexibility to extend the application.
Otherwise the oversimplified solution will just be road block.

Collapse
 
cbreezier profile image
Leo Huang

The new becomes old, the old becomes new again.

Direct SQL access, then rpc, then rest, then back to direct SQL access via this electricSQL. Have we learnt nothing?

Also, sounds like Meteor - what's different about this?

Collapse
 
leob profile image
leob • Edited

Apples and oranges - Meteor doesn't proactively/optimistically fetch and locally cache data changes - I think that's what sets this solution apart ... I just wonder how feasible this is and how well it works in reality.

Collapse
 
lovestaco profile image
Athreya aka Maneshwar

Right

Collapse
 
mrgoonie profile image
Goon Nguyen

The history repeats itself 😊

Collapse
 
lovestaco profile image
Athreya aka Maneshwar

:D

Collapse
 
leob profile image
leob • Edited

Interesting idea, in theory I can see this work - its practical viability depends on how well this has been implemented (i.e. all of its corner cases).

Found this interesting enough to bookmark it.

P.S. people who compare this with Meteor and say "what's new" have not read the article, or have missed the point: it proactively fetches and locally caches data changes to eliminate roundtrip "lag" ... just wondering how well this works in reality.

Collapse
 
apassiondev profile image
Andrey Ho • Edited

After HTMX, here ElectricSQL comes. There are always incredibly innovative engineers who are more than ready to put this industry into a loop.

Collapse
 
imshivanshpatel profile image
SHIVANSH PATEL

Do we have anything like this for MongoDB

Collapse
 
mrgoonie profile image
Goon Nguyen

You probably want to look for MongoDB Change Stream

Collapse
 
rolagit profile image
Rocco Lagrotteria

Maybe Realm + Atlas
mongodb.com/docs/realm/

Collapse
 
chimon1984 profile image
Ryan Edge

If you're a Flutter user you might be better off opting for Powersync.

Collapse
 
drdamour profile image
chris damour • Edited

The security implications of this are hard to fathom. So i can just run some ecma in my console and create 1M comments on a site?