Copying Production DB Server to Develop

flock of sheep eating grass

The current configuration (through July 6 2022) hosts the production, staging, develop, and independent developer databases all on a single RDS server. While this makes it very fast and easy to replicate production data to the develop and staging databases, it does mean a shared database server. The memory and CPU resource will be utilized […]

Exec Review : 04/28/2022 API Server Downtime Analysis

Initial Review Reference: original write up of the API Server crash in April 2022 Synopsis Problem Production API Server went offline from 9:35AM to 10:35AM on April 28th, 2022 (Thu). Resolution Process Production API EC2 instance was non-responsive and not accepting SSH connections, server rebooted. Connectivity restored but the REST API connection was not running. […]

API Performance Deep Dive

focused biologist studying plant leaf with microscope

Knex Digging deeper into the Knex queries can be done with the knex configuration option debug set to true. Enabling Debug Output for Knex On the OB API server you can turn debugging output from Knex by updating the knexInstance definition as follows: In the BE file: .env Add a line like this… # Knex/Objection […]

Data Migrations In The OmniBlocks® API

city technology architecture luxury

Data migrations are handled via the Knex migration system. Migrations provide a managed and version-control-backed method for modifying the data structures that support the API. Adding A Migration yarn add-migration <newMigrationName> creates a duplicate of migration.stub.ts that includes -the needed module-alias import and -a standard/initial TS up/down export setup. Running A Migration You’ll first need […]

JSDoc commentary with CTRL-click navigation

TS-friendly, ctrl-click navigable variable references in jsDoc comment blocks How: Import whateverVar as a type-only import Then in your jsDoc comment, you can @link to that variable: You can then ctrl-click to navigate directly to whateverVar declaration / jsDoc commentary in the code. (at least in VS code – but I imagine the other modern […]

Unit Conversion Helpers

data codes through eyeglasses

Starting in 1.81 there is a new unit conversion helper that allows data queries to return a simple unit ID for measures. This unit ID can have attributes looked up via a singleton unit measure object that is invoked via the forUnits utility. forUnits helper – loadUnitData() This method lives in utils/helpers/forUnits. The method creates […]

API Documentation

The API documentation is generated with a jsDoc tool whenever the develop server is updated. The document generation command is built into the API’s package.json as a command. This command it run via the Jenkins configuration script on the Develop Backend Server whenever it detects code changes on the develop branch of the API codebase. […]

Apr 28 2022 9:35 – 10:35 AM Downtime Analysis

9:44AM EST report came in that tenants could not login to production The Live BE server on EC2 was non-responsive when trying to login to Jenkins. Rebooted the EC2 instance after viewing the monitoring reports. Approximately 9:35AM CPU spike to near 100%. Started a rebuild process on Jenkins to force the API to do a […]

Data Structure: Tables

A partial list of OmniBlocks® API tables and their role. brand List of brands with a link to the brand’s primary website. brand_tenant_map Joiner table that links brands to tenants. Allows a brand to potentially be associated with more than one tenant. custom_templates The form builder templates (forms) used to set the steps for MMRs […]