Hacker News new | past | comments | ask | show | jobs | submit | thruflo's comments login

It’s pretty remarkable what Bruin brings together into a single tool / workflow.

If you’re doing data analytics in Python it’s well worth a look.


thanks a lot for the kind words, James!


Ok, so PGLite is used in the Firebase Data Connect's emulator: a test utility, not even the client library.

It's a bit disingenuous to lump it in the same sentence and try to mislead user that Google's adopting Electric.


From https://firebase.google.com/docs/data-connect/data-connect-e...:

> Firebase Data Connect provides you with a local emulator for end-to-end prototyping as well as continuous integration and continuous deployment (CI/CD) flows

Developers at Google have chosen PGLite for those qualities so that users of Firebase Data Connect had better CI/CD workflows. It wouldn't be fair to say this is an insignificant use case.


Electric works with Expo / RN now.

PGlite is coming — we have a new WASI build that is the basis for native mobile support. (It’s working in dev, but still needs some more polishing and bindings).


Sorry should have mentioned that I need PGlite or SQLite support. I am very much looking forward to PGlite on Expo/RN!

As are we :) btw checkout LiveStore if you haven’t already:

https://expo.dev/blog/local-first-application-development-wi...

It’s not fully released yet but it is now open to GitHub sponsors and it’s very cool.


Oh this is very cool as well. Thank you for sharing. I hadn't heard of LiveStore.

Any thoughts on Flutter support? I believe that existed in the previous version of Electric.

What are you using for your WASI runtime?

A couple of things here:

- the WASI build is targeting WASI snapshot preview 1, and so should work in any compatible runtime.

- for the web, currently we use Emscripten, but we are considering moving to a single WASI build there as well. We'll be writing our own JS WASI shim if we do. Having full control of the JS code will help to solve some of the problems we've faced with Emscripten.

- we are also exploring a route to native where we take the WASI build and decompile it back to C. This seems a little mad, but it makes it possible to compile (with any tool chain) a native binary with a very minimal WASI-like api that can be linked to from any app. It essentially end up a little like the SQLite amalgamated header file as a build route. It's very experimental, and we haven't committed to it yet, but it looks like it may work.


This is interesting. Can you go into a bit more detail on why the WASM decompiling would be helpful as opposed to just using the native codebase?

Dynamic linking on iOS is complex, and Android also brings some toolchain complexities. It would be possible to do a native build and link it, and that is a route we are also exploring, but a single C file that can be linked with any existing toolchain would simplify things for users.

It also allows us to implement a VFS layer underneath PGlite in a native mode. So things like the in-memory VFS, or a custom VFS, would be possible.

We have not committed to one route or the other yet.


Hey, one of the things here is to define shapes that are shared. If you imagine syncing a shape that is that user’s data then it may be unique. But if you sync, say, one shape per project that that user has access to and a small shape of unique user data then you get shared cache between users who have access to each project.

It’s worth noting that Electric is still efficient on read even if you miss the CDN cache. The shape log is a sequential read off disk.


I'm curious on how you'd configure this. Is it common (and safe) to let a cdn cache private data for authenticated users?

Say Jira used electric, would you be able to put all tickets for a project behind a cdn cache key? You'd need a cdn that is able to run auth logic such as verifying a jwt to ensure you don't leak data to unauthorized users, right?


Yup, you can put an auth proxy in front of the CDN, for example using an edge worker.

See the auth guide: https://electric-sql.com/docs/guides/auth

Some CDNs also validate JWTs, so the CDN can be the proxy part of the Gatekeeper pattern (in the guide).


Another option too for scaling reads is just putting an nginx in your cluster.

Electric itself is quite scalable at reads too so for a SaaS use-case, you might not need any http proxy help.


Would be nice to add support for PGlite [0] to have the same “spin up in the browser” experience with Postgres.

Let me know if we can help with it!

[0] https://pglite.dev


That would be really cool, let's chat!

Can you email me brandon [at] outerbase [dot] com?


you can also find some code for "pglite in the browser" here: https://github.com/supabase-community/database-build


Awesome, I'll check it out!


We've actually also implemented Phoenix sync using Electric: https://hexdocs.pm/electric_phoenix/Electric.Phoenix.html

So you can have local-first sync in a Phoenix app using Electric. And you can use Electric to sync data into a LiveView using Phoenix.Streams, which is a very natural fit.

We have a couple of example apps showing things in action:

- https://github.com/electric-sql/electric/tree/main/examples/... - https://github.com/electric-sql/electric/tree/main/examples/...


Great stuff. Voice AI is great to run locally not just for privacy / access to personal data but also because of the low latency requirement. If there's a delay in conversation caused by a network call, it just feels weird, like an old satellite phone call.


ElectricSQL | https://electric-sql.com | PGlite Engineer | Remote in Europe or eastern US | €80-100k + Equity

We're looking for a generalist web and systems engineer to join the core PGlite team, working mainly in Typescript, Rust and C++.

PGlite (https://pglite.dev) is a lightweight, embeddable WASM Postgres. It's a fast growing open source project, with 8k GitHub stars and 100k+ weekly downloads. It opens up new possibilities for local-first apps and systems built on an embedded, real-time, reactive Postgres, such as https://postgres.new

Technically, you need strong Typescript and systems programming experience, ideally in C++ and Rust. It would be great if (but is not essential that) you're familiar with some aspects of database internals, filesystems and WASM.

We're a highly technical team working remote-first on a 4-day week. More information at https://electric-sql.com/about/jobs/pglite-engineer


Congrats to the Instant team. It’s a fantastic project. The DX is great and the engineering behind the datalog engine is really impressive.


Thank you! Awesome work with pglite as well, very exciting tech!


Electric does partial replication. It’s specifically a system for syncing a different subset of data onto each local device.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: