45
Stockholm Get Social #devsum16

True Reusable Code - DevSum2016

Embed Size (px)

Citation preview

Page 1: True Reusable Code - DevSum2016

Stockholm

Get Social#devsum16

Page 2: True Reusable Code - DevSum2016

Who am I ?

Sr. Solution Consultant with LastMileLink Technologies, a CitySprint UK Innovation Lab, the leading Same Day UK network, often cited as amongst top 5 in Europe.

: #Lazaredd

:https://uk.linkedin.com/in/lazared

Page 3: True Reusable Code - DevSum2016

Process Flow.

Topics

• Software Defined “Everything”

• Geo-Spatial Fleet Analysis using Big-Data

• Truly Reusable Code – FlowBaseProgramming

Page 4: True Reusable Code - DevSum2016

Architect

TADev

Page 5: True Reusable Code - DevSum2016

CommunityNetwork

Marketplace

TechnologyInfrastructure

Data

Source: Sangeet Paul Chaudry , http://platformed.info/platform-stack/

Community, Network, Marketplace

TechnologyInfrastructure

Data

CommunityNetwork

Marketplace

TechnologyInfrastructure

Data

Defunct or Trailing Hanging On Or Declining Thriving & Growing

Leveraging Data produced by Community, Network & Marketplaceis Key to

Platform Success.

From Pipes to Platforms & API Economy

Page 6: True Reusable Code - DevSum2016

Platform Security – Emphasis on Data

Page 7: True Reusable Code - DevSum2016

Platform Security – Data Component

Page 8: True Reusable Code - DevSum2016

Software Defined “Everything”

Page 9: True Reusable Code - DevSum2016

Process Flow.

“Software is Eating the World”

Image : Pivotal

Marc Andreessen , WSJ 2011

Page 10: True Reusable Code - DevSum2016

Cloud Natives

$6B $50B $41B

$25B $33.5B

Page 11: True Reusable Code - DevSum2016

11

SPEED

UBIQUITY*SCALE

SAFETY

(MOBILE and APIs

Four key patterns

Page 12: True Reusable Code - DevSum2016

12

Day One Day Two and BeyondDeliver Continuously

DevSecOps and Rugged

How we do it

Page 13: True Reusable Code - DevSum2016

13

Build Reliable Systemsfrom

Unreliable Components

Invite Chaos

Page 14: True Reusable Code - DevSum2016

14

What a Cloud Native is NOT:

•Just Configuring Infrastructure

•Just Orchestrating Containers

•Composing Distributed Systems

•Supporting Ad-Hoc General Purpose Automation

Page 15: True Reusable Code - DevSum2016

Conway’s Law.

Any organization that designs a system (defined broadly) will produce a design whose structure is a copy of the

organization's communication structure.

Melvyn Conway, 1967

Page 16: True Reusable Code - DevSum2016

Invoke the Inverse Conway Maneuver

Page 17: True Reusable Code - DevSum2016

Breaking the Monolith & Scale

Page 18: True Reusable Code - DevSum2016

How deep is deep enough?

Page 19: True Reusable Code - DevSum2016

An example - Mantl.io

Image Source: Mantle.io

Page 20: True Reusable Code - DevSum2016

Infrastructure Metrics, Monitoring and Microservices Simulation

Image Source: Instana, Image: Spigo and SIMIANVIZ

https://github.com/adrianco/spigo

Page 21: True Reusable Code - DevSum2016

Command and Control

Page 22: True Reusable Code - DevSum2016

Omakase

omakaseəʊməˈkaseɪ,əʊˈmakəseɪ/noun1.(in a Japanese restaurant) a type of meal consisting of dishes selected by the chef.2."we had the five-course omakase"

Source:Wikipedia

“ Rails is omakase (DHH) - David Heinemeier Hansson “

Page 23: True Reusable Code - DevSum2016

SPRING CLOUD

23

http://cloud.spring.iohttps://network.pivotal.io/products/p-spring-cloud-services

Omakase Distibuted Systems

Page 24: True Reusable Code - DevSum2016

Zeta Architecture - Technologies That Work

• Dynamic compute resources• Common storage platform• Real-time application support• Flexible programming

models• Deployment management• Solution based approach• Applications to operate a

business

* This is a pluggable architectureImage Source: courtesy of Jim Scott @ MapR

Page 25: True Reusable Code - DevSum2016

PolyglotProgramming?

Page 26: True Reusable Code - DevSum2016

Fleet Geospatial Analysis

Page 27: True Reusable Code - DevSum2016

Process Flow.

Blue signals a pick-upRed signals a drop-off

Sample of how one driver’s journey looks like

Used for:• Viewing the base unit of analysis

Page 28: True Reusable Code - DevSum2016

Process Flow.Demand heat map

Page 29: True Reusable Code - DevSum2016

Demand heat mapHeat map of pickup locations density

Used for:• Optimising resource allocation• Identifying areas for potential expansion

Page 30: True Reusable Code - DevSum2016

Process Flow.K-means clustering analysis – 40 centres

Page 31: True Reusable Code - DevSum2016

K-means clustering analysis – 40 centresEmployed the K-means algorithm to identify clusters of pickup points

Used for:• Validating against current service centres map• Identifying areas for potential expansion

Page 32: True Reusable Code - DevSum2016

Process Flow.K-means 100 centres

Can we be better placed ? Where can we plan the next M&A?

Page 33: True Reusable Code - DevSum2016

K-means 100 centresHigher granularity clustering

Used for:• Assessing the frequency of pickups for

micro-clusters (e.g. villages, neighbourhoods)

• Directing drivers to hotter waiting areas

Page 34: True Reusable Code - DevSum2016

Process Flow.Geographical supply & demand

Page 35: True Reusable Code - DevSum2016

Geographical supply & demandPickup locations shown vs to routes

Used for:• Improving likelihood of parcel pickup while on-route

Page 36: True Reusable Code - DevSum2016

Demand variation across time

Page 37: True Reusable Code - DevSum2016

0 3 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 230.0

4.5

9.0

13.5

18.0

Expected parcels allocated to cluster 41 (Stevenage)

Time of day

Exp

ecte

d pa

rcel

sDemand variation across time

Used for:• Positioning couriers in the right place at the right

time

For each demand cluster we calculated the frequency of pickups per hour

Page 38: True Reusable Code - DevSum2016

Solution Summary

Page 39: True Reusable Code - DevSum2016

The solution outline

• Data science capabilities of Spark, easy to use with SQL knowledge• Map plotting on Esri– heat mapping, zoom in/out capabilities, real-time• High-performance due to in-memory processing capabilities of Spark• Can work with large data sets due to high performance disk-based

data access in Hadoop File System (HDFS)• Can import data from EDW• All delivered with Bigstep on their high performance Full Metal Cloud

Page 40: True Reusable Code - DevSum2016

IaaS-Paas

Shout out to Bigstep

Page 41: True Reusable Code - DevSum2016

Process Flow.Heavy Lifting done by:

Shout out to Bigstep

Page 42: True Reusable Code - DevSum2016

Process Flow.

Shout out to Bigstep

84 Lines of Scala code in Spark

Page 43: True Reusable Code - DevSum2016

Process Flow.

FlowBasedProgramming(FBP)

Switch and …

Page 44: True Reusable Code - DevSum2016

DevSum 2016

Stockholm

Please vote for this session on DevSum App

Page 45: True Reusable Code - DevSum2016

: #Lazaredd

:https://uk.linkedin.com/in/lazared