OpenTracing for Elixir with Spandex and Datadog

Lots of news for users of the Spandex library for tracing their Elixir applications with OpenTracing and DataDog!

  • Spandex 2.2.0 has been released at its new home in the spandex-project organization on GitHub: https://github.com/spandex-project
  • The former spandex library has been split into a core library and several optional dependencies to allow you to choose the frameworks you want to trace and the back-ends you want to send the spans to.
  • In the future, we envision having support for more OpenTracing-compatible back-ends like Zipkin and Jaeger (contributions welcome!)
  • spandex_datadog now supports distributed tracing across services, including priority sampling to ensure your traces are always complete.

Check out the READMEs in the project repos and join us in the brand-new #spandex channel on the Elixir-lang Slack if you have any questions!

Computing Fingering Distance with Dr. Levenshtein

Let’s get by with a little help from our friend, Vladimir Levenshtein, and calculate how difficult it is to transition from one guitar chord to another using a modified form of the Levenshtein distance algorithm!

EventSocketOutbound 0.2.0 released!

EventSocketOutbound provides support for Outbound method of the FreeSWITCH’s Event Socket.

Version 0.2.0 has been released.

The code can be found on GitHub and example usage can be found here.

Embedded Elixir (without Nerves)

At work I needed to deploy Elixir on an embedded linux, but I did not have the luxury of being able to use Nerves.

This blog post describes my solution on how to do that.

https://medium.com/@lasseebert/embedded-elixir-without-nerves-16954835df02

How Convenience Apps Are Making Life Better For Reclusive Individuals

Being a recluse in 2018 is not that bad, you can have all the best bits of technology and cut out what you don’t like. All of this became possible due to on-demand app development; if you have an idea for an app then you must contact an on demand app development Company that can make your app idea into reality.

Writing custom Credo checks

Stop arguing with your teammates about code style and write some custom Credo checks instead!

http://devonestes.com/writing-custom-credo-checks

Debugging your Phoenix, Elixir and Rails applications inside Docker containers

https://engineering.tripping.com/debugging-your-phoenix-elixir-and-rails-applications-inside-docker-containers-305c9d80ff80

The interaction of API calls w/ Ecto.preload and Mox

We posted an article about API usage and a surprising interaction between Ecto.preload and Mox

https://www.annkissam.com/elixir/alembic/posts/2018/08/27/api-calls-with-ecto-preload-and-mox.html

A simple HTTP client added Raxx

Raxx.SimpleClient separates constructing a request from the side effect of sending it.

https://elixirforum.com/t/raxx-interface-for-http-webservers-frameworks-and-clients/9380/37

ExVenture Updates for August 2018

ExVenture is a multiplayer text-based game server (aka a MUD). This month was a lot of bug fixes, including a few tweaks to add an additional 1000 players before the game fell over.

https://blog.oestrich.org/2018/08/exventure-updates/

Errors are not exceptional

TL;DR bad input is not exceptional. Only use exceptions for truly exceptional cases. Try the OK library.

http://crowdhailer.me/2018-08-26/errors-are-not-exceptional/

Conway’s Game of Life in Elixir

I was bored and made a Conway’s Game of Life app in Elixir:

https://game-of-life.isaacbfsanders.com/

Link to code inside. I might do more to update it to be more flexible, but the visualization starts as the Acorn pattern.

Parsing referral codes (Phoenix Framework)

This is part one of a series on building a referral marketing system for your Phoenix server.

One advantage of handling referrals on the back-end instead of with a JS-snippet that calls a third party’s service is that you’ll have full control of how the system works. Another is that your site won’t be slowed down with extra 3rd party scripts that have to be sent to each user or additional XHR requests when your pages load.

Building A Real-Time App With Phoenix

More and more, users are coming to expect real-time features from the web apps they use. Whether it’s a chat, a live game, a shared document or a push notification, we as developers are finding ourselves needing to go beyond standard HTTP requests to support real-time functionality. Phoenix, the web framework for Elixir, has real-time capability out of the box. It’s fast, highly concurrent (thanks to the Erlang VM), fault-tolerant and super friendly towards distributed systems.

https://timber.io/blog/building-a-real-time-app-with-phoenix/

Cloak v0.7.0 released!

Cloak is an encryption library with Ecto integration. The new release has much better support for umbrella apps.

https://github.com/danielberkompas/cloak/releases/tag/v0.7.0

Add docker to elixir/Phoenix projects in one command

I wrote a small Escript to add Docker and with Make targets to an Phoenix project

http://www.jackmarchant.com/articles/add-docker-to-elixir-phoenix-projects

Open-sourcing @CaptainFact_io backend (Elixir, Phoenix, Absinthe)

<img src=”https://captainfact.io/assets/img/banner.jpg”/>

A year and a half ago started https://captainfact.io - a collaborative, real-time fact-checking tool for YouTube videos. The website allow people to work together to confirm, refute and contextualize statements made in a video. A browser extension then brings down the community’s sources directly on the content by injecting them into YouTube’s player ( preview ).

Website preview Youtube integration preview

The project is non-profit ( we accept donations through OpenCollective ). We want to work in full transparency and while the website and the extension have been open-source for a long time, we still needed to release the API. It is now available on Github: https://github.com/CaptainFact/captain-fact-api.

The project is organized as an umbrella app and based on Phoenix + Absinthe. Some of its core features are:

  • A REST API (progressively migrated to GraphQL with Absinthe)
  • A Websocket API to work on videos in real-time
  • A reputation system with associated permissions and daily limits
  • A collective moderation system with flag reasons
  • Users actions history
  • Achievements
  • An invitation system (disabled by default)

Contributors and supporters are welcome and we hope the Elixir community will benefit from this project. As of today CaptainFact only has partnerships with French Youtubers and most of the videos presented on the platform are in French too. If you’re interested in contacting your favourite Youtuber to convince him / her that his videos should be added for sourcing on CaptainFact, contact us and we’ll tell you everything you need to know to get started.

Blazing fast Elixir configuration

Blazing fast Elixir configuration https://engineering.tripping.com/blazing-fast-elixir-configuration-475aca10011d

Display channel users count with Elixir/Phoenix + React/Redux

A few months ago, we decided to implement a users count feature on CaptainFact’s videos pages. It had to be reliable, light and simple. We also wanted to differentiate between logged-in and anonymous users.

The most interesting read I had at the time on this subject was a medium article which has one major flaw: the full users list is returned from the backend and the count occurs on the frontend (which actually respects the default behaviour of Phoenix.Presence).

Depending on your business, it can represent a privacy issue (you don’t especially want anyone to be able to know who’s connected to your channel) as well as a performance issue.

In the following article, I’ll show you how I implemented Phoenix.Presence in such a way that it only returns the total of connected / anonymous users. We’ll then see how to bind it to Redux.

https://blog.benjamin.piouffle.com/display-channel-users-count-elixir-phoenix-react-redux/

MapRewire <~>: Syntactic sugar to quickly bulk rekey maps

Simple sugar to make changing keys on maps less ugly.

What’s the why? When you consume information from a lot of API’s/sources, you get data streaming in with the keys from other applications, other applications naming conventions might not fit your app.

left <~> right, left is your map from outside your app, right is the rewrite rules.

It looks a little something like this: %{“id”=>”234923409”, “title”=>”asdf”}<~>[“title=>name”, “id=>shopify_id”]

Rewrite rules can be an Elixir List or a whitespace-separated list. They follow a format of left=>right, left is the old key, and right representing the new.

Add it as a dep: {:map_rewire, “~> 0.1.0”}

Hex.pm ~~ GitHub

Previous page Next page