April 3, 2020 by Christopher Sherman
APIs use data transfer objects (DTOs) to compose data from multiple domain entities into a single request. A DTO is an object that carries data between application layers to reduce the number of function calls (Fowler, M.). Compared to RESTful APIs, DTO APIs reduce the number of network requests sent between the API and clients. DTOs also obviate the need for field masks: query parameters used to return only the entity properties desired by clients. While DTO APIs and RESTful APIs are sometimes posed as an either-or choice, we can use them in combination to reduce demand on client devices while maintaining loose coupling between clients and backing services.
October 1, 2019 by Christopher Sherman
An API gateway sits between clients and services. While there is no precise definition of what constitutes an API gateway, functions an API gateway is responsible for typically fall into three categories: routing, aggregation, and cross-cutting functionality. These functions are applicable to many backing services, so having the gateway take responsibility for their implementation yields more focused services and interface consistency. Routing In their role as routers, gateways provide a single endpoint for clients to consume.
September 26, 2019 by Christopher Sherman
The definition of concurrency is simultaneous occurrence. In Python, things that are occurring simultaneously include threads, tasks, and processes, but at a high level, they are each a set of instructions running in order. Each instruction can be stopped at certain points so the CPU processing them can switch to a different instruction set. The state of each instruction set gets saved so the CPU can restart it right where it stopped it.
September 10, 2019 by Christopher Sherman
Cassandra stores data in immutable files on disk, and this data is typically replicated across multiple nodes. To record the fact that a delete occurred, Cassandra writes a special value called a tombstone. The tombstone indicates Cassandra considers the values deleted, and Cassandra will not return the tombstoned data in future queries.
February 8, 2018 by Christopher Sherman
TypeScript interfaces and classes define what objects look like and provide type-checking. The choice between the two structures depends on how much control we need over the implementation details of the objects we create. This article will explain the details of interfaces and classes and provide examples of when it makes sense to use each structure.
May 22, 2017 by Christopher Sherman
Front end and middleware components must agree on an interface for authentication, authorization, exchanging data, etc., and engineers developing these components often work on the same team or closely together. These components, however, do not require tight coupling, and separately developing and running components can increase feature velocity and improve reliability. To separate concerns between an Angular application and its middleware, let’s set up an in-memory API that runs in the debugging environment, while automatically switching to the HTTP API when the application runs in production.
May 14, 2017 by Christopher Sherman
Angular CLI gets projects up and running quickly. If we’re building any substantial web application, soon we’ll need to add routing for displaying different views. To add routing, follow the steps below after generating an Angular CLI project.
May 5, 2017 by Christopher Sherman
A Cassandra data store is made up of a collection of Column Families often referred to as tables. Within each table is a collection of columns. These columns consist of a combination of metadata and data.
April 26, 2017 by Christopher Sherman
Cassandra is an open source, distributed database. It’s useful for managing large quantities of data across multiple data centers as well as the cloud.
April 22, 2017 by Christopher Sherman
Web Workers provide a means for processing data in background threads. Processing that occurs off the main thread is useful because JavaScript code executes in turns on a single thread. In the context of a web browser, while a turn is executing, no other processing occurs, and, if a turn runs long enough, the browser’s interface will be perceptibly frozen.