Rate Limiting Server Requests in Elixir

We allow our customers to test PSPDFKit API for free. To prevent resource congestion and uncontrollable infrastructure fees, we decided to rate limit these test API calls. My post provides some background on the rate limiting and explains our rate limiting implementation in our Elixir backend.

Read more here: https://pspdfkit.com/blog/2022/rate-limiting-server-requests/

Exogiri 0.3.0

Today is the first major (usable) release of Exogiri.

I got tired of not having access to the awesome power of Ruby’s Nokogiri in Elixir, so I ported it. It’s also my first major C project in a while, and my first NIF. So if you’re looking for a project to rip a new one - I encourage you to dig on in.

Currently accepting feedback on:

  • Unimplemented minimum viable project features (stuff that would prevent you from even using the library)
  • Features from libxml2 I forgot to document as unfinished
  • Possible memory leaks
  • Gotchas with NIFs I just plain missed
  • There are platforms the extension doesn’t build on
  • Dude that just isn’t how you do things in C

Grab it here: https://hex.pm/packages/exogiri

Let know where I might have biffed it here: https://github.com/TreyE/exogiri

PostgreSQL Queries on JSONB Fields with Ecto

Ecto is a great library for making composable queries, but to query a JSONB field within a schema, it requires falling back to native PostgreSQL functions. Check out our story while working on features for theScore Bet

https://techblog.thescore.com/2022/06/23/embedded-schema-queries-with-ecto/

Controlling Supervisors at runtime with feature flags

At Knock we needed a way to be able to gracefully degrade our system by turning off our Broadway Kinesis consumers at runtime, without needing to redeploy our service. This post explores how we did that using feature flags via LaunchDarkly.

https://knock.app/blog/controlling-elixir-supervisors-at-runtime-with-feature-flags

Lisbon Elixir meetup back June 29th

the @LisbonElixir meetup will be back on June 29th after a long hiatus, at @pagerduty’s office 🥳 come nerd out about @elixirlang and @NervesProject https://www.meetup.com/lisbon-elixir/events/286422096/ #elixir #myelixirstatus #meetup #lisbon

Add Toaster in Phoenix LiveView application

This blog demostrate how to add Toaster message in Phoenix LiveView application. https://abulasar.com/adding-toaster-message-in-phoenix-liveview

Avoid test setup pollution (and 4 problems it creates)

I’m not big fan of using shared setups in Elixir such as setup [:create_user]. I often feel that it adds more problems at the cost of a somewhat debatable convenience.

For example, it sometimes creates unused data or introduces mystery guests, or the data created needs to be updated anyway. Or it simply obscures the test by separating the context in which the test runs from the exercise and verification.

I wrote a bit about that in a post.

https://www.germanvelasco.com/blog/avoid-test-setup-pollution-and-four-problems-it-creates

ThinkingElixir 104: Exploring Our Data with Chris Grainger

In episode 104 of Thinking Elixir, Chris Grainger explains Explorer, Nx’s recent addition. It’s a “Data Frame” library which sounds far more nebulous than it is. It lets us explore and manipulate two-dimensional data like we already do with DB tables, spreadsheets, CSV files, etc. Only this works in memory, is faster, and has predefined functions that make it very powerful. Explorer fills an important slot in the overall pie for data science and ML in Elixir. However, Explorer is also one of the tools that “regular” Elixir devs can take advantage of today.

https://podcast.thinkingelixir.com/104

IntelliJ Elixir 13.1.1

Changelog

Bug Fixes

  • Fix Project Initialization Failed from New > Project > Elixir
    • Catch and log IOExceptions swallowed by Project Initialization Failed.
    • Recursively delete project directory before running mix new. Previously, the directory was only deleted if empty, but whether the .idea directory is written when setupProject is called differs between IDE versions, so to be safe, recursively delete.
  • Fix Go To Definition for function in compiled modules. When switching over to delayed decompilation, ModuleImpl did not have processDeclaration overloadded, so the PsiScopeProcessor was never called on it and so the CallDefinitionClause scope processor did not check the ModuleImpl#callDefinitons.
  • Implement Deprecated metadata handling for docs from BEAM files.
  • Don’t assume Elixir SDK sdkAdditionalData is non-null.
  • Don’t restrict Run Configurations to Run in Modules to Elixir modules. The docs for ModuleType say the concept is meant to be deprecated, so don’t enforce it and trying to load ElixirModuleType in RubyMine breaks as it tries to load ElixirModuleBuilder and therefore JavaModuleBuilder, which only works in IntelliJ.
  • Add the facet in a write action in addition to setting the SDK.
  • Increase SUSPECT_NAME_SET_SIZE to 20. Increased to cover the 15 impls of String.Chars in the geo hex package.
  • Log if erl binary is not found when trying to run mix format. Log instead of letting it throw up the stack and cause an error report since the SDK not being set will be very common.

