Codementor Events

Telematics Developers Challenge

Published Feb 05, 2021

Our telematics technology helps us to process millions of car journeys each week by taking raw input data from sensors on both black box devices and mobile phones.

This challenge will be to create a simplified version of one of our components to process basic trips and enhance them with additional information like average speeds and total distance travelled.

Your challenge is to write a prototype node.js application with typescript with the following features:

  1. Receive a stream of new “trips” (schema attached) ready for processing.
    a. You can implement any mechanism you wish to receive new trips within your main application, including REST endpoints, Pub/Sub, message brokers, local setInterval to publish into a stream, or another solution.
  2. Process the trip into an “enhanced trip” (schema attached)
    a. You can use any type of programming idiom or library you prefer to create the enhanced trip.
    b. An enhanced trip is simply a trip with the average speed and total distance calculated. In a real application, there would be many other calculations of interest.
  3. Push out the enhanced trip to a REST destination.
    a. The end destination does not need to exist, for example, it can be configured as “localhost:9999/enhanced-trips”.

This task is purposefully abstract to require you to think about the entire processing pipeline of data from input to processing and output using node.js and typescript.

You may wish to use a serverless approach and frameworks. Please include any relevant logging, comments, tests and documentation that will be useful in our evaluation.

The code does not need to be deployed onto any cloud environment for evaluation.

Assessment

Assessment of the challenge will be based almost entirely on the quality of the code produced.

We will not be judging the code based on individual technologies or libraries used. However we will be judging based on whether the pipeline application works from end-to-end and can be understood and adapted for real world usage.

Completion

We would not expect this challenge to take more than
one day to complete. If you find that you would need more than one day to complete this task, you should end the task and send what you have for assessment.

Schemas


interface IDataPoint {
  timestamp: string // ISO-8601 timestamp
  location: {
    latitude: number
    longitude: number
  }
  speed: number // metres per second
} 

interface ITrip {
  id: string // random, unique ID
  dataPoints: IDataPoint[] // each trip must have at least 1000 data points
} 

interface IEnhancedTrip extends ITrip {
  averageSpeed: number // meters per second
  totalDistance: number // meters
}
Discover and read more posts from Kevin Hansen
get started