Skip to content

Instantly share code, notes, and snippets.

@escherize
Created August 28, 2014 00:45
Show Gist options
  • Save escherize/591e6dd75f5e46a0cea0 to your computer and use it in GitHub Desktop.
Save escherize/591e6dd75f5e46a0cea0 to your computer and use it in GitHub Desktop.

Make Chesterfield Fail CI when there’s an error

make Chesterfield pass tests

Had error where keyword was lost…

actually it was stuck in the DB, but was removed from the codebase.

Must update protobuf -> 600+ validation errors.

updated protobuf -> 420 validation errors.

help Alex

Beatlegeuse config map stuff

connect to Redshift

limit 10 in betelgeuse

Eccentrica overview meeting:

4 major api calls:

Starting with the api side.

get-user-token - really set user token.

Starting session, here’s the token to save Expect the request to have a user token and device id. Furtive makes these. It also gives us a merchant, and we associate the rut with the mid.

Partition

assocated with a device
for this run, these were all the sessions with the same device tracker id.
eventually: what if, tomorrow we switch to StaplesUserId?
belongs to a run

Ensure

(Really is upsert)
split into two storedprocs:

because get user token is followed very closely by a get-buckets call, and we need to have the rut+did in the db before get-buckets asks.

Adds device to the partition

get-buckets - return buckets for merchant and user token.

most performance critical API call. Must be below 10ms as per SLA FOR SURE.

Takes a merchant id, user token, and list of experiments

Says what buckets the user is in for the list of experiments

elects buckets…

uses hashing

partition id thing

execute-pending-io

after we return a value for get-buckets we can look up.. something

confirm-bucket

update confirmed = true in session_buckets where rut = $rut, and bucket = $bucket.

record-event

Hashing solution fix?: affix some info to the device id or rut!! - like with buckets.

sequence diagram

s -> f: get-buckets (user token) f -> e: get-buckets (user token) e -> e: use hash to find buckets and inject buckets into [user token] e -> f: return new user token + buckets f -> s: buckets e -> db: update user token

staples -> Furtive: get-user-token () Furtive ->+ Eccentrica: get-user-token ()

Eccentrica -> db: use hash to find rut -> use hash to append bucket info to rut. Eccentrica –>- Furtive: return user token Furtive -> staples: return user token

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment