In this tutorial, we will take a look at how Kafka can help us with handling distributed messaging, by using the Event Sourcing pattern that is inherently atomic. Then, by using a pattern called Command-Query Responsibility Segregation (CQRS), we can have a materialized view acting as the gate for data retrieval. Finally, we’ll learn how […]
Category: Software Engineering
Faster Rails: Is Your Database Properly Indexed?
If your Rails app is getting slower, here’s how to properly index your database to make your Active Record queries faster.
Perfection is Useless
One of the most important things we teach the junior programmers who join the Semaphore team is the mindset of shipping in small iterations. This is a simple concept, however there’s an inevitable misunderstanding that stems from the subjective ideas of “small”. Thus, in practice we need to teach by example what we really mean […]
Generating Fake Data for Python Unit Tests with Faker
Introduction When writing unit tests, you might come across a situation where you need to generate test data or use some dummy data in your tests. If you already have some data somewhere in a database, one solution you could employ is to generate a dump of that data and use that in your tests […]
Introduction to Ansible
Ansible is a general purpose automation tool that may be used for configuration management or workflow automation. Configuration management is an “infrastructure as code” practice that codifies things, e.g. what packages and versions should be installed on a system, or what daemons should be running. Workflow automation may be anything from provisioning cloud infrastructure to […]
Flaky Tests: Are You Sure You Want to Retry Them?
Different teams have different approaches to dealing with flaky tests. Some even go as far as using the “Let’s run each test 10 times and if it passes at least once, it passed” approach.
Bootstrapping a Docker Swarm Mode Cluster
Introduction Containers have recently become a very popular delivery mechanism for software applications. This is in part due to the popularity of the microservices software architecture pattern, which encourages delivering applications as a set of discrete, independent, loosely-coupled services. A microservice is an ideal payload for the container abstraction. Perhaps, the biggest influence, however, has […]
5 Tips for More Effective Capybara Tests
Introduction In this article, we’ll cover five tips for writing effective Capybara tests, and how to use them with RSpec and Minitest. What is Capybara? Capybara is an acceptance test framework for web applications. It’s a common choice for end-to-end, acceptance, or integration testing in Rails applications. It allows developers to simulate a user on […]
Continuous Deployment of a Dockerized Node.js Application to AWS ECS
Introduction In this tutorial, we’re going to cover the following: Dockerizing a Node.js application, Setting up an AWS EC2 Container Service architecture with CloudFormation, and Hooking up a CI/CD pipeline with Semaphore. The end goal is to have a workflow that allows us to push code changes up to GitHub and have them seamlessly deployed […]
Packaging and Deploying Go Applications to AWS using Semaphore
Introduction This tutorial will illustrate how you can use AWS CodeDeploy, a scalable deployment service offered by AWS that lets you automate your deployment process. We will package and continuously deploy a Go application to an EC2 instance. The tutorial will use a sample application and walk you through the process of updating your existing […]
The Cracking Monolith: The Forces That Call for Microservices
The microservice architecture has recently been gaining traction, with many companies sharing their positive experiences with applying it. The early adopters have been tech behemoths such as Amazon and Netflix, or companies with huge user bases like SoundCloud. Based on the profiles of these companies and the assumption that there’s more complexity to running and […]
Measure and Improve Your CI Speed with Semaphore
We’re happy to announce a new Semaphore feature that will help you monitor and improve your CI speed over time. We’re calling it CI Speed Insights, and it’s available to all Semaphore users as of today.
Faster Rails: How to Check if a Record Exists
Ruby and Rails are slow — this argument is often used to downplay the worth of the language and the framework. This statement in itself is not false. Generally speaking, Ruby is slower than its direct competitors such as Node.js and Python. Yet, many businesses from small startups to platforms with millions of users use […]
Getting Started with Mocking in Python
Introduction Mocking is simply the act of replacing the part of the application you are testing with a dummy version of that part called a mock. Instead of calling the actual implementation, you would call the mock, and then make assertions about what you expect to happen. What are the benefits of mocking? Increased speed […]
Making a Mailing Microservice with Elixir and RabbitMQ
At Rendered Text, we like to decompose our applications into microservices. These days, when we have an idea, we think of its implementation as a composition of multiple small, self-sustaining services, rather than an addition to a big monolith. In a recent Semaphore product experiment, we wanted to create a service that gathers information from […]