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 2y ago · link · parent

Ok, then this constraint (casual, personal-sized data) should be the headline as the entire architecture is downstream of it

comment 2y ago · link · parent

this gives up relational query, i.e. you knowledge graph is no longer a graph. Notion, Roam and Tana all require relational query. What real world app category are you attempting to model that matches document structure? If the domain can be modeled as topic documents and the documents are small, like an individual google doc, sure this set of constraints may be useful. But that does not match PKM!

comment 2y ago · link · parent

PKM apps are trees of strings! It's fast until its not. Even if you can sync the global dataset to the device storage, the query engine needs data in process memory and still has to traverse it with device levels of compute not cloud compute, "instantly" i.e. without making the UI feel sluggish. If you feel otherwise, use Roam or Tana for a year, even in single-player mode. The entire category is bottlenecked on this scale problem. And now add team support, because you want to sell this to teams and make money, right? Designing for casual, personal-sized datasets is a viable architecture in very few apps. Google Maps is one shining counterpoint, because the content has a natural locality to it – you only need to sync content near where you are geographically!

comment 2y ago · link · parent

I'm not talking about media content, rather database records. PKM apps host in-process relational queries, the records must fit in working memory and query engine must traverse the working set indexes to return answers "instantly"

comment 2y ago · link · parent

Inability to scale with sustained usage (1+ person*year of data) is the fatal problem with this category in existing approaches. Root of this is primarily the “partial sync problem” - when dataset outgrows both the memory and compute resources available in the client device (which is unreliable, not under your control to make reliable, and resource constrained - and not everybody has the latest giga device), you have to somehow decide which working set to replicate. If the app structure is a graph and involves relational queries, this is undecidable without actually running the queries! If the app structure is constrained to topic documents, you still have to choose which topics to cache and it still falls over at document sizes easily seen in prolonged solo use let alone use at an enterprise which market is necessary to justify VC investment. All this in an increasingly connected world where the cloud is 10ms away from city/enterprise users (the $$$) and any offline periods (subway etc) resolve quickly, so a degraded offline mode (letting you edit whatever you were last looking at w/o global relational query etc) is often acceptable. Oh, and does your app need AI?

Change my view!

comment 2y ago · link · parent

disable notifications for unknown senders - ios has this hidden deep under notifications setting

comment 2y ago · link · parent

yes, podcasting is a goto market strategy. One reason there are so many VC podcasts is because it is how GPs (VCs who fundraise) reach LPs (the money that invests in venture funds).

comment 2y ago · link · parent

> If you write regularly and you're not using AI, you simply cannot keep up with the competition. You're out.

What? No! Content volume only matters in stupid contests like VC app marketing grifts or political disinformation ops where the content isn’t even meant to be read, it’s an excuse for a headline. I personally write all my startup’s marketing content, quality is exquisite and due to this our brand is becoming a juggernaut

comment 2y ago · link · parent

if the log is as efficient and scalable why is MVCC even a thing? TBH the description on wikipedia looks identical to Datomic to me, minus the persistent data structures. Does it just come down to rectangular fixed width structs of RDBMS give better query performance?

https://en.m.wikipedia.org/wiki/Multiversion_concurrency_con...

comment 2y ago · link · parent

