Better HN
topnewbestaskshowjobs
Log inSign up

dustingetz

7,912 karma · joined Sep 11, 2009 (17y ago) · 3,625 submissions

Founder Electric Clojure https://github.com/hyperfiddle/electric

https://twitter.com/dustingetz

Submissions

comment 3y ago · link · parent

for example it can scale the way persistent data structures scale, which is to say "O(1) within target operational bounds" despite technically being log-n with high branch factor)

comment 3y ago · link · parent

you're missing automatic/free linear scaling

comment 3y ago · link · parent

Summarizing, now edited down with some editorializing for clarity:

What is it? build web-scale reactive backends with an expressive java dataflow API. Instead of a database you develop your own custom app-specific indexes which are reactive, distributed and durable. It's like event sourcing and materialized views but integrated in a linearly scalable way.

> I cannot emphasize enough how much interacting with indexes as regular data structures instead of magical “data models” liberates backend programming

> It allows for true incremental reactivity from the backend up through the frontend. ... enable UI frameworks to be fully incremental instead of doing expensive diffs to find out what changed.

Ok, so in my mind I am positioning this against Materialized / differential dataflow, whose key primitive is a efficient streaming incremental join that works across very large relational tables. Materialized makes SQL reactive, Rama gives you a java dataflow DSL for developing purpose-built reactive database indexes.

How it works? 4 concepts: Depot, ETLs, PState, Query

Depots: "distributed, durable, and replicated logs of data." [Event streams?] "like Kafka except integrated" "All data coming into Rama comes in through depot appends."

ETLs: data arrives via depots, and is ETLed to PStates via "a Java dataflow API for coding topologies that is extremely expressive". "Most of the time spent programming Rama is spent making ETLs."

PStates seem like reactive data structures that are also durable/replicated, these are meant to supersede your database and indexes, letting you build custom purpose-built indexes that contain 100M elements:

> “partitioned states” are how data is indexed in Rama ... Unlike existing databases, which have rigid indexing models (e.g. “key-value”, “relational”, “column-oriented”, “document”, “graph”, etc.), PStates have a flexible indexing model. In fact, they have an indexing model already familiar to every programmer: data structures. A PState is an arbitrary combination of data structures. ... nested data structures can efficiently contain hundreds of millions of elements. For example, a “map of maps” is equivalent to a “document database”, and a “map of subindexed sorted maps” is equivalent to a “column-oriented database”. Any [composition] is valid – e.g. you can have a “map of lists of subindexed maps of lists of subindexed sets”.

Query: once you develop PStates to aggregate relevant data into a custom index of the right ... shape?, query seems sorta like GraphQL selectors over your custom index:

> Queries in Rama take advantage of the data structure orientation of PStates with a “path-based” API that allows you to concisely fetch and aggregate data from a single partition

> “query topologies” ... real-time distributed querying and aggregation over an arbitrary collection of PStates. These are the analogue of “predefined queries” in traditional databases, except programmed via the same Java API as used to program ETLs and far more capable.

comment 3y ago · link · parent

What is to fix? Gamblers gonna gamble, humans gonna human, markets measure sentiment, both sides of the market [founders and investors] violate the 7 deadly sins all day long – greed, pride, lust, envy, sloth, wrath, gluttony – all of it

comment 3y ago · link · parent

label the tradeoffs?

636.

Lineworkers: Keeping America's Lights On(contrary.com ↗)

1 points · by dustingetz · 3y ago · discuss

comment 3y ago · link · parent

AOL chat would bluescreen a Win95 box if someone sent a chat message like “}s\con\con” - }s was the directive to play a sound

comment 3y ago · link · parent

please state the value prop of doing that?

comment 3y ago · link · parent

I am not. I am a mission driven founder operating a sustainable business that is massively +EV for society at large.

> Is everything a grift though?

https://en.wikipedia.org/wiki/Principal%E2%80%93agent_proble...

Note I used the word "perception" three times in my comment.

"In mass communication, the important thing is not how things are but how they seem to be." https://en.wikipedia.org/wiki/Wiio%27s_laws

comment 3y ago · link · parent

it’s about accountability or perception thereof, mgmt thinks workers are working less hard without supervision. they cannot say it aloud due to backlash but corps are spreadsheet optimizing machines they cannot help but optimize the perceived inefficiency. and at your typical corp where a lot of the work is fake (or at least perceived that way by workers), who can blame either side? the workers sometimes grift (whether or not wfh) and the managers are even worse, grifting their way up the fake ladder by stealing credit and politicking, and the executives are by far the worst for grifting their employees (taking all surplus, layoffs, fake stock options), their customers (delivering trash products and rent seeking) and society at large (grifting the environment, creating monopolies, military contracts). Corporations grifters all the way up and down, who can blame anyone for trying to capture what money is on the table so they can give their kids a better life. if you don’t like it, join a mission driven startup or nonprofit (and leave the six figure salary behind!)

comment 3y ago · link · parent

you have a network from being a founder right? use your investor relationships to get a startup leadership job at a company with a fresh fundraise, you can also subscribe to the newsletters that aggregate financings this day/week like The Term Sheet. Or use your unicorn/enterprise customer relationships to come in directly under a SVP as say a consultant and network inside the org. that is how i would do it given your statements.

comment 3y ago · link · parent

