99 points · by albertzak · 3y ago · 27 comments
One question: what are the front end options with Electric? E.g. can I use electric together with some front end framework (React/jQuery/anything)? Or should I stick to writing front end components using electric?
[1] https://electric-examples-app.fly.dev/user.demo-reagent-inte...
we use tailwind in IRL projects
From what I understand, this allows people to arbitrarily decide which portions of their DOM get's run in the client or in the server? Essentially allowing us to make SSR pages with client side code sprinkled in, wherever we want. If so, this seems like a really big deal for Clojure world.
It's been worked on for several years AFAICT. It's only very recently that it got a public release, but it was built specifically for use in Hyperfiddle, the company of Dustin Getz (also the same person who developed Electric Clojure).
I am not sure what is a good way to determine whether something is production ready, but I know its developers have been dogfooding it for a while now. The only real problem I see is lack of other companies adopting it leading to nobody else wanting to try adopting it. The other big problem is that it's hard selling people Clojure either because it is a niche language or the parentheses scares people away.*
* Note I use Clojure in my day job. I do not think either of these two points are a valid excuse to not use Clojure, but they are the most common excuses I see.
the thing predating Electric is in prod at a series B startup, a series A startup is going live with a prod support app in a few weeks, and a seed stage startup is planning a rewrite of a consumer facing productivity tool onto electric after serious evaluation. Plus many serious POCs i’ve seen maybe 2-3 dozen repos this summer. (we only see them when they have a question)
- Is this a lot of bandwidth when done over websockets? I was looking at the starter todo list on your github and everytime I type something a character into the todo list, I have what looks like 3kb of messages in the websocket passed.
- Is there anyway to get this working with multiple nodes? It seems like the way to use it is to bind it to a dynamic var that's only available in the library (`hyperfiddle.electric-dom2/node`)
wire protocol is in verbose mode, we have a binary mode as well. it’s also not optimized at all because users already report tangible performance as “incredible” “unbelievable” as compared to the status quo graphql or http RPC or whatever. remember, http transport pays a TCP round trip just to syn/ack the connection before any app payload is sent! Electric wire traffic is also differential, i.e. collections are never sent twice only what changed.