REST, or Representational State Transfer, is a design pattern for mutating and querying the state of resources between client and server. Resources stored in a database are queried for and mutated by a client using HTTP requests to transport the “current state” of said resource across the wire. 10 years ago, this was a profound idea. REST’s predecessor SOAP, or Simple Object Access Protocol, was a complete and utter horror show to work with, requiring verbose multi-handshake requests to be sent back and forth to negotiate state changes that were difficult to implement and incredibly slow to parse. …


Express with TypeScript can be confusing to start with!

If you’ve ever used Express with TypeScript, you know first hand how confusing it can sometimes be. Traditional Express conventions involve the mutation of the Request object as a sort of “thread local” or “context” for the life of the request. This approach unfortunately relies on the loosely typed nature and conventions surrounding vanilla JavaScript, and does not scale well in a TypeScript project.

When building APIs with Express + Javascript, you’ll usually see something like this via Express middleware to decorate values and objects to the req object for later middleware / route controllers to consume:

With TypeScript…


I’m a chronic networker. When there isn’t a pandemic, you can find me talking to people at restaurants, bars, and meetups on a near-nightly basis. I can’t help it, I love learning about other people and seeing how we can help each other through this crazy ride we call life. As an engineer, I naturally mingle with other technologists as they form the basis of my existing network. More often than not, during my first Old Fashioned of the night, the topic of “latest technical trends” comes up during our conversation. We are all feeling the same pain right now…


Overview

Authentication is a trickier subject today than it was 10 years ago. There are hundreds of potential strategies for securing APIs and ensuring that a user is, in fact, who they say they are. When building or refactoring APIs, developers have to decide what authentication strategy makes sense for their particular product use case. This can be daunting, as choosing the wrong approach can lead to difficulties down the road including data breaches, trouble building integrations, and user experience limitations that plague product development. At BoltSource, we’ve had great success leveraging the generic and flexible stateless authentication mechanism provided by…


When building a new integration with a third party API, there are so many different problems to solve! Idempotency, retries, exponential backoffs, authentication… the list goes on and on! One of the most common constraints when integrating with an external API is rate limiting. In this post, we are going show you a very simple pattern that we have found to effectively mitigate the risk of rate limiting without adding a lot of undue complexity on your own side of the integration.

Redis is great. You can do so much with it. Pub/sub, arbitrary data structures, caching… the list is…


The Story

Let me be honest for a second: I love giving tech talks, but my brain hates them. Every single time I sit down to prepare for a tech talk, I hit a writer’s block more substantial than The Wall in Game of Thrones. Writer’s block is not something I am used to dealing with. I can usually sit down at my keyboard and crank out elegant solutions to incredibly hairy distributed systems problems, but when it comes to speaking in front of a room full friends and strangers alike my brain seems to just shut itself off and give me…


Let me be candid: Buzzwords suck. They create unnecessary work hours, missed dinners with family, production outages, and unnecessary refactors of large code bases resulting in the aforementioned undesirable circumstances happening even more often. They also create unhappy clients, missed contracts, lower conversion rates, employee turnover, and more when misapplied as is so often the case.

If you are anything like me, you are pragmatic and care deeply about the 80/20 rule in business. You enjoy working as little as possible for as much value as possible, both for yourself and for your employer and/or clients. So why should you…


There are moments in life where realizations emerge that define our trajectories. Sometimes these moments are sudden onset, such as writing our first computer program that outputs “Hello world”. The feeling is magical and and immediate for many, prompting an indefinite obsession with the quick-feedback creative process of writing computer software. Other times our epiphanies build up over time, taking months or years to ferment into something that compels us to change our direction. Ultimately, these life-changing events propel us forward, and sometimes off to the side- towards new obstacles and endeavors that we feel justify years of our lives.


As originally posted at Jobstart.

Introduction

GraphQL is one of the most exciting technologies gaining developer attention in 2017. A viable alternative to RESTful APIs, GraphQL APIs provide a much more succinct and expressive way to read and write relational data between client and server.

Two of the more exciting pieces of technology within the GraphQL ecosystem are graphql-server and apollo-client, built by the folks at Apollo. In this post, we will focus on discussing high-level GraphQL concepts and getting a basic server up and running with graphql-server.

You can get the finished source code here

Architecture

At a high level, GraphQL…

Andrew E. Rhyne

Software Architect at Cleo Labs

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store