anuaralfetahe

anuaralfetahe

Blockade - event dispatching with priority levels

Hey there BEAM community!

I’m happy to share with you my latest creation. Erlang library called Blockade. This library was born out of a personal need and a desire to improve event handling in Erlang/Elixir projects. After searching for existing solutions, I found that nothing quite all my requirements. There are many nice libraries such as Phoenix PubSub but they do not offer event filtering. So, I rolled up my sleeves and developed Blockade.

Main features

  • Subscribe to events
  • Dispatch events
  • Filter events by priority level
  • Discard events by priority level

Blockade is built on top of Erlang pg module which actually does the heavy lifting and provides the distributed features meaning events can be dispatched to all subscribers in the Erlang cluster, subscribers (processes) who die will be automatically removed from the subscribers list.

A Real-World Use Case

Let me share a real-world scenario where Blockade shines. Imagine you have a system processing critical transactions. During this time, you need to ensure that no other transactions are processed concurrently, as it could lead to inconsistencies. By leveraging Blockade, you can simply set a higher priority level on the event queue, effectively creating a blockade that locks all resources. This way, any other events in the queue will wait until the transaction processing is complete. Once the transaction finishes, resetting the priority level will automatically unleash the queued events.

https://github.com/alfetahe/blockade

Happy coding!

Where Next?

Popular in Announcing Top

tmbb
I’ve published the first version of my Makeup library. It’s a syntax highlighter for Elixir in the spirit of Pygments, Currently it highl...
New
seancribbs
Today I released a new dialyzer Mix task as the dialyzex package! At the time we started writing this task, the existing dialyzer integra...
New
josevalim
Yes, yet another parser combinator library! Most of the parser combinators in the ecosystem are either compile-time, often using AST tra...
159 19228 141
New
brainlid
LangChain is short for Language Chain. An LLM, or Large Language Model, is the “Language” part. This library makes it easier for Elixir a...
New
Qqwy
Today I realized that it would be possible to implement currying-capability in Elixir, using some clever anonymous function creation. (‘c...
New
woutdp
Hi! I wanted to introduce my latest project LiveSvelte. It allows you to render Svelte inside LiveView with end-to-end reactivity. It’s ...
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 52341 488
New
treble37
Just looking for a little feedback on a tiny helper library I built - Sometimes I find the need to convert maps with atom keys to maps w...
New
OvermindDL1
Been making an MLElixir thing (not released yet…) for fun in spare time in the past day. I’m just trying to see how much I can get an ML...
132 13966 106
New
anshuman23
Hello all, I have been working on my proposed project called Tensorflex as part of Google Summer of Code 2018.. Tensorflex can be used f...
New

Other popular topics Top

skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
Nvim
Anybody knows a comprehensive comparison of Django and Phoenix, thanks for the help. Where are they similar? Where do they differ the m...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
johnnyicon
Hi all, I’ve just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage. I’m trying to use Postgres...
New
JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1144 53690 245
New
aesmail
Hello guys, I have finally made it. I created an admin interface for a framework. It’s been on my todo list for years and with the curre...
New
Emily
I have VueJS GUIs with the project generated using Webpack. I have Elixir modules that will need to be used by the VueJS GUIs. I forese...
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New

We're in Beta

About us Mission Statement