TwistingTwists

TwistingTwists

Journal : Designing Elixir systems with OTP

This is my Journal for readings on Designing Elixir Systems with OTP.

Will post chapter 01 tomorrow! Stay tuned!

Most Liked

AstonJ

AstonJ

Nice one TT! Another book I am interested in reading at some point! :003:

TwistingTwists

TwistingTwists

Chapter 01

Concepts / RE-Thinks:

DFTwBLWB : Do Fun things with Big Loud Worker Bees - acronym to think about layering application.

DFT = for building blocks of project

BLWB = for letting components work together.

Why layers?

  1. Testing each component with SIMILAR functions together (because they are grouped together! )
  2. Healing - supervisors
    1. the concept is (called lifecycle) as simple as turn-off the TV and restart to fix it!
    2. So, shut down CLEANLY (note,emphasis)!

Managing state :

  1. recursion and message passing to manage state.
    • This is new! = message passing is usually an advanced concept and not ‘generally’ used to manage state, unless - Elixir or MVC model.
TwistingTwists

TwistingTwists

Chapter 02 : Know Your Elixir Datatypes

Types and pro-cons

DataType Properties Pro Cons
Atoms are integer + constant + NOT garbage collected use = name concepts + constant tables type lookup NOT convert user-input to atom
Arrays = NOT in Elixir! - random access is cheap + traversing O(n) +
Lists NOT arrays! + singly linked-lists + pattern matching on head is O(1) Appending at END of lists or LARGE lists
Maps random access O(log n) => useful for heavily edited data use MapSet when only Keys (uniqueness)
Strings are binaries => efficiently stored + copy is a FULL copy (unlike lists) DO NOT LET processes hold references to long string => may cause memory leaks + NOT use long strings for storing info + DONT concatenate
Tuples fixed length data structure use for tagging data + read chunks of data like csv slow append => don’t edit (if need to, use Maps)
Functions send function to data, NOT data to function
PATTERN matching allows multiple dimension inheritance (sort of) => better than inheritance!!

Where Next?

Popular Community topics Top

finner
As one of my New Year resolutions is to read more tech I’ve decided on an attempt to document my travels in Mannings Modern Java in Actio...
New
mafinar
Crystal recently reached version 1. I had been following it for awhile but never got to really learn it. Most languages I picked up out o...
New
mafinar
Concurrent Data Processing in Elixir is now content complete and I finally found the time I’ve been looking for to dedicate behind readin...
New
mafinar
I am going to dump my thoughts, methods, codes, experiences and rants while learning OCaml into this thread. This is probably the 5th or...
New
Maartz
The very first time I’ve seen a line of Elixir I was in awe. Coming from Ruby the syntax was familiar. But I wanted to know what was thi...
New
ohm
I would love to begin a book club with Mike Amundsen’s (@mamund) book Design and Build Great Web APIs. It seems that building new syste...
New
ggarnier
In Aborting Multiple Fetch Requests with One Signal section, the code in abort/abort_ex09.js doesn’t show the downloaded images until Pro...
New
AstonJ
With Tailwind now the default CSS framework shipped with Phoenix we thought it would be nice to run this book club on the Elixir Forum. ...
New
PragmaticBookshelf
When the pandemic, heart disease, and personal tragedy threatened to steal everything the Tates spent years building, they found hope, he...
New
Fl4m3Ph03n1x
Learning Domain-Driven Design Building software is harder than ever. As a developer, you not only have to chase ever-changing technologic...
New

Other popular topics Top

PragmaticBookshelf
Learn from the award-winning programming series that inspired the Elixir language, and go on a step-by-step journey through the most impo...
New
AstonJ
Or looking forward to? :nerd_face:
485 12600 258
New
brentjanderson
Bought the Moonlander mechanical keyboard. Cherry Brown MX switches. Arms and wrists have been hurting enough that it’s time I did someth...
New
AstonJ
There’s a whole world of custom keycaps out there that I didn’t know existed! Check out all of our Keycaps threads here: https://forum....
New
AstonJ
I’ve been hearing quite a lot of comments relating to the sound of a keyboard, with one of the most desirable of these called ‘thock’, he...
New
AstonJ
Continuing the discussion from Thinking about learning Crystal, let’s discuss - I was wondering which languages don’t GC - maybe we can c...
New
Maartz
Hi folks, I don’t know if I saw this here but, here’s a new programming language, called Roc Reminds me a bit of Elm and thus Haskell. ...
New
New
AnfaengerAlex
Hello, I’m a beginner in Android development and I’m facing an issue with my project setup. In my build.gradle.kts file, I have the foll...
New
AstonJ
This is cool! DEEPSEEK-V3 ON M4 MAC: BLAZING FAST INFERENCE ON APPLE SILICON We just witnessed something incredible: the largest open-s...
New