25

QTB Technology Lab - The Travel Domain, Beyond SQL, the Cloud, and more

Embed Size (px)

DESCRIPTION

Results of our Experiments with Technology. We discuss the travel domain, beyond SQL, the cloud, and more...

Citation preview

Page 1: QTB Technology Lab - The Travel Domain, Beyond SQL, the Cloud, and more
Page 2: QTB Technology Lab - The Travel Domain, Beyond SQL, the Cloud, and more

QTB Sept 2013

 @thoughtworks  @tramchester  #twuknorth  

     

Page 3: QTB Technology Lab - The Travel Domain, Beyond SQL, the Cloud, and more

What is a Tech Lab?

•  Experiment  and  learn  about  technology  •  Time-­‐boxed  – 6  weeks  maximum  

•  Small  team  – Core  of  3  people  (2  Developers,  1  BA)  

• With  support  and  experKse  as  needed  

 

Page 4: QTB Technology Lab - The Travel Domain, Beyond SQL, the Cloud, and more

Tech Lab - Desired Outcomes

More  important  Less  important  

Tech  Learning  

Produce  Collateral  

Excite  community  

Working  soOware  to  demo  

•  Tech  Learning  •  Understand  the  pros  and  cons  of  a  technology  •  What  is  good  and  what  is  not  so  good  

•  Working  SoOware  to  demo  •  Create  something  real!  

•  Produce  collateral    •  Produced  tangible  outputs  we  can  share  

•  Excite  Community  •  Get  people  excited  about  what  we  are  doing  

Page 5: QTB Technology Lab - The Travel Domain, Beyond SQL, the Cloud, and more

What did we look at?

•  Domain:  Travel  in  and  around  Manchester  –  Raw  Data  is  available  from  hUp://www.datagm.org.uk/  

– Metrolink  was  iniKal  focus  

•  Tech:  Not  Only  Sql  –  Experiment  with  Graph  database  as  way  of  modeling  a  travel  network  

•  Tech:  cloud  – Host  in  AWS  

Page 6: QTB Technology Lab - The Travel Domain, Beyond SQL, the Cloud, and more

Why the cloud?

•  Keep  things  “RealisKc”  – Compiling  and  running  on  a  laptop  doesn’t  tell  us  enough  

•  Experiment;  not  sure  what  we’d  need  

•  Keep  costs  reasonable  and  controllable  

•  Very  easy  to  automate  and  script  AWS  

Page 7: QTB Technology Lab - The Travel Domain, Beyond SQL, the Cloud, and more

Deployment

•  ConKnuous  Deployment  – We  used  Go  

•  Use  Phoenix  Server  paUern  •  Ant,  shell  scripts  and  Cloud  FormaKon  

•  cloudinit  for  “bootstrapping”  soOware  on  to  the  instances    

Page 8: QTB Technology Lab - The Travel Domain, Beyond SQL, the Cloud, and more

Phoenix Server

•  Axiom:  It  is  easier  to  create  new  instances  and  install  soOware  on  to  them  than  it  is  to  try  and  upgrade  and  reconfigure  soOware  on  exisKng  instances  

• Wanted  to  avoid  complex  chef/puppet  scripts    • We  avoided  chef/puppet  enKrely  J  

•  “Banned”  manual  updates  to  deployed  instances  

Page 9: QTB Technology Lab - The Travel Domain, Beyond SQL, the Cloud, and more

Why a graph database?

Map  ©  Transport  for  Greater  Manchester  2013  

3  

3  

5  

5  2  

2  

2  

2  

Page 10: QTB Technology Lab - The Travel Domain, Beyond SQL, the Cloud, and more

Tram Data…

•  Tabular  Data  in  text  file    •  4  Important  Concepts  •  Stops  •  Routes  •  Services  •  Trips  

Page 11: QTB Technology Lab - The Travel Domain, Beyond SQL, the Cloud, and more

Graph Model – Iteration 1

A1  

A2  

B1  

B2  

3  

3  

C1  

C2  

4  

4  

D1  

D2  

2  

2  

E1  

E2  

3  

3  

G2  

F2  

3  

2  

G1  

F1  

2  

Page 12: QTB Technology Lab - The Travel Domain, Beyond SQL, the Cloud, and more

Graph Model – Iteration 2

A1  

A2  

B1  

B2  

C1  

C2  

D1  

D2  

E1  

E2  

G2  

F2  

G1  

F1  

S1  

Page 13: QTB Technology Lab - The Travel Domain, Beyond SQL, the Cloud, and more

Graph Model – Iteration 3

A1  

A2  

