background

SRE Site Reliability Engineer

Exercise - 01

Are you a talented Site Reliability Engineer? If you can do this coding exercise we'd love to interview you!

Catapult CX helps clients in the public and private sectors transform through accelerated cloud adoption, fostering a collaborative culture and taking an SRE approach to designing and building digital services. We're not just consultants, we all love coding and have years of hands on experience, plus we are a fun and rapidly growing team. We're looking for someone with a similar passion for code and strong expertise in Site Reliability Engineering!

Below is a coding exercise we've created for SRE experts. If you can successfully complete it, then then we'd love to interview you.

So, if you're looking for an SRE role in a dynamic business, with great people, working for a diverse customer base and building effective and innovative solutions, do the exercise now!

Background

One of our clients is the UK government (https://www.gov.uk/) and so all our developers are required to develop services to government standards and styles. You can learn more about these here: https://www.gov.uk/service-manual

When building services we use two main technologies on the government's approved list, ExpressJS and Spring Boot:

  1. https://expressjs.com/
  2. https://spring.io/projects/spring-boot 

All of Catapult CX's developers are required to follow these standards when building software. We also follow agile working practices and key to this is defining requirements as user stories.

This exercise will test your ability to follow these standards, along with your general development capabilities. You'll be required to develop within an existing codebase by writing code to deliver features and tests to fulfil a set of requirements, documented below. 

For this exercise we've made up a client called the "Fictional Department for Acme" and the requirements are written from their perspective.  Please develop your solution as if you're doing it for a real customer. We follow TDD so, at the end, your code should be production ready.

Exercise Overview - Fictional Department of Acme 

The imaginary scenario is that the government's Fictional Department for Acme, which deals with the registration of animals, have engaged Catapult CX as their digital partner. We've been transforming what Acme does into a set of online services that customers can use directly. We have already created an alpha of "Animals Service" that allows users to register their pets online. User feedback has identified some additional requirements for this service that you are tasked with implementing. 

There are two existing codebases that you should extend to complete the exercise. They can be found on GitHub, here:

The UI and the API work together to deliver a service that users can utilise. Currently the animals service has a "cats" capability which allows users to add and view a list of cats. The UI has some screens to view and create cats, and the API has endpoints to save and retrieve this data.

During the exercise you can copy the patterns in place to add additional screens and API endpoints as required. 

 

 draw.io

Source page access restriction: Click the link below to check if the page is accessible.
/wiki/display/HR/Developer+Exercise+-+03

 

Instructions 

You are expected to have basic programming skills and should able to work with an existing codebase that is documented and has tests even if you're not familiar with the language. 

You should start by forking (https://help.github.com/en/github/getting-started-with-github/fork-a-repo) these two repositories and getting them running on the dev machine. Further instructions can be found in the README files in each repository. Read the requirements in the next section and then write code to deliver them. Following these guidelines:

  1. Extend the existing UI and API codebases to deliver the requirements
  2. The projects have tests which will need to be updated for the new screens. Ensure the coverage remains at ~100% and add new tests for new features that you develop
  3. Review what's in place for the "cats" feature and copy this pattern to implement the requirements 
  4. Keep the README updated with any new details or commands 
  5. Commit and push your code as you go not one big commit at the end - commit regularly we expect to see multiple commits
  6. When finished send pull requests with your completed work (https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request)

Requirements 

The "Animals" Service is used to store "cats" and will be extended by the product team to store other animals. We now need to focus on providing a reliable service.

1 - Run services together with docker-compose

As an SRE for animals
I want to be able to run the UI and API together
So that I can run and test the service

Acceptance criteria:

  1. Must use docker-compose 
  2. Must include the API and UI
  3. Must read in environment variables

2 - Profile service performance

As an SRE for animals
I want to profile service performance based upon key SLIs
So that I can identify areas for improvement and provide a reliable service 

Service metrics:

SLI

SLO

SLA

SLI

SLO

SLA

TPS 50 20
Error rate 0.01% 0.1%
Response time 100 ms 1000 ms

Acceptance criteria:

  1. Must create profile tests using a tool such as Gatling or JMeter
  2. Must profile against the defined service metrics
  3. Must profile both services individually and together
  4. Must profile all endpoints relating to /cats 

Background

One of our clients is the UK government (https://www.gov.uk/) and so all our developers are required to develop services to government standards and styles. You can learn more about these here: https://www.gov.uk/service-manual

When building services we use two main technologies on the government's approved list, ExpressJS and Spring Boot:

  1. https://expressjs.com/
  2. https://spring.io/projects/spring-boot 

All of Catapult CX's developers are required to follow these standards when building software. We also follow agile working practices and key to this is defining requirements as user stories.

This exercise will test your ability to follow these standards, along with your general development capabilities. You'll be required to develop within an existing codebase by writing code to deliver features and tests to fulfil a set of requirements, documented below. 

For this exercise we've made up a client called the "Fictional Department for Acme" and the requirements are written from their perspective.  Please develop your solution as if you're doing it for a real customer. We follow TDD so, at the end, your code should be production ready.

Instructions 

You are expected to have a basic programming skills and should able to work with an existing codebase that is documented and has tests even if you are not familiar with the language. 

You should start by forking (https://help.github.com/en/github/getting-started-with-github/fork-a-repo) these two repositories and getting them running on the dev machine. Further instructions can be found in the README files in each repository. Read the requirements in the next section and then write code to deliver them. Following these guidelines:

  1. Extend the existing UI and API codebases to deliver the requirements
  2. The projects have tests which will need to be updated for the new screens. Ensure the coverage remains at ~100% and add new tests for new features that you develop
  3. Review what's in place for the "cats" feature and copy this pattern to implement the requirements
  4. Keep the README updated with any new details or commands 
  5. Commit and push your code as you go not one big commit at the end - commit regularly we expect to see multiple commits
  6. When finished send pull requests with your completed work to:
    https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request)

Requirements 

The "Animals" Service is used to store "cats" and will be extended by the product team to store other animals. We now need to focus on providing a reliable service.

1 - Run services together with docker-compose

As an SRE for animals
I want to be able to run the UI and API together
So that I can run and test the service

Acceptance criteria:

  1. Must use docker-compose 
  2. Must include the API and UI
  3. Must read in environment variables

2 - Profile service performance

As an SRE for animals
I want to profile service performance based upon key SLIs
So that I can identify areas for improvement and provide a reliable service 

Service metrics:

SLI

SLO

SLA

TPS 50 20
Error rate 0.01% 0.1%
Response time 100 ms 1000 ms

Acceptance criteria:

  1. Must create profile tests using a tool such as Gatling or JMeter
  2. Must profile against the defined service metrics
  3. Must profile both services individually and together
  4. Must profile all endpoints relating to /cats