The race has five tiers of competition. You make a racer application that implements a REST API, and we test it out on our racetrack (really just a REST client that calls your application's API).
The first tier is to complete one lap around the track. This means our code will send aPOST requestto your
/racesresource containing a token, which your applicaton needs to remember. Your application should return a raceId that we will use for the remainder of this race.
We will then send aPOST requestto your
/races/{id}/lapsresource containing a new token. For tier one, you don't need to do anything with the new token; that's going to matter for the next tier. Your application needs to respond with the token you received when this race started.
If it all works, our race will record the time it took for the whole process to complete. That's your score for Tier One.
If your racer application successfully completes Tier 1, we will immediately attempt to run one hundred laps as fast as your racer can complete them. This uses the same two Racer API operations that you implemented for Tier 1. The only new requirement is for your
/races/{id}/lapsoperation to remember each new token it receives, so that it can return it the next time.
Your Tier 2 score is the time it takes your racer to complete the initial
POSTto
/racesplus all 100 POSTs to
/races/{id}/laps.
If your racer completes 100 laps, you qualify for Tier 3, and your racer must also implement the/temperatures
resource. This is your first step in the journey to the One Billion Row Challenge!
We will send a
POSTrequest to your racer with an array of temperature measurements collected at weather stations all over the world. Your racer application is expected to respond with the average temperature at each weather station. The stations have to be alphabetized, and the average temperatures have to be rounded to five decimal places like this:
19.03471
For Tier 3, you will receive 1000 measurements, and your score is the time it takes for your racer to respond with accurate results.
If your racer succeeds in Tier 3, we will send another
POSTrequest to the same
/temperaturesresource, this time with 1,000,000 temperature measurements. This might require you to pay more attention to the algorithm you choose, and your racer"s RAM requirements!
If your racer succeeds in Tier 4, you qualify for Tier 5, the One Billion Row Challenge. Congratulations!
We will
POST1,000,000,000 temperature measurements to your racer. This request carries a
Content-Encodingheader to indicate that the request uses gzip compression! This is the highest level of the Anypoint Race, and we will publicly announce everyone who achieves Tier 5 in Season 3!
In order to compete, you need to make a racer application that implements theRacer APIand is reachable from the public internet. You can use any language you want; we tested it using a MuleSoft application and deploying to CloudHub 2.0.
To use the Anypoint Race API (portal), you need to have a client ID and client secret. You can get these by creating an Anypoint Platform account and requesting access on the API Portal. Use the Login link at the top right, and choose "Sign in with Anypoint Platform". If you don't have an account, or if you just want to create a new one, use the "Sign up" button all the way at the bottom.
Once you have an account, there will be a "Request Access" button at the top of the Anypoint Race API portal. Use that to get your client credentials.
You race by making HTTP requests to the Anypoint Race API. I recommend using a REST client such as Postman.
racerIdyou get back. Your racer application will need to provide this racer ID while racing!
Once the race is done, your results will post to the leaderboard! If you want to try again, delete your entry and you will be able to create a new one.
Each time you enter a race, you can see your performance using Check Racer Status (GET /racers/{id}/entry
). You can also see how you‘re doing on the Anypoint Speedway Season 3 Leaderboard.
You must create an application that implements theRacer APIand deploy it somewhere that it is reachable from the public internet.
This API has three operations:
POST /racesStart a race
POST /races/{id}/lapsComplete a lap
POST /temperaturesCompute average temperatures
This operation should expect to receive a token, and save it somewhere to be used later in the Complete a lap operation. It should respond with a unique ID to be used for this race, and the racerId you received from the Race API
POST /registeroperation.
This operation should expect to receive a new token, and save it so that it can be returned in the next request to complete a lap. If this is the first lap, it should respond with the token received in the Start a race operation. Otherwise, it should respond with the token received in the last lap. It also needs to respond with the racerId from the Race API.
This operation is used for Tiers III through V. It should expect to receive an array of temperature measurements, each with a
stationand a
temperature. Your API must average the temperature measurements for each unique value of
stationand respond with an alphabetized array of JSON objects. Each object should provide the name of a station and it‘s temperature average, rounded to five decimal places, like
17.39015.
At Tier III, you will receive 1000 measurements. At Tier IV, you will receive 1000000 measurements.
At Tier V, you will receive 1000000000 measurements, and the request will have a
Content-Encodingheader to indicate that the request body has been compressed. You will need to decompress the JSON in order to average the temperatures. This is a REST API variant of theOne Billion Row Challenge created byGunnar Morling!
You use theAnypoint Race APIto participate in the race. You authenticate with HTTP Basic Authentication, using the client ID and client secret you get when you request access on the Anypoint Race API Portal.
First, you need to register your racer with a display name and an email using thePOST /register
operation. The full URL is
https://api.anypointspeedway.com/race/register.
Then, you can control your racer‘s entry using the
/entryresource:
POST /racers/{racerId}/entry
GET /racers/{racerId}/entry
DELETE /racers/{racerId}/entry