Elixir Blog Posts

Hello, regardless of the current Neil Young vs. Joe Rogan controversy, it’s worth knowing that Spotify uses Phoenix LiveView to manage its artist ad platform. In my new article, I am writing about how Elixir and Phoenix rose from a proof of concept to the level of the actual game-changer, and what it takes to advocate for a particular technology to be employed by a huge company.

Enjoy!

How Phoenix LiveView helps Spotify’s artist ad platform

4 Likes

Throttling and Blocking Bad Requests in Phoenix Web Applications with PlugAttack

Hi Elixir forum, I just published a tutorial on how credential stuffing attacks can occur against a Phoenix application, and some strategies to mitigate them using PlugAttack. The post walks through:

  • Setting up a victim application, named orru
  • Using a basic script to perform automated logins, envy
  • The throttle and fail2ban rules in PlugAttack, and some potential pitfalls you may run into when setting them up, and how to avoid them

Thank you for reading!

2 Likes

"Uptime monitor in Elixir & Phoenix"

1 Like

Anybody here knows an article or any on search engine in Phoenix app? something like this.

1 Like

There are ways to connect to anything for an external search engine. If your don’t need multi-node scalability, there are 2 low effort ways:

  • use the built-in full text search of postgres
  • use tantivy, a very thin wrapper of the the excellent rust library of the same name. Shameless plug: The wrapper is written by me.
3 Likes

Ah that helps alot :pray:. Will try those, thank you.

Recently we fixed a memory consumption issue. I hope this can be helpful to someone other too!

3 Likes

Thanks for the article. I’m going to need some event sourcing in an upcoming project and it helps knowing these things up front.

I recently took a look into the macros for Phoenix controllers to see how they work, and wrote some simple examples of how you might go about changing those macros for different use cases.

Hey Elixir fans!

I recently worked with Elixir for parsing UDP. Binary pattern matching to the rescue! I wrote a blog article about my learnings:

http://blog.rokkincat.com/parsing-udp-in-elixir-with-binary-pattern-matching/

Moved to: https://rokkincat.com/blog/2016-05-09-parsing-udp-in-elixir-with-binary-pattern-matching/

9 Likes

Very nice Alex :slight_smile: I love reading and seeing how pattern matching allows for
expressiveness and smarter development.

1 Like

I am late to the party, I was curious about this article but it is no longer in the blog section, do you still have the content some where ?

Stone Filipczak wrote this clear and simple process for converting Phoenix Views to LiveViews. Check it out: Converting Phoenix Views to LiveViews

2 Likes

Neural networks mirror the behaviour of the human brain, enabling computer programmes to recognise patterns and solve common problems in the fields of artificial intelligence, machine learning and deep learning.

1 Like

What are modules? Why do we use them at all? How to tell the difference between shallow and deep modules? Take a look at the first part of the modular design blog series by Prograils!

2 Likes

For anyone interested in reading elixir related blog posts, you can subscribe to this feed:

https://roastidio.us/tagged_with/elixir

It is a standard RSS2 feed, with links automatically collected over the web.

1 Like

Web applications would not have existed without APIs… or, at least, they would have been much more difficult to use. In our new tutorial, we’ll get you a proper introduction to API design. Introduction to web API design

1 Like

Classifying Data Center IP Addresses in Phoenix Web Applications with Radix Trees

This blog post details:

  1. How to retrieve lists of data center IP prefixes when a Phoenix application starts.
  2. Using a radix tree to store IP prefixes for fast lookup.
  3. Why Erlang’s persistent_term module is the best choice for this problem.
  4. Using assigns to store metadata about the IP address.
  5. Writing a plug to block data center IP addresses.

A good amount of bot traffic online comes from data center IP addresses, the post gives the example of a ticket sales website where bots are buying tickets up before users can. The problem of classifying IP addresses is a good example to show some features of Elixir/Erlang, such as persistent_term.

4 Likes