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

Rainer
My first contact with Erlang was about 2 years ago when I used RabbitMQ, which is written in Erlang, for my job. This made me curious and...
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
rustkas
To be a more productive reader when rereading a book, it is very convenient to create small rebar3 projects based on books’ samples and i...
New
adamaiken89
Anyone is interested in a classical textbook for algorithms can go and check that.
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
AstonJ
With Phoenix and LiveView having recently had a fairly major release, and Programming Phoenix LiveView being updated too, we thought it w...
New
PragmaticBookshelf
When the pandemic, heart disease, and personal tragedy threatened to steal everything the Tates spent years building, they found hope, he...
New
TomMahon
How did a sleepy valley become the epicenter of the technological world as we know it? In the 40th Anniversary Edition of my book, “Charg...
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
alvinkatojr
https://fs.blog/mental-models/ I’ve been reading Farnham Street for a while, and this topic is the recommended starting point for new re...
New

Other popular topics Top

AstonJ
What chair do you have while working… and why? Is there a ‘best’ type of chair or working position for developers?
New
DevotionGeo
I know that these benchmarks might not be the exact picture of real-world scenario, but still I expect a Rust web framework performing a ...
New
dasdom
No chair. I have a standing desk. This post was split into a dedicated thread from our thread about chairs :slight_smile:
New
PragmaticBookshelf
Design and develop sophisticated 2D games that are as much fun to make as they are to play. From particle effects and pathfinding to soci...
New
DevotionGeo
I know that -t flag is used along with -i flag for getting an interactive shell. But I cannot digest what the man page for docker run com...
New
PragmaticBookshelf
Build highly interactive applications without ever leaving Elixir, the way the experts do. Let LiveView take care of performance, scalabi...
New
PragmaticBookshelf
Create efficient, elegant software tests in pytest, Python's most powerful testing framework. Brian Okken @brianokken Edited by Kat...
New
AstonJ
We’ve talked about his book briefly here but it is quickly becoming obsolete - so he’s decided to create a series of 7 podcasts, the firs...
New
New
PragmaticBookshelf
Use advanced functional programming principles, practical Domain-Driven Design techniques, and production-ready Elixir code to build scal...
New