TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

How to make any immutable data structure distributed

174 pointsby pierremenardover 3 years ago

6 comments

runT1MEover 3 years ago
I really think this is where pure FP shines.<p>If you look at the architecture of something like Apache Beam, while you describe your computations in a language like Java or Python, you&#x27;re really using a DSL for creating an immutable DAG that processes chunks of immutable data, persisiting each chunk (being loose with terms here) for durability, &#x27;modifying&#x27; it in the immutable sense and then passing it on to the next edge and so on.<p>In a single standalone system, many argue that a purely immutable conceptual approach has pros and cons. In the Big Data world, I&#x27;ve never heard anyone argue for an imperative approach. Immutability is necessary, and as soon as you need immutability you want all the other goodies that facilitate it in a clean way like monads, lenses, and the like.
评论 #29458551 未加载
评论 #29454177 未加载
评论 #29454352 未加载
jmfldnover 3 years ago
I really hope Unison succeeds. It looks like a really interesting take on FP &#x2F; distributed systems. The fact that Paul Chiusano and Runar Bjarnason are at the helm is exciting, especially to Scala &#x2F; FP devs like me who know them as the writers of the legendary &quot;red book&quot;. Just based on the rare quality of that book, I&#x27;m super interested in other FP projects that they&#x27;re involved in.
评论 #29453706 未加载
评论 #29454162 未加载
pchiusanoover 3 years ago
One of the authors of the article here, happy to answer any questions about it!
评论 #29454378 未加载
评论 #29457198 未加载
评论 #29454340 未加载
lidatongover 3 years ago
I think there were a lot of great ideas presented in these small examples.<p>1. Explicitly marking non-local _data_ vs. in-memory. A very cool idea -- languages and libraries I&#x27;ve used all seem to try to make this transparent (unsuccessfully, as indicated by the random serialization errors you get)<p>2. Making the noise around serialization and RPC transparent to the user<p>3. Bring the code to the data, not the data to the code<p>4. Immutability, FP, and I like the syntax -- no coincidence in its similarities to Haskell and Scala, I&#x27;m sure :)<p>These are all pain points in a lot of existing &quot;big data systems&quot; I&#x27;ve used, where they either solve the problem half-baked or don&#x27;t address at all. I&#x27;m excited to see where this project goes!
评论 #29455005 未加载
pchiusanoover 3 years ago
Recommend starting with part 1 of the article if you want more of an overview: <a href="https:&#x2F;&#x2F;www.unison-lang.org&#x2F;articles&#x2F;distributed-datasets&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.unison-lang.org&#x2F;articles&#x2F;distributed-datasets&#x2F;</a>
jltsirenover 3 years ago
I dislike the term &quot;immutable data structure&quot;, because it has two widely used conflicting meanings:<p>1. Read-only data structures, which are used by everyone in every language all the time.<p>2. Persistent data structures, which make the underlying immutable structures kind of mutable by creating new versions and reusing parts from the old versions of the structure.
评论 #29454793 未加载
评论 #29454809 未加载