Elixir Processing data

Elixir Processing data

You can show this QR Code to a friend or ask them to scan directly on your screen!

Thanks for sharing! 🫶

The url for this was also copied to your clipboard!
<div>
  <article>
    <h3>
      🔍 ExUnit 1.17&#39;s new flag to find intermittent failures
    </h3>
    <div>
      <div>
        <iframe src="https://www.youtube-nocookie.com/embed/T7TLn7WmY1E" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="allowfullscreen">
        </iframe>
      </div>
      
      <h4>
        Notes
      </h4>
      <p>
        Intermittent tests are a pain, but Elixir 1.17 has a really cool new

flag in mix test .

Whenever we have a test that fails intermittently, we can run a set of tests N times until the test fails:


mix test test/path/to/failing/test.exs --repeat-until-failure 100

Once a test fails, you can grab the seed and run the failing test with that seed:


mix test test/path/to/failing/test.exs --seed 123456

If you’re curious as to how --seed affects our tests, take a look at ExUnit’s –seed surprising behavior

Elixir Streams |> 🔍 ExUnit 1.17's new flag to find intermittent failures

You can show this QR Code to a friend or ask them to scan directly on your screen!

Thanks for sharing! 🫶

The url for this was also copied to your clipboard!
Avaliações: Collava - Quick Save

You can show this QR Code to a friend or ask them to scan directly on your screen!

Thanks for sharing! 🫶

The url for this was also copied to your clipboard!
elixir
genstage
concurrent pipeline
Elixir and Genstage

You can show this QR Code to a friend or ask them to scan directly on your screen!

Thanks for sharing! 🫶

The url for this was also copied to your clipboard!
elixir
broadway
data processing
workf
Processing workflows using Elixir and Broadway

You can show this QR Code to a friend or ask them to scan directly on your screen!

Thanks for sharing! 🫶

The url for this was also copied to your clipboard!
Concurrency in Elixir, like in many other programming languages, refers to the ability of a program to execute multiple tasks concurrently. Elixir, however, has unique features and principles that make its approach to concurrency distinct and powerful.

Concurrency Model in Elixir:
  1. Actor Model: Elixir is built upon the Actor Model, where concurrency is achieved through lightweight processes (not to be confused with OS processes). These processes are isolated and communicate with each other by passing messages. Each process has its own memory space, making it safe to share state among them.
  2. Processes: Processes in Elixir are extremely lightweight (typically a few hundred bytes of memory) and are managed by the Erlang Virtual Machine (BEAM). These processes are spawned quickly and can number in the thousands or more, making it feasible to create concurrent applications with high concurrency.
  3. Message Passing: Communication between processes is done exclusively through message passing. Processes send messages to each other asynchronously, allowing for loose coupling and fault tolerance. This model simplifies concurrency management and helps in building fault-tolerant systems.

Key Concepts in Elixir Concurrency:
  • Spawn: Processes are spawned using the spawn/1, spawn_link/1, or spawn_monitor/1 functions. Each process runs independently and executes its own code.
  • Send and Receive: Processes communicate by sending and receiving messages using the send/2 and receive/1 constructs. Messages are immutable data structures and are passed by copying, ensuring no shared mutable state.
  • Concurrency without Shared State: Elixir encourages managing concurrency without shared mutable state. Instead, processes often maintain their own state and communicate through messages, which helps avoid many common concurrency issues.

Benefits of Concurrency in Elixir:
  • Scalability: Elixir processes are lightweight and can run concurrently on multiple CPU cores. This makes Elixir applications highly scalable and capable of utilizing modern multi-core hardware effectively.
  • Fault Tolerance: Elixir processes are isolated and supervised. If a process fails (throws an exception), it can be restarted or managed by a supervisor process, ensuring fault tolerance and reliability.
  • Asynchronous and Non-Blocking: Concurrency in Elixir is inherently asynchronous and non-blocking. Processes can perform I/O operations and wait for responses without blocking other processes, leading to responsive and efficient systems.
concurrency
tasks
elixir
Concurrency Efficiently When Managing Multiple Tasks in Elixir

You can show this QR Code to a friend or ask them to scan directly on your screen!

Thanks for sharing! 🫶

The url for this was also copied to your clipboard!
flow
elixir
processing
Flow

You can show this QR Code to a friend or ask them to scan directly on your screen!

Thanks for sharing! 🫶

The url for this was also copied to your clipboard!
Preview for Processing data with elixir
stream
enum
flow
jose valim
elixir
lazy operations
Processing data with elixir

You can show this QR Code to a friend or ask them to scan directly on your screen!

Thanks for sharing! 🫶

The url for this was also copied to your clipboard!