#Erlang #rebar3

Rebar3 features (part 3): Overrides

What do you do when a dependency has settings in its rebar.config that are causing you problems? Maybe it includes dependencies that are not needed in the general case, like meck or edown. Or it could have set a required OTP version that isn’t accurate and you want to remove. Or the app could contain C code that needs compiling and had relied on rebar2’s port compiler. These problems often lead to forks of projects, which isn’t good for anyone, so in rebar3 we’ve added a feature called overrides. ...

#Erlang #rebar3

Rebar3 Features (part 2): Dependency Tree

rebar3 tree is a new command to allow the user to view what dependency pulled in each transitive dependency. This is especially useful with rebar3’s dependency resolution strategy of “first wins”. Thanks for pushing for this feature goes to Heinz N. Gies and inspiration comes from leiningen’s command lein deps :tree. For an example I’ve cloned chef-server and built oc_erchef under src/oc_erchef. It is unique because it has both a top level app oc_erchef under src/ as well as additional project apps under apps/. ...

#Erlang #rebar3

Rebar3 Features (part 1): Local install and upgrade

Update January 22, 2016: The original post has been modified to reflect that the commands install and upgrade were moved from the unstable namespace to the local namespace. Also added is use of the environment variable $REBAR3_ERL_ARGS in the run script which allows the user to specify custom Erlang VM arguments like: REBAR3_ERL_ARGS="+A10" rebar3 shell. Rebar3 comes with a lot of new and improved features. I’ll be publishing posts here to highlight some of these features over the coming weeks. ...

Monolith vs Microservices: Where to start

There is a debate going around how to do the initial design of a new system in the context of Microservices. Should you start with a Monolithic approach initially and move to a Microservices later or use Microservices from the beginning? Introduction Martin Fowler recently wrote article called ‘Monolith First’ that talks about how to get started on a new Microservice project. Stefan Tilkov wrote a response Don’t start with a monolith arguing the reverse. ...

Deploy Erlang Target System to Heroku

In this post these new tools will be used: rebar3 hk - new cli client for Heroku hk slug plugin - plugin for hk that uploads the target system Heroku Cedar-14 - new Heroku Cedar on Ubuntu 14.04 Heroku Slug API First, clone minasan and create the Heroku application on Cedar-14: Now that Heroku has the cedar-14 stack if you are also running a recent Linux distro you can upload the target system created by relx directly to your app, before now we would have to build it on Heroku or in a system with an older glibc to work on Heroku’s Ubuntu 10. ...

Designing for Actor Based Systems

Many people are intrigued and excited about Erlang style concurrency. Once they get the capability in their hands though they realize that they don’t know how to take advantage of the capabilities processes or actors provide. To do this we need to understand how to decompose systems with process based concurrency in mind. Keep in mind, that this material works equally well for actors in Scala or agents in F#. Differences between actors and processes don’t much matter for the sake of this discussion. ...

#Databases #Erlang #Postgres

Erlang Postgres Connection Pool with Episcina

Almost exactly a year ago I was looking to merge the many forks of Will Glozer’s Postgres client for use in a project at Heroku. Instead Semiocast released their client, I gave it a try and never looked back. (But note that David Welton, a braver person than me, is working on merging the forks of epgsql at this time). I found Semiocast’s client to be clean, stable and I liked the interface better. ...

Universal Makefile for Erlang Projects That Use Rebar

This post sponsored by ErlangCamp 2013 in Nashville and Amsterdam At this point in the game nearly every Erlang project uses Rebar. The problem with that is that Rebar’s approach to the command line and command dependency chaining is leaves a lot to be desired. You tend to end up typing the same command with the same options list over and over again during the course of your work. Because of the poor dependency chaining you often must retype the same sequence of commands as well. ...