Installation Instructions

Poznań Elixir Meetup #14

The long awaited Poznan Elixir meet-up, vol.14

We’ll be covering trending Elixir topics, with industry experts sharing their knowledge & opening the floor for discussion. BBQ / grill & beer will be catered for🔥🍻

https://www.meetup.com/poznan-elixir/events/286564039/

3rd part of an (opinionated) Elixir styleguide

Another set of Elixir best practices in day-to-day development: https://k.lelonek.me/elixir-best-practices

BrightPi 1.0.0 released

Today, BrightPi 1.0.0 got released. It is a library to talk to the Pi Supply Bright Pi board featuring 4 white LEDs and 4 pairs of two infrared LEDs.

Ten years of Elixir! And OTP/Elixir release bonanza! 2022 edition

Let’s celebrate Elixir’s 10th anniversary. Robert will facilitate an interactive session where we share some stories about our Elixir journeys. Then a Livebook going over the latest in OTP and Elixir releases.

https://www.youtube.com/watch?v=C0_dwhwm6fI

Testing in Phoenix LiveView - A Beginner's Guide (By a Beginner) - @dino_coder

As someone relatively new to the world of LiveView, testing highly interactive applications has been somewhat of an enigma. This talk will give a broad overview of just how simple it can be to use the LiveViewTest module for writing a range of different tests, as well as tips for avoiding brittle or flaky tests.

https://www.youtube.com/watch?v=4MyvGsp8pmI

Creating Note taking app using LiveView and GenServer

In this blog I have demonstrated how to create a Note taking app (similar to MacOS) using GenServer and LiveView. https://abulasar.com/creating-note-taking-app-using-liveview-and-genserver-part-1

Highlighting the current page link in the Navbar menu in Phoenix LiveView

How to highlight the current menu in navbar in LiveView? https://abulasar.com/highlighting-the-current-page-link-in-the-navbar-menu-in-phoenix-liveview

Adding Infinite scroll in Phoenix LiveView App

How easily we can achieve Infinite scrolling in Liveview with Javascript Hooks. https://abulasar.com/adding-infinite-scroll-in-phoenix-liveview-app

Fetching data from external Graphql API service in Phoenix LiveView

This blog post is about querying and fetching data from external graphql api in phoenix liveview. https://abulasar.com/fetching-data-from-external-graphql-api-service-in-phoenix-liveview

5 Questions to 9 Elixir Developers for the 10th Anniversary of Elixir Language

On May 24, we all celebrated the 10th anniversary of Elixir!

It was on this occasion that we asked our Elixir developers about how they started their adventure with Elixir language, how long it took to learn Elixir to feel confident in this language, what advice that they would give to developers who want to learn the Language, and what sources they use for learning Elixir and everyday work.

If you’re curious about how #CuriousPeople do it, check out this blog post!

https://curiosum.com/blog/questions-to-elixir-developers-10th-anniversary-of-elixir-language

Elixir Meetup #6 ▶ hosted by Curiosum ▶ Gustavo Oliveira & Adolfo Neto

6th Elixir Meetup hosted by Curiosum ▶ http://curiosum.com

We discussed 2 presentations of our Elixir experts:

  • Gustavo Oliveira: TDD with Liveview simpler than you imagine! Description: We have been discussing TDD for over 10 years ago, and how good amazing is this tool for companies and developers. In this presentation, you will learn how to use TDD with Liveview and how easy, simple, fast and reliable you can build your apps using simple techniques.

  • Adolfo Neto: Learning Erlang and Elixir through Exercism and Advent of Code Description: There are numerous authorization libraries for Phoenix Framework - I will show you why none of those does it right and how we’re crafting the ecosystem’s first access control library that integrates seamlessly with both Plug and LiveView and perhaps more than that.

https://youtu.be/MPiWqmTfgK4

Previous page Next page