Posted by & filed under aws, DevOps, Message Queues, Web development.

Like many others, at Turret.IO we were tasked with deciding whether or not to use RabbitMQ or Amazon SQS for our message queueing needs. Since we operate a major of our operations inside AWS, we felt it necessary to at least give SQS a fair shot, even though quite a lot of developers seem to dislike it.

Having two distinct use cases (communicating with our internal SMTP servers and communicating with external clients) it was important to keep in mind that we might not be creating a fair comparison. RabbitMQ‘s community support along with its plugins (including authentication) make for a very robust product. SQS on the other hand is simple. It’s not designed designed to compete with the extensive configurability of RabbitMQ — but, it’s a distributed and highly available service. Establishing the same level of availability on our own with RabbitMQ would not be simple nor inexpensive.

Read more »

Posted by & filed under Crypto, PHP.

PHP has a lot of available documentation. So much that Googling just about any PHP function provides a php.net result on the first page and a good majority of the content is accurate. And when it’s not, the public comments usually fill in the holes. The OpenSSL cryptography extension is one part of php.net that is very lacking, so much that you’ll even be greeted with Warning: this function is currently not documented; only its argument list is available for both openssl_encrypt and openssl_decrypt — perhaps the two most commonly looked up OpenSSL functions.

Here’s the full example. We’ll jump into the details below.

Read more »

Posted by & filed under DevOps, Docker.

Within the Docker community there tends to be two modes of thought with regard to running processes: run multiple supervised processes in a container or only run a single process per container. The former makes it easier to encapsulate applications that may need more than one service (think NGiNX + uWSGI + Memcached + Redis) while the latter makes more sense because Docker only supports running a single command. This article will be about the former, using Supervisor to supervise multiple processes and log their output.

One major issue with running multiple processes in a Docker container is getting access to log output. There are lots of logging services out there designed to ease the burden and aggregate multiple Docker container logs into a single location for storage and analysis, but in this case we’re only interested in a single container. By default, Supervisor logs to a specific file for each of its child processes. While this is great for organization, it’s a hassle when running inside a Docker container. Since we can see the standard output and error from the Docker container itself and docker logs gives us the same information if the container is running as a daemon, ideally we should be able to see our basic logs the same way.

Read more »

Posted by & filed under PHP, Web development.

WordPress is used to make about 43.7 million posts each month1. With an extensive library of over 33,500 plugins, WordPress has a significant market share of both the content generation and development communities. Creating plugins for WordPress is not overly difficult, but the actual development and testing process can be a hassle.

Let’s see how Docker can help us out.

Read more »

Posted by & filed under Crypto, Go, NodeJS, PHP, Python, Ruby, Web development.

When communicating messages between multiple systems, it’s always a good idea to authenticate a message before taking action on it. This ensures the message hasn’t been tampered with and that it came from a known source. There are several ways of implementing this type of message authentication, but here we’re going to assume we have control over the systems in question and can use a shared secret that all systems know.

Read more »