B1  

B2  

C1  

C2  

D1  

D2  

E1  

E2  

G2  

F2  

G1  

F1  

S1  

S2  

S3  

S4  

Page 14: QTB Technology Lab - The Travel Domain, Beyond SQL, the Cloud, and more

Graph Model – Iteration 4

A1  

A2  

B1  

B2  

C1  

C2  

D1  

D2  

E1  

E2  

R1  A1  

R1  B1  

3   R1  C1  

4   R1  D1  

2   R1  E1  

3  

5   1  

A1  

5   1   5   1   5   1   5   1  

Page 15: QTB Technology Lab - The Travel Domain, Beyond SQL, the Cloud, and more

Time Dependent Graph

A   B  

T1  (08:00)  

T2  (08:12)  T3  (08:24)  T4  (08:36)  T5  (08:48)  T6  (09:00)  T7  (09:12)  T8  (09:24)  T9  (09:36)  T10  (09:48)  T11  (10:00)  T12  (10:12)  

Up  to  900  RelaKonships  

C  

T1  (08:05)  

T2  (08:17)  T3  (08:29)  T4  (08:41)  T5  (08:53)  T6  (09:05)  T7  (09:17)  T8  (09:29)  T9  (09:41)  T10  (09:53)  T11  (10:05)  T12  (10:17)  

Page 16: QTB Technology Lab - The Travel Domain, Beyond SQL, the Cloud, and more

Heuristics

A   B  

T4  (08:36)  T5  (08:48)  T6  (09:00)  T7  (09:12)  T8  (09:24)  

C  

T4  (08:41)  T5  (08:53)  T6  (09:05)  T7  (09:17)  T8  (09:29)  

Page 17: QTB Technology Lab - The Travel Domain, Beyond SQL, the Cloud, and more

Geek Night

Next  Wednesday    September  25th    

An  introducKon  to    Graph  Databases  

Page 18: QTB Technology Lab - The Travel Domain, Beyond SQL, the Cloud, and more

The App

hUp://www.tramchester.co.uk  

Page 19: QTB Technology Lab - The Travel Domain, Beyond SQL, the Cloud, and more

How did the team do?

More  important  Less  important  

Tech  Learning  

Produce  Collateral  

Excite  community  

Working  soOware  to  demo  

•  Learnt  about  the  pros  and  cons  of  graph  databases  •  Proved  workability  of  this  approach  •  Re-­‐enforces  view  that  need  to  pick  the  right  Database  model  for  the  domain  

•  Learnt  more  about  using  cloud  formaKon  and  cloudinit  

Page 20: QTB Technology Lab - The Travel Domain, Beyond SQL, the Cloud, and more

How did the team do?

More  important  Less  important  

Tech  Learning  

Produce  Collateral  

Excite  community  

Working  soOware  to  demo   ✔

•  Built  a  working  mobile  web  applicaKon  •  More  successful  than  we  thought!  

•  Local  media  caught  on  •  In  daily  use  

Page 21: QTB Technology Lab - The Travel Domain, Beyond SQL, the Cloud, and more

How did the team do?

More  important  Less  important  

Tech  Learning  

Produce  Collateral  

Excite  community  

Working  soOware  to  demo  

•  Able  to  produce  diaries,  presentaKons,  whitepapers,  videos,  conferences,  and  labs  

•  Including  this  talk  ;-­‐)  •  Geek  Night  •  New  York  GraphConnect  Conference    

Page 22: QTB Technology Lab - The Travel Domain, Beyond SQL, the Cloud, and more

How did the team do?

More  important  Less  important  

Tech  Learning  

Produce  Collateral  

Excite  community  

Working  soOware  to  demo  

•  Lots  of  interest  inside  of  ThoughtWorks  •  Internal  talks  and  presentaKons  conKnue  

•  Interest  outside  of  ThoughtWorks  as  well  •  Next  steps….?  

Page 23: QTB Technology Lab - The Travel Domain, Beyond SQL, the Cloud, and more

A nice problem to have…..

Page 24: QTB Technology Lab - The Travel Domain, Beyond SQL, the Cloud, and more

Next Steps?

•  Would  our  clients  be  interesKng  in  doing  TechLabs?  

•  Team  are  passionate  and  want  to  conKnue  – Your  Ideas?  – Do  we  Open  Source?  

•  Feature  requests  are  sKll  arriving…..  

Page 25: QTB Technology Lab - The Travel Domain, Beyond SQL, the Cloud, and more

Any Questions?

•  Check  out  the  app  at  – hUp://www.tramchester.co.uk  – @tramchester