Home » Archives for Leigh Halliday

Author Archives: Leigh Halliday

Leigh is a developer at theScore. He writes about Ruby, Rails, and software development on his personal site.

GraphQL and Performance in Rails

We looked previously at getting set up with GraphQL on Rails. We defined some queries, some mutations, and had a good time doing so! But what if I told you that with only a few hundred records in the database, it’s possible to write a query that brings our server grinding to a halt? In this article, we’ll look at ...

Read More »

How to Implement a GraphQL API in Rails

GraphQL came out of Facebook a number of years ago as a way to solve a few different issues that typical RESTful APIs are prone to. One of those was the issue of under- or over-fetching data. Under-fetching is when the client has to make multiple roundtrips to the server just to satisfy the data needs they have. For example, ...

Read More »

Realtime with React and Rails

When I was thinking about creating something to showcase using ActionCable (websockets) in a Rails app with React, I first thought of building a chat. But everybody builds a chat. So next, I thought about a realtime dashboard. But then I realized I had no data in this demo app with all but one user (me). So I decided to ...

Read More »

Server Rendering React on Rails

React apps give us incredible power in the browser, and with the react_on_rails gem from the folks at ShakaCode, we now have an easy way to use React inside of our new and existing Rails apps. In a previous article, I talked about how to get up and running with React in your Rails app. In this article, we are ...

Read More »

Using React Inside Your Rails Apps

I have never felt as productive as I do in Rails. Yet, with front-end seemingly moving further away from server-rendered views toward React, Angular, Vue, and Ember, I was unsure where Rails fit into this picture. Would it be relegated only to apps with “simple” front-ends, where holding things together with jQuery still managed to work, or perhaps to its ...

Read More »

Linking, Monitoring, and Supervising in Elixir

One of the benefits of microservices is that part of the system can go down without bringing the entire system down. With Elixir, each process is in essence a microservice. It’s a small, isolated process that communicates with other processes via message passing, all orchestrated by the Erlang BEAM VM. No memory is shared between processes, so the failure of ...

Read More »

Concurrency Abstractions in Elixir

Elixir gives you the tools to easily write concurrent code. In an earlier post, I introduced concurrency in Elixir by looking at the building blocks of concurrency. Processes follow the actor model of concurrency and are the core underlying construct with which you can then send and receive messages between other processes. What you might have seen is that there ...

Read More »

Replacing Sinatra with Rack in Sidekiq

Sidekiq is one of the first gems that I install when doing a significant Rails project. If you plan to or already have Redis running, it provides an almost effortless ability to process background jobs. Aside from that, I’ve always thought that one of the most powerful components of Sidekiq was the web UI that it ships with. Prior to ...

Read More »

Microservice Communication with Queues

Microservices are small programs that handle one task. A microservice that is never used is useless though — it’s the system on the whole that provides value to the user. Microservices work together by communicating messages back and forth so that they can accomplish the larger task. Communication is key, but there are a variety of ways this can be ...

Read More »