Skip to content

Latest commit

 

History

History
41 lines (26 loc) · 2.51 KB

File metadata and controls

41 lines (26 loc) · 2.51 KB

Application

This solution implements the same functionality in multiple different programming languages:

Each implementation has two main features:

  • A processing script that takes initial raw data (.csv file) and produces aggregate information, and
  • A web page that uses the aggregate information to serve a Chart.js radar graph.

The index page for each implementation is served by a generated template.

Local development

Use Google Cloud Shell, or a local development installation of the programming language of choice (see this configuration for language versions currently in use).

Each language includes a makefile file that includes common development steps:

  • make install: install the package dependencies
  • make dev: run a local development web server
  • make process: run the processing job locally
  • make test: run unit tests
  • make lint: run linting checks
  • make format: apply linting fixes

Deployment

Each implementation contains a custom Procfile that defines multiple entrypoints:

  • web (default): a production web server
  • process: a script to run the aggregate processing

This image built using Google Cloud's buildpacks in Cloud Build configurations, and deployed as both a Cloud Run service and a Cloud Run job using Terraform.

Language specifics

  • For Node.js, direct commands are encoded into the package.json, and referenced by both makefile and Procfile.
  • For Java, we leverage two different Spring Boot Profilesdefault and locallogging. The default Profile pushes logs to Cloud Logging while locallogging simply pushes logs to standard output. The locallogging Profile is used for local development and unit tests while default is used for production and integration tests.