continuing, article claim is that 5 years of US counter-intelligence investigation of chinese nationals has resulted in many unjust dismissed investigations and chinese scientists fear being accused.

643.

Types and Effect Systems (1999) [pdf](imm.dtu.dk ↗)

3 points · by dustingetz · 3y ago · discuss

comment 3y ago · link · parent

read textbooks instead most papers are obtuse and poorly written even famous ones. you can find them in wikipedia footnotes

comment 3y ago · link · parent

that account is fan fiction

646.

Golem Cloud: durable serverless workflows coded in any lang that supports WASM(golem.cloud ↗)

4 points · by dustingetz · 3y ago · 1 comment

comment 3y ago · link · parent

\ the ultimate

comment 3y ago · link · parent

Ah ok the question is, what exactly is being streamed and why, given that the input state, per the todo-app AST, should not yet be transmitted?

The traffic here is "program debug state" — the electric callback was called on the client, so the client informs the server of this in case the callback has server regions. As you rightfully point out, there are in fact no server regions in that callback — and this is known at compile time — so there is no need to actually send that information, it is pure overhead.

The missing optimization is basically dead code elimination – we simply haven't gotten to it yet.

Note that the traffic is broadcast, not request/response, which means the user experiences no latency as the client is not awaiting any response from the server, it is simply keeping the server informed. Due to this, broadcasting "program debug state" like this is basically free, which is why we consider this optimization premature. We are much more interested in visible perf issues (how fast it "feels").

FWIW we are unhappy with dom/on (used in that tutorial) and it is about to be superseded, and the chattiness you observed is derived from one of the aspects of the design that we are fixing (there should not be a callback at all, the input should return its reactive state directly.) But to be clear the pattern is perfectly functional, it doesn't have bugs, and users are succeeding with it.

comment 3y ago · link · parent

I've seen someone using a mobile webview with Electric, in this case its up to you if you share mobile and web backends or not. Electric can't tell the difference. Native mobile client is possible but not a priority (ClojureDart might be the best vector?)

comment 3y ago · link · parent

LiveView at 2 million clients on 40core/128gb box, limited by ulimit: https://www.phoenixframework.org/blog/the-road-to-2-million-...

discord uses websockets, here are some more links: https://www.reddit.com/r/elixir/comments/pophiz/server_specs...

we'll have seamless reconnect soon, which means the ws connections can actually drop when inactive (no heartbeats!) and then reconnect when the client wants something, so the forum use case should be quite fine. Not everything needs to be realtime server push, so refactor your code so that queries run on page nav or something. Electric is network transparent but that doesn't mean the network is opaque, the reactivity graph is in userland control (as declared by your AST) and the network data flow is implied by that same AST, same reactivity graph!

comment 3y ago · link · parent

we have styled examples including TodoMVC: https://electric-demo.fly.dev/(user.demo-todomvc!TodoMVC) -- note it is full-stack unlike other TodoMVC impls which are frontend only

we use tailwind in IRL projects

comment 3y ago · link · parent

the DAG overhead is constant not linear, the overhead is mostly the protocol in verbose mode not binary (the difference is large), and as I said we have done no optimization at all (just naively sync entire DAG replicas on both peers requiring far more traffic than actually required) because tangible performance is excellent so far. 1080p youtube is 1MB/s for comparison and our phones have no problem with that. Framing performance as a compiler optimization problem opens the door to using all of compiler and graph theory to super-optimize this

comment 3y ago · link · parent

you mean like multiple tiers, e/client e/server e/service1 e/service2? sure, we probably get to it next year unless a customer implementation needs it sooner

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.

comment 3y ago · link · parent

not SSR, all rendering is client-side, it’s frontend/backend state sync that Electric solves

comment 3y ago · link · parent

clojure.core/map is not incremental so you’d lose the performance benefit of reactivity at that call. Note React is not fine grain reactive and will over-compute loops; electric does not have that problem. also, e/for is just reactive map, we chose the for-comprehension syntax over lambda syntax because it lays out your UI code properly without making you feel like you’re programming with collections but it’s just sugar over incremental map. We could have shadowed clojure.core/map with reactive map, which would imply similarly shadowing clojure lambda with electric lambda, but we also highly value clojure/script interoperability, so anything we change in a way that isn’t 99% backwards compatible needs to get a new name. ergo, e/for. also note it’s really e/for-by (and e/map-by) because, like React, you need an extra “react key” parameter (they put it in a different place but the net effect is the same).

comment 3y ago · link · parent

electric has been a team effort, developed primarily by Geoffrey, Peter and especially Leo of https://github.com/leonoel/missionary who is the lead developer.

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)

comment 3y ago · link · parent

offshoring US to Europe costs about $30/hr, 1/2 time work means many context switches so 1/2 efficiency and it can take a few tries to fight the right person, so if FTE for 6+ months not affordable i am concerned that this is not going to give you the outcome you want (and be painful for both you and the freelancer), recommend trying to find an advisor who has successfully done this before to reduce risk

comment 3y ago · link · parent

it's not DK, it's sales. It exploits substitution bias: https://en.wikipedia.org/wiki/Attribute_substitution

"Thinking Fast and Slow" has a whole chapter on this with ample evidence

comment 3y ago · link · parent

firefox reader mode; works on mobile too
1
212223
121