That's right, I have a blog post cooking up about why Electric is for experts today. A major factor in this is because, like with Clojure, the users aren't paying us, so the documentation you want cannot yet afford to exist. Another is performance - to get Electric to purr you have to understand what you are asking the computer to do (I've seen the stuff senior engineers type with their AI codegen tools, that approach is simply not viable here, at least not yet). The net impact of these two factors is that if Electric is not obviously the exact thing you know you must have—i.e., you are already succeeding or have the possibility of succeeding with something else—there is high risk that your adoption will not succeed, leaving you frustrated and unhappy! Failed projects do neither of us any good, that is a recipe for a damaged brand.

A bonus third factor is that the demos we've been cooking up internally—that we haven't revealed yet—are so f%cking incredible that everyone is going to be motivated to use and learn it anyway because Electric yields value that is previously unseen and unavailable anywhere else. So I am simply setting healthy expectations for success. For example, we just built the 80% that matters of the “sync engine” value prop in two weeks and 100 LOC. Implementing it in userland requires 1 LOC per query. With differential network traffic for over the wire O(1) remote incremental collection maintenance! for free! And the pattern works with any database!

comment 2y ago · link · parent

They shipped and scaled Clojure!

comment 2y ago · link · parent

Rich said (in a random podcast, which was not widely circulated - possibly Cognicast) that their mission with Datomic Cloud was for it to be the easiest way to get started with clojure. He even used the word “Easy”! (unless i misremember, this needs to be checked). Anyway, Cloud had consumption based pricing and developers, companies, and even hobbyists are all accustomed to paying for managed cloud infrastructure. To me this seems like a viable strategy, and devs would have forgiven the previous licensing issues -- we just want to get paid to play with cool toys at work, you gotta work the money stuff out with the bosses.

The problem with Cloud was that it didn’t deliver on easy. It was not the Heroku they envisioned, rather it was a scary AWS amalgamation that required deep AWS knowledge to debug their CloudFormation templates to get it to work. This is not even really their fault!, as CloudFormation is a dumpster fire, there are much better cloud orchestration tools now. And while AWS's first few products were rock solid (S3, EC2, DynamoDB), around this time is when AWS turned on the enterprise growth machine and pivoted into box checking and everything cloud began to turn to quicksand underneath their feet.

On top of cloud quicksand, Datomic Cloud had technical scalability challenges which they brute force engineered through, motivating the architectural shift away from the easy synchronous/local entity api to the annoying async/remote client api, and then back again sorta with Ions -- but at the cost of, like, 3 years of product roadmap, during which time Typescript exploded in popularity, the serverless hype cycle began to break and SQL started making a comeback.

Also, the Java API had poor adoption. selling predominantly into Clojure commercial users isn’t a great market so consequently: no VC, small team, no sales/marketing/devrel - at a time when the startup boom was gaining momentum, developer infra was getting funded for the first time so competitors were spending tons of money on beautiful docs, marketing, full time twitter accounts, etc.

I still think there’s elements of an amazing product here, but the business window for a Clojure database has kinda closed - because Clojure itself has lost momentum. Datomic Cloud at its essence is a clojure hosting platform, the business is Clojure itself. I am very bullish on Clojure, I think it never found its killer app, and once found, once a money vector is opened, a bunch of cash (like, $100M†) will make all these problems go away and deliver on Clojure's mission to bring "simple made easy" to mass market application development, which is desperately needed. Maybe Hyperfiddle & Electric?

† Paraphrasing a Materialize press release, “it takes $100M to build a production ready database” -- and for the record, Materialize isn't doing too well, nobody seems to know what it is for and the VCs replaced the CEO earlier this year. Full quote: "Why did we raise $100M? Put quite simply, we believe this is the order of magnitude of investment that it takes to build a production-ready database. Databases are notoriously hard to get right, and we do not intend to cut any corners."

In the end, Cognitect chose to spend their lives doing something hard that matters, and I deeply respect that.

comment 2y ago · link · parent

it is hurting sales and brand, the underlying problem is that to dramatically increase performance requires recomping both the tech team and the management and likely also the executives whose decisions shape and limit the org in the first place. In any org, the #1 priority for everyone involved is to keep their salary flowing, which means not replacing themselves with someone better.

comment 2y ago · link · parent

org chart has been shipped (excel labor cost model actually)

comment 2y ago · link · parent

that’s pretty much how windows update works (or used to work) to attempt to hot patch certain things without a reboot. Compiled functions in windows DLLs have a 5 byte prologue of nop instructions which is just long enough to overwrite with a jmp instruction to hook the function call and redirect it. https://devblogs.microsoft.com/oldnewthing/20110921-00/?p=95... In WinXP they started compiling this nop prologue in on purpose due to how useful it was. Before that, reverse engineers would need to get a bit lucky and find “room” for a jmp in some code path that was guaranteed to hit, in order to patch an executable without crashing it (iirc, i’m fuzzy on the details). Anyway, certainly not impossible, and we’d al be surprised by what can be made practical if the need is great enough.

comment 2y ago · link · parent

the reddit discussion claiming this is AI nonsense: https://www.reddit.com/r/TheoreticalPhysics/comments/1fbij1e...

comment 2y ago · link · parent

why not call an OSI approved license “OSI approved license”?

comment 2y ago · link · parent

curious roughly what was your structure?

comment 2y ago · link · parent

I think every clojure programmer has; thinking alone can only get one so far. Electric is the result of contributions of multiple 4-sigma engineers who I have worked closely with over the years. Projects like this are larger than any individual; genuine progress requires collaboration.

comment 2y ago · link · parent

3- yes, Electric Clojure is a Clojure library (macro) so the interop story is identical to Clojure’s

2- Electric vars are reactive signals and stock prices are signals, so: (if (< price target) ($ Modal))

1- we can support microservice topologies (N sites) in principle though the work requires a corporate design partner to make sure we get it right.

This is an important capability for the Hyperfiddle layer - a Universal UI is only as valuable as the data it reaches; i.e., as far as RAD platforms go, service connectivity is the only thing that matters. Today, connecting a service to a UI requires immeasurable amounts of glue code (constantly shifting, breaking, requiring ongoing maintenance) at the cost of ~$100k+ per year per service connection, and costs grow superlinearly with complexity of the service! Electric collapses to zero the cost of service connectivity.

comment 2y ago · link · parent

Haven't personally encountered this yet – it seems keeping some stale servers around and routing to them would be sufficient? Long term, over-the-air upgrades (hot migrating connected clients) seems within reach, if a bit researchy - but the durable workflows projects seem to be making headway on the problem

comment 2y ago · link · parent

ha nooo i think he said: “i am looking for something more flexible” than the immutable REST payload POC we were playing with at the time (this was 8 years ago). He was right!

comment 2y ago · link · parent

Re. performance - Electric v2 is already faster than alternatives for many kinds of apps (not all). We expect v3 to be so fast that it can express apps that are outright impossible with alternatives. The robotics observability IDE in the talk, for example, as well as Hyperfiddle itself.

Re. server caching – Electric (being reactive) auto memoizes all scopes, even on the server. (The essence of reactive programming is a time/space tradeoff - cache more things to minimize recomputation later.) For example, in the virtual scroll demo from the talk, the database query runs once and is retained in memory, so that scrolling simply indexes over the memoized collection:

    (defn window [xs offset limit]
      (subvec (vec xs) ; fast cast
        (Math/max offset 0)
        (Math/min (+ offset limit) (count xs))))

    (e/defn Window [query! offset limit]
      (e/server
        (let [xs ($ e/Offload #(query!))] ; retain and reuse xs as offset changes
          [(count xs) (e/diff-by identity (window xs offset limit))])))
Regarding client caching - it's basically the same. Hoist the value you want to save to be above the conditional that is disposing it. If that doesn't work, use an atom.

comment 2y ago · link · parent

Thanks! We hope the v3 learning curve will be a lot better; v2 has a bunch of non-obvious semantics that you just had to learn (as described in [1]) – which are now fixed in v3. But you're right, Electric is for experts, we built it for ourselves — in order to meet the performance and scalability requirements of our upcoming product Hyperfiddle (low-code declarative infrastructure for UI, or more simply, a CRUD Spreadsheet). https://www.hyperfiddle.net/

[1] https://hyperfiddle-docs.notion.site/Electric-Clojure-v3-tea...

comment 2y ago · link · parent

The site macros (e/client & e/server) let the programmer declare what site an effect must run on. The network is not explicit, only implied. For example, platform calls like (query-database) or (.createTextNode js/document) or (check-password) are inherently sited. Siting is essential complexity (arguably the essence of a distributed system), and consequently we as programmers are hyper-aware of where (at which site) our effects must run, and we require perfect control over their placement.

comment 2y ago · link · parent

i don’t think this is the official video, a trimmed video will come tomorrow-ish

comment 2y ago · link · parent

give a verbal top line (x raised from A, B headliners and misc angels) and save the details (excel doc, price and timing, option pools etc ) for post offer diligence, but what complications do you fear exactly? Sharing past price is your call, try to delay

comment 2y ago · link · parent

wise.com
1
111213
121