Verge Studios Graphic and Web Design

The Verge Blog

A naive leaky bucket in Elixir

Published on Friday, June 16, 2017

We recently had to optimize API calls for the Shopify API which implements a Leaky Bucket algorithm to limit the amount of calls that you can make with a certain period of time. According to their documentation:

The bucket size is 40 calls (which cannot be exceeded at any given time), with a "leak rate" of 2 calls per second that continually empties the bucket. If your app averages 2 calls per second, it will never trip a 429 error ("bucket overflow").
Read More

Multi-factor authentication

Published on Friday, June 09, 2017

At Verge we take the security of our and our client's data seriously. One of the simplest practices we have adopted to increase the security of our accounts it to enable multi-factor authentication methods for the services we use and the services we provide. Wikipedia's definition of multi-factor authentication is as follows:

"Multi-factor authentication (MFA) is a method of computer access control in which a user is granted access only after successfully presenting several separate pieces of evidence to an authentication mechanism – typically at least two of the following categories: knowledge (something they know), possession (something they have), and inherence (something they are)."

We have used multiple solutions throughout our products and would like to share some of them and help others to understand how they can easily increase the security around their accounts.

Read More

Elixir ETS Logger

Published on Friday, June 02, 2017

Below is some sample code for a fixed size memory logger in Elixir using ETS as the back end. The idea was to create a a temporary log that could exist across requests and handle multiple channels.

With very little effort we came up with the following solution:

Read More

Joomla development and docker in three easy steps

Published on Friday, May 26, 2017

The preferred content management system at Verge is the Joomla CMS. We have over 12 years experience working with Joomla and have written countless modifications, components, plugins and templates. Our traditional development process for a Joomla customization was to create a new user on our development VPS, install Joomla from source, set up the database and configure a temporary sub-domain for development. We would then SSH into the server and work directly on the files on the server, customizing the install as we were going along. Needless to say our development approach has changed over the years and one of the best improvements we have made is moving to a Docker based approach for our development. In this article I would like to give an illustrative example of how to easily use docker for your development work.This article assumes you have a basic understanding of what containers are and that they can be linked together to create infrastructure.

Read More

Autoloading data in IEx

Published on Friday, May 19, 2017

One often overlooked feature of using IEx to debug your code is to pre-load data into IEx using a .iex.exs file. In a nutshell, IEx will run the file before it completes loading and the execution is exactly like an other .exs scripts you may use.

Read More

Page 1 of 3