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.

Distributed Systems in Haskell

58 pointsby isaac21259almost 4 years ago

3 comments

rkangelalmost 4 years ago
The Elixir Version of this:<p>1. Absolutely block. Everywhere it makes sense. Use this to serialise stuff (e.g. if I send a ping I want to wait for a pong before I send a different message). Take advantage of the fact that you&#x27;ve separate things into a process (Elixir term - green thread&#x2F;fibre) for each task, e.g. each connection to a different node is its own process.<p>2. You can absolutely just use timeouts, but there are a few ways of doing it depending on context. Operating things as a state-machine is usually the clearest way to do things and if you get the event &quot;timeout&quot; before you get the event &quot;response&quot; (or similar) you can handle all that very clearly.<p>3. Yup, good advice. In Elixir this is also about separating pure functional code, from the &#x27;process machinery&#x27; that runs it. Mostly because pure functional code is easier to test!
juxtaposeover 3 years ago
It&#x27;s a shame that the Cloud Haskell ecosystem is kind of ... on halt? I wish they at least would review patches and make Cloud Haskell packages compile against latest GHC releases. :&#x2F;
xupybdalmost 4 years ago
I suspect most of that class would not have known Haskell well enough to complete the assignment.