Skip to content

kiwipower/dispatch-interview-coding-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dispatch Orchestrator Interview Coding Exercise

We're looking for candidates to show TDD and design skills and well as familiarity with the typelevel stack (cats-effect, circe, http4s, etc). We're more interested in seeing well-tested and well-designed code than finishing all the features.

The problem

The purpose of the code is to dispatch (turn on) industrial assets and inform site owner's that their asset was either successfully or unsuccessfully dispatched. Integration with the asset and email sending are handled by third parties via http apis.

Asset dispatch interface

Assume a third party API that will dispatch assets given the following endpoint:

POST to /dispatch/<assetId>/<durationInSeconds> where assetId is an int and durationInSeconds is how long to dispatch for in seconds returns 200 OK if accepted, 400 otherwise

Email notification interface

Assume a third party API that will send emails given the following endpoint:

POST to /email with json body {"contact" : {"email" : "<emailaddress>"}, "content" : "<textOfEmail>" } where emailaddress is email of contact and textOfEmail is email content returns 200 OK if accepted, 400 otherwise

Stories

As an aggregator I want to be able to dispatch assets so i can participate in DSR programmes

As an aggregator I want to know when an asset didn't dispatch successfully via a non-200 return code so I can manage my risk when participating in programmes

As an asset owner I don't want my asset to be run for too short (less than 10 minutes) or too long (greater than 120 minutes) So I keep my asset within warranty

As an asset owner I want to be emailed when my asset is dispatched So I'm not surprised by my asset turning off/on

As an asset owner I want to be emailed when my asset fails to dispatch So I can manually dispatch instead and still be paid

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages