SlideShare une entreprise Scribd logo
1  sur  88
MORE THAN DATA
Using Riak Core to Manage Distributed
Services
Who Am I?
Miles O’Connell
@milesoc (twitter/github)
Software Engineer at StackMob
Backend-As-A-Service
• Data API
• Push
• Third Party Marketplace
• etc.
Backend-As-A-Service
• Data API
• Push
• Third Party Marketplace
• etc.
Service Oriented Architecture (SOA)
Service Oriented Architecture

Creative Commons License – Flickr/Jared Tarbell
CAP Theorem
• Consistency
• Availability
• Partition Tolerance
Service Oriented Architecture
• Versioning (“Consistency”)
• Availability
• Partition Tolerance
Service Oriented Architecture
Service A

Service B

Service C

Service D
Service Oriented Architecture
Service A

Service B
Service B
(v2)

Service C

Service D

Service D
(v2)
Service Oriented Architecture
Service A

Service B
Service B
(v2)

Service C

Service D

Service D
(v2)
Service Oriented Architecture
Service A
Service B
(v2)

Service C

Service D
(v2)
Service Oriented Architecture
• Versioning (“Consistency”)
• Availability
• Partition Tolerance
Custom Code

Data API

3rd Party

Push

API Versioning
etc.
etc.
etc.
Custom Code

Data API

Push

3rd Party

API Versioning
etc.
etc.
etc.

Custom Code
Custom Code

Data API

3rd Party

Push

API Versioning
etc.
etc.
etc.
Service Oriented Architecture
• Versioning (“Consistency”)
• Availability
• Partition Tolerance
Service Oriented Architecture
• Versioning (“Consistency”)
• Availability
• Partition Tolerance
• Automated
Riak Core
• https://github.com/basho/riak_core
• Erlang library for building distributed systems
Riak Core
2160

0
Riak Core
2160

Key

0
Riak Core
vnode
Riak Core

Physical Server 1
Physical Server 2
Physical Server 3
Riak Core

Physical Server 1
Physical Server 2
Physical Server 3
Riak Core
K, V

Physical Server 1
Physical Server 2
Physical Server 3
Riak Core
K, V

Physical Server 1
Physical Server 2
Physical Server 3
Riak Core
K, V

Physical Server 1
Physical Server 2
Physical Server 3
Riak Core
K, V

Physical Server 1
Physical Server 2
Physical Server 3
Riak Core

Physical Server 1

K, V

Physical Server 3

Physical Server 2
Riak Core
K, V

Physical Server 1
Physical Server 2
Physical Server 3
Riak Core
K, V

Physical Server 1
Physical Server 2
Physical Server 3
SOA on Riak Core
Request

Physical Server 1
Physical Server 2
Physical Server 3

Service
Instance
SOA on Riak Core
Request

Physical Server 1
Physical Server 2
Physical Server 3

CC
Instance
SOA on Riak Core
Request

Physical Server 1
Physical Server 2

CC
Instance
Physical Server 1

SOA on Riak Core
Request

CC
Instance

Physical Server 2
Physical Server 1

SOA on Riak Core
Request

Webmachine

CC
Instance

Physical Server 2
Physical Server 1

SOA on Riak Core
Request

Webmachine
proxy_coord

CC
Instance

Physical Server 2
Physical Server 1

SOA on Riak Core
Request

Webmachine
proxy_coord
vnode

CC
Instance

Physical Server 2
Physical Server 1

SOA on Riak Core
Request

Webmachine
proxy_coord
vnode
instance_mgr

CC
Instance

Physical Server 2
Physical Server 1

SOA on Riak Core
Request

Webmachine
proxy_coord
vnode
instance_mgr

proxy_op
CC
Instance

Physical Server 2
Physical Server 1

SOA on Riak Core
Request

Webmachine
proxy_coord
vnode
instance_mgr

proxy_op
CC
Instance

Physical Server 2
Physical Server 1

SOA on Riak Core
Request

Deploy

Webmachine
proxy_coord

deploy_coord
vnode

instance_mgr

instance_mgr

proxy_op

deploy_op

CC
Instance

CC
Instance

Physical Server 2
SOA on Riak Core
Request

Physical Server 1
Physical Server 2
Physical Server 3

CC
Instance
Service Oriented Architecture
• Versioning (“Consistency”)
• Availability
• Partition Tolerance
• Automated
SOA on Riak Core - Replication
Request

Service
Instance

Service
Instance

Service
Instance
SOA on Riak Core - Replication
•R
• How many replicas must we read

•W
• How many replicas must we write
•N
• How many replicas should exist
Riak Core - Replication
K, V
Riak Core - Replication
K, V

Physical Server 1
Physical Server 2
Physical Server 3
SOA on Riak Core - Replication
Request

Service
Instance

Service
Instance

Service
Instance
Physical Server 1
Physical Server 2
Physical Server 3
SOA on Riak Core - Replication
Request

Service
Instance

Service
Instance

Service
Instance
Physical Server 1
Physical Server 2
Physical Server 3
SOA on Riak Core - Replication
Request

Service
Instance

Service
Instance

Service
Instance
Physical Server 1
Physical Server 2
Physical Server 3
SOA on Riak Core - Replication
Request

Service
Instance

Service
Instance

Service
Instance
Physical Server 1
Physical Server 2
Physical Server 3
SOA on Riak Core - Replication
Request

Service
Instance

Service
Instance

Service
Instance
Physical Server 1
Physical Server 2
Physical Server 3
SOA on Riak Core - Replication
Request

Service
Instance

Service
Instance

Service
Instance
Physical Server 1
Physical Server 2
Physical Server 3
SOA on Riak Core - Replication
Request

Service
Instance

Service
Instance

Service
Instance
Physical Server 1
Physical Server 2
Physical Server 3
SOA on Riak Core - Replication
Deploy

Physical Server 1
Physical Server 2
Physical Server 3
SOA on Riak Core - Replication
Deploy

Service
Instance

Service
Instance

Service
Instance
Physical Server 1
Physical Server 2
Physical Server 3
SOA on Riak Core
• Versioning (“Consistency”)
• Availability✔
• Partition Tolerance
SOA on Riak Core
• Versioning (“Consistency”)
• Availability✔
• Partition Tolerance
SOA on Riak Core - Handoff

Service
Instance

Service
Instance
Physical Server 1
Physical Server 2
Physical Server 3
SOA on Riak Core - Handoff

Service
Instance
Physical Server 1
Physical Server 2
Physical Server 3
SOA on Riak Core - Handoff

Service
Instance
Physical Server 1
Physical Server 2
Physical Server 3
SOA on Riak Core - Handoff

Service
Instance
Physical Server 1
Physical Server 2
Physical Server 3
SOA on Riak Core - Handoff

Service
Instance
Physical Server 1
Physical Server 2
Physical Server 3
SOA on Riak Core - Handoff

Service
Instance
Physical Server 1
Physical Server 2
Physical Server 3
SOA on Riak Core - Handoff

Service
Instance
Physical Server 1
Physical Server 2
Physical Server 3
SOA on Riak Core - Handoff

Service
Instance

Service
Instance
Physical Server 1
Physical Server 2
Physical Server 3
SOA on Riak Core - Handoff

Service
Instance

Service
Instance
Physical Server 1
Physical Server 2
Physical Server 3
SOA on Riak Core
• Versioning (“Consistency”)
• Availability✔
• Partition Tolerance✔
SOA on Riak Core
• Versioning (“Consistency”)
• Availability✔
• Partition Tolerance✔
SOA on Riak Core - Versioning
Deploy
(v2)

Service
(v1)

Service
(v1)

Service
(v1)
SOA on Riak Core - Versioning
Deploy
(v2)

Service
(v1)

Service
(v1)

Service
(v1)
SOA on Riak Core - Versioning
/{service}/{version}/api/{endpoint}
SOA on Riak Core - Versioning
Request

Bastion

Service
(v1)

Service
(v1)

Service
(v1)
SOA on Riak Core - Versioning
Service A
(v1)

Service A
(v1)

Service B
(v1)

Service B
(v1)
SOA on Riak Core - Versioning
Service A
(v1)

Service A
(v1)

Service B
(v1)

Service B
(v1)
SOA on Riak Core - Versioning
Service A
(v1)

Service B
(v1)

Service A
(v1)

Service B
(v1)

Service A
(V2)

Service B
(V2)

Service B
(V2)

Service A
(V2)
SOA on Riak Core - Versioning
Service A
(v1)

Service B
(v1)

Service A
(v1)

Service B
(v1)

Service A
(V2)

Service B
(V2)

Service B
(V2)

Service A
(V2)
SOA on Riak Core - Versioning
Service A
(v1)

Service B
(v1)

Service A
(v1)

Service B
(v1)

Service A
(V2)

Service B
(V2)

Service B
(V2)

Service A
(V2)
SOA on Riak Core
• Versioning (“Consistency”) ✔?
• Availability✔
• Partition Tolerance✔
SOA on Riak Core - Integration
Three key features
SOA on Riak Core - Integration
Three key features
• Management API (Startup/Shutdown)
SOA on Riak Core - Integration
Three key features
• Management API (Startup/Shutdown)
• Consistent Service Responses
SOA on Riak Core - Integration
Three key features
• Management API (Startup/Shutdown)
• Consistent Service Responses
• Status Check Endpoint
SOA on Riak Core
• Riak Core can work for any distributed system
SOA on Riak Core
• Riak Core can work for any distributed system
• Riak Core provides:
• Availability
• Partition Tolerance
SOA on Riak Core
• Riak Core can work for any distributed system
• Riak Core provides:
• Availability
• Partition Tolerance
• You need external coordination (Consistency)
SOA on Riak Core
• Riak Core can work for any distributed system
• Riak Core provides:
• Availability
• Partition Tolerance
• You need external coordination (Consistency)
• You provide:
• Management API
• Consistent Responses
• Health Check
Acknowledgements
• Jordan West (GitHub: jrwest)
• Everyone at StackMob

Contenu connexe

Tendances

More Data, More Problems: Scaling Kafka Mirroring Pipelines at LinkedIn
More Data, More Problems: Scaling Kafka Mirroring Pipelines at LinkedInMore Data, More Problems: Scaling Kafka Mirroring Pipelines at LinkedIn
More Data, More Problems: Scaling Kafka Mirroring Pipelines at LinkedInCelia Kung
 
Development of a Cisco ACI device package for NGINX as a Load-Balancer
Development of a Cisco ACI device package for NGINX as a Load-BalancerDevelopment of a Cisco ACI device package for NGINX as a Load-Balancer
Development of a Cisco ACI device package for NGINX as a Load-BalancerFabrice Servais
 
Git at scale-helix4_git (1)
Git at scale-helix4_git (1)Git at scale-helix4_git (1)
Git at scale-helix4_git (1)Perforce
 
Declarative benchmarking of cassandra and it's data models
Declarative benchmarking of cassandra and it's data modelsDeclarative benchmarking of cassandra and it's data models
Declarative benchmarking of cassandra and it's data modelsMonal Daxini
 
Netflix Edge Engineering Open House Presentations - June 9, 2016
Netflix Edge Engineering Open House Presentations - June 9, 2016Netflix Edge Engineering Open House Presentations - June 9, 2016
Netflix Edge Engineering Open House Presentations - June 9, 2016Daniel Jacobson
 
From Zero to Hero with Kafka Connect
From Zero to Hero with Kafka ConnectFrom Zero to Hero with Kafka Connect
From Zero to Hero with Kafka Connectconfluent
 
Design and Implementation of Incremental Cooperative Rebalancing
Design and Implementation of Incremental Cooperative RebalancingDesign and Implementation of Incremental Cooperative Rebalancing
Design and Implementation of Incremental Cooperative Rebalancingconfluent
 
Building a Modern Website for Scale (QCon NY 2013)
Building a Modern Website for Scale (QCon NY 2013)Building a Modern Website for Scale (QCon NY 2013)
Building a Modern Website for Scale (QCon NY 2013)Sid Anand
 
A Tale of Two Data Centers: Kafka Streams Resiliency (Anna McDonald, Confluen...
A Tale of Two Data Centers: Kafka Streams Resiliency (Anna McDonald, Confluen...A Tale of Two Data Centers: Kafka Streams Resiliency (Anna McDonald, Confluen...
A Tale of Two Data Centers: Kafka Streams Resiliency (Anna McDonald, Confluen...confluent
 
Westpac Bank Tech Talk 1: Dive into Apache Kafka
Westpac Bank Tech Talk 1: Dive into Apache KafkaWestpac Bank Tech Talk 1: Dive into Apache Kafka
Westpac Bank Tech Talk 1: Dive into Apache Kafkaconfluent
 
Red Hat Agile integration workshop - Atlanta
Red Hat Agile integration workshop - AtlantaRed Hat Agile integration workshop - Atlanta
Red Hat Agile integration workshop - AtlantaJudy Breedlove
 
Openstack meetup: Bootstrapping OpenStack to Corporate IT
Openstack meetup: Bootstrapping OpenStack to Corporate ITOpenstack meetup: Bootstrapping OpenStack to Corporate IT
Openstack meetup: Bootstrapping OpenStack to Corporate ITMirantis
 
Open Connect Firmware Delivery With Spinnaker (Spinnaker Summit 2018)
Open Connect Firmware Delivery With Spinnaker (Spinnaker Summit 2018)Open Connect Firmware Delivery With Spinnaker (Spinnaker Summit 2018)
Open Connect Firmware Delivery With Spinnaker (Spinnaker Summit 2018)Asher Feldman
 
Putting Kafka In Jail – Best Practices To Run Kafka On Kubernetes & DC/OS
Putting Kafka In Jail – Best Practices To Run Kafka On Kubernetes & DC/OSPutting Kafka In Jail – Best Practices To Run Kafka On Kubernetes & DC/OS
Putting Kafka In Jail – Best Practices To Run Kafka On Kubernetes & DC/OSLightbend
 
Simplifying Migration from Kafka to Pulsar - Pulsar Summit NA 2021
Simplifying Migration from Kafka to Pulsar - Pulsar Summit NA 2021Simplifying Migration from Kafka to Pulsar - Pulsar Summit NA 2021
Simplifying Migration from Kafka to Pulsar - Pulsar Summit NA 2021StreamNative
 
Patterns and Pains of Migrating Legacy Applications to Kubernetes
Patterns and Pains of Migrating Legacy Applications to KubernetesPatterns and Pains of Migrating Legacy Applications to Kubernetes
Patterns and Pains of Migrating Legacy Applications to KubernetesJosef Adersberger
 
Camel Kafka Connectors: Tune Kafka to “Speak” with (Almost) Everything (Andre...
Camel Kafka Connectors: Tune Kafka to “Speak” with (Almost) Everything (Andre...Camel Kafka Connectors: Tune Kafka to “Speak” with (Almost) Everything (Andre...
Camel Kafka Connectors: Tune Kafka to “Speak” with (Almost) Everything (Andre...HostedbyConfluent
 
Typesafe Reactive Platform: Monitoring 1.0, Commercial features and more
Typesafe Reactive Platform: Monitoring 1.0, Commercial features and moreTypesafe Reactive Platform: Monitoring 1.0, Commercial features and more
Typesafe Reactive Platform: Monitoring 1.0, Commercial features and moreLegacy Typesafe (now Lightbend)
 
RICON 2014 Running Riak in a Docker Cloud using Apache Brooklyn
RICON 2014 Running Riak in a Docker Cloud using Apache BrooklynRICON 2014 Running Riak in a Docker Cloud using Apache Brooklyn
RICON 2014 Running Riak in a Docker Cloud using Apache BrooklynDuncan Johnston-Watt
 
CICS TS V4 and V5 recap, and the new V5.3 open beta
CICS TS V4 and V5 recap, and the new V5.3 open betaCICS TS V4 and V5 recap, and the new V5.3 open beta
CICS TS V4 and V5 recap, and the new V5.3 open betaMark Cocker
 

Tendances (20)

More Data, More Problems: Scaling Kafka Mirroring Pipelines at LinkedIn
More Data, More Problems: Scaling Kafka Mirroring Pipelines at LinkedInMore Data, More Problems: Scaling Kafka Mirroring Pipelines at LinkedIn
More Data, More Problems: Scaling Kafka Mirroring Pipelines at LinkedIn
 
Development of a Cisco ACI device package for NGINX as a Load-Balancer
Development of a Cisco ACI device package for NGINX as a Load-BalancerDevelopment of a Cisco ACI device package for NGINX as a Load-Balancer
Development of a Cisco ACI device package for NGINX as a Load-Balancer
 
Git at scale-helix4_git (1)
Git at scale-helix4_git (1)Git at scale-helix4_git (1)
Git at scale-helix4_git (1)
 
Declarative benchmarking of cassandra and it's data models
Declarative benchmarking of cassandra and it's data modelsDeclarative benchmarking of cassandra and it's data models
Declarative benchmarking of cassandra and it's data models
 
Netflix Edge Engineering Open House Presentations - June 9, 2016
Netflix Edge Engineering Open House Presentations - June 9, 2016Netflix Edge Engineering Open House Presentations - June 9, 2016
Netflix Edge Engineering Open House Presentations - June 9, 2016
 
From Zero to Hero with Kafka Connect
From Zero to Hero with Kafka ConnectFrom Zero to Hero with Kafka Connect
From Zero to Hero with Kafka Connect
 
Design and Implementation of Incremental Cooperative Rebalancing
Design and Implementation of Incremental Cooperative RebalancingDesign and Implementation of Incremental Cooperative Rebalancing
Design and Implementation of Incremental Cooperative Rebalancing
 
Building a Modern Website for Scale (QCon NY 2013)
Building a Modern Website for Scale (QCon NY 2013)Building a Modern Website for Scale (QCon NY 2013)
Building a Modern Website for Scale (QCon NY 2013)
 
A Tale of Two Data Centers: Kafka Streams Resiliency (Anna McDonald, Confluen...
A Tale of Two Data Centers: Kafka Streams Resiliency (Anna McDonald, Confluen...A Tale of Two Data Centers: Kafka Streams Resiliency (Anna McDonald, Confluen...
A Tale of Two Data Centers: Kafka Streams Resiliency (Anna McDonald, Confluen...
 
Westpac Bank Tech Talk 1: Dive into Apache Kafka
Westpac Bank Tech Talk 1: Dive into Apache KafkaWestpac Bank Tech Talk 1: Dive into Apache Kafka
Westpac Bank Tech Talk 1: Dive into Apache Kafka
 
Red Hat Agile integration workshop - Atlanta
Red Hat Agile integration workshop - AtlantaRed Hat Agile integration workshop - Atlanta
Red Hat Agile integration workshop - Atlanta
 
Openstack meetup: Bootstrapping OpenStack to Corporate IT
Openstack meetup: Bootstrapping OpenStack to Corporate ITOpenstack meetup: Bootstrapping OpenStack to Corporate IT
Openstack meetup: Bootstrapping OpenStack to Corporate IT
 
Open Connect Firmware Delivery With Spinnaker (Spinnaker Summit 2018)
Open Connect Firmware Delivery With Spinnaker (Spinnaker Summit 2018)Open Connect Firmware Delivery With Spinnaker (Spinnaker Summit 2018)
Open Connect Firmware Delivery With Spinnaker (Spinnaker Summit 2018)
 
Putting Kafka In Jail – Best Practices To Run Kafka On Kubernetes & DC/OS
Putting Kafka In Jail – Best Practices To Run Kafka On Kubernetes & DC/OSPutting Kafka In Jail – Best Practices To Run Kafka On Kubernetes & DC/OS
Putting Kafka In Jail – Best Practices To Run Kafka On Kubernetes & DC/OS
 
Simplifying Migration from Kafka to Pulsar - Pulsar Summit NA 2021
Simplifying Migration from Kafka to Pulsar - Pulsar Summit NA 2021Simplifying Migration from Kafka to Pulsar - Pulsar Summit NA 2021
Simplifying Migration from Kafka to Pulsar - Pulsar Summit NA 2021
 
Patterns and Pains of Migrating Legacy Applications to Kubernetes
Patterns and Pains of Migrating Legacy Applications to KubernetesPatterns and Pains of Migrating Legacy Applications to Kubernetes
Patterns and Pains of Migrating Legacy Applications to Kubernetes
 
Camel Kafka Connectors: Tune Kafka to “Speak” with (Almost) Everything (Andre...
Camel Kafka Connectors: Tune Kafka to “Speak” with (Almost) Everything (Andre...Camel Kafka Connectors: Tune Kafka to “Speak” with (Almost) Everything (Andre...
Camel Kafka Connectors: Tune Kafka to “Speak” with (Almost) Everything (Andre...
 
Typesafe Reactive Platform: Monitoring 1.0, Commercial features and more
Typesafe Reactive Platform: Monitoring 1.0, Commercial features and moreTypesafe Reactive Platform: Monitoring 1.0, Commercial features and more
Typesafe Reactive Platform: Monitoring 1.0, Commercial features and more
 
RICON 2014 Running Riak in a Docker Cloud using Apache Brooklyn
RICON 2014 Running Riak in a Docker Cloud using Apache BrooklynRICON 2014 Running Riak in a Docker Cloud using Apache Brooklyn
RICON 2014 Running Riak in a Docker Cloud using Apache Brooklyn
 
CICS TS V4 and V5 recap, and the new V5.3 open beta
CICS TS V4 and V5 recap, and the new V5.3 open betaCICS TS V4 and V5 recap, and the new V5.3 open beta
CICS TS V4 and V5 recap, and the new V5.3 open beta
 

Similaire à More than Data

Dev309 from asgard to zuul - netflix oss-final
Dev309  from asgard to zuul - netflix oss-finalDev309  from asgard to zuul - netflix oss-final
Dev309 from asgard to zuul - netflix oss-finalRuslan Meshenberg
 
(DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help...
(DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help...(DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help...
(DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help...Amazon Web Services
 
Kubernetes Controller for Pull Request Based Environment
Kubernetes Controller for Pull Request Based EnvironmentKubernetes Controller for Pull Request Based Environment
Kubernetes Controller for Pull Request Based EnvironmentVishal Banthia
 
tc server - vfabric hyperic
tc server - vfabric hyperictc server - vfabric hyperic
tc server - vfabric hypericNadia Boumaza
 
戦う情シス!全社 API で社内アプリ開発を加速させよう
戦う情シス!全社 API で社内アプリ開発を加速させよう戦う情シス!全社 API で社内アプリ開発を加速させよう
戦う情シス!全社 API で社内アプリ開発を加速させようYuki Hattori
 
AWS re:Invent 2016: From Monolithic to Microservices: Evolving Architecture P...
AWS re:Invent 2016: From Monolithic to Microservices: Evolving Architecture P...AWS re:Invent 2016: From Monolithic to Microservices: Evolving Architecture P...
AWS re:Invent 2016: From Monolithic to Microservices: Evolving Architecture P...Amazon Web Services
 
[Rakuten TechConf2014] [C-5] Ichiba Architecture on ExaLogic
[Rakuten TechConf2014] [C-5] Ichiba Architecture on ExaLogic[Rakuten TechConf2014] [C-5] Ichiba Architecture on ExaLogic
[Rakuten TechConf2014] [C-5] Ichiba Architecture on ExaLogicRakuten Group, Inc.
 
Fisl - Deployment
Fisl - DeploymentFisl - Deployment
Fisl - DeploymentFabio Akita
 
Evolving Archetecture
Evolving ArchetectureEvolving Archetecture
Evolving Archetectureleo lapworth
 
spray: REST on Akka (Scala Days)
spray: REST on Akka (Scala Days)spray: REST on Akka (Scala Days)
spray: REST on Akka (Scala Days)sirthias
 
Explore Advanced CA Release Automation Configuration Topics
Explore Advanced CA Release Automation Configuration TopicsExplore Advanced CA Release Automation Configuration Topics
Explore Advanced CA Release Automation Configuration TopicsCA Technologies
 
Mike Taulty MIX10 Silverlight 4 Patterns Frameworks
Mike Taulty MIX10 Silverlight 4 Patterns FrameworksMike Taulty MIX10 Silverlight 4 Patterns Frameworks
Mike Taulty MIX10 Silverlight 4 Patterns Frameworksukdpe
 
Managing microservices with istio on OpenShift - Meetup
Managing microservices with istio on OpenShift - MeetupManaging microservices with istio on OpenShift - Meetup
Managing microservices with istio on OpenShift - MeetupJosé Román Martín Gil
 
(GAM304) How Riot Games re:Invented Their AWS Model | AWS re:Invent 2014
(GAM304) How Riot Games re:Invented Their AWS Model | AWS re:Invent 2014(GAM304) How Riot Games re:Invented Their AWS Model | AWS re:Invent 2014
(GAM304) How Riot Games re:Invented Their AWS Model | AWS re:Invent 2014Amazon Web Services
 
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011Fabio Akita
 
09 - Fábio Akita - Além do rails
09 - Fábio Akita - Além do rails09 - Fábio Akita - Além do rails
09 - Fábio Akita - Além do railsDNAD
 
Deployment of DevOps Environment with CA Solutions
Deployment of DevOps Environment with CA SolutionsDeployment of DevOps Environment with CA Solutions
Deployment of DevOps Environment with CA SolutionsNic Swart
 

Similaire à More than Data (20)

Dev309 from asgard to zuul - netflix oss-final
Dev309  from asgard to zuul - netflix oss-finalDev309  from asgard to zuul - netflix oss-final
Dev309 from asgard to zuul - netflix oss-final
 
(DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help...
(DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help...(DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help...
(DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help...
 
Kubernetes Controller for Pull Request Based Environment
Kubernetes Controller for Pull Request Based EnvironmentKubernetes Controller for Pull Request Based Environment
Kubernetes Controller for Pull Request Based Environment
 
tc server - vfabric hyperic
tc server - vfabric hyperictc server - vfabric hyperic
tc server - vfabric hyperic
 
戦う情シス!全社 API で社内アプリ開発を加速させよう
戦う情シス!全社 API で社内アプリ開発を加速させよう戦う情シス!全社 API で社内アプリ開発を加速させよう
戦う情シス!全社 API で社内アプリ開発を加速させよう
 
AWS re:Invent 2016: From Monolithic to Microservices: Evolving Architecture P...
AWS re:Invent 2016: From Monolithic to Microservices: Evolving Architecture P...AWS re:Invent 2016: From Monolithic to Microservices: Evolving Architecture P...
AWS re:Invent 2016: From Monolithic to Microservices: Evolving Architecture P...
 
[Rakuten TechConf2014] [C-5] Ichiba Architecture on ExaLogic
[Rakuten TechConf2014] [C-5] Ichiba Architecture on ExaLogic[Rakuten TechConf2014] [C-5] Ichiba Architecture on ExaLogic
[Rakuten TechConf2014] [C-5] Ichiba Architecture on ExaLogic
 
Fisl - Deployment
Fisl - DeploymentFisl - Deployment
Fisl - Deployment
 
Evolving Archetecture
Evolving ArchetectureEvolving Archetecture
Evolving Archetecture
 
spray: REST on Akka (Scala Days)
spray: REST on Akka (Scala Days)spray: REST on Akka (Scala Days)
spray: REST on Akka (Scala Days)
 
Istio presentation jhug
Istio presentation jhugIstio presentation jhug
Istio presentation jhug
 
Explore Advanced CA Release Automation Configuration Topics
Explore Advanced CA Release Automation Configuration TopicsExplore Advanced CA Release Automation Configuration Topics
Explore Advanced CA Release Automation Configuration Topics
 
Mike Taulty MIX10 Silverlight 4 Patterns Frameworks
Mike Taulty MIX10 Silverlight 4 Patterns FrameworksMike Taulty MIX10 Silverlight 4 Patterns Frameworks
Mike Taulty MIX10 Silverlight 4 Patterns Frameworks
 
Managing microservices with istio on OpenShift - Meetup
Managing microservices with istio on OpenShift - MeetupManaging microservices with istio on OpenShift - Meetup
Managing microservices with istio on OpenShift - Meetup
 
Deployment de Rails
Deployment de RailsDeployment de Rails
Deployment de Rails
 
(GAM304) How Riot Games re:Invented Their AWS Model | AWS re:Invent 2014
(GAM304) How Riot Games re:Invented Their AWS Model | AWS re:Invent 2014(GAM304) How Riot Games re:Invented Their AWS Model | AWS re:Invent 2014
(GAM304) How Riot Games re:Invented Their AWS Model | AWS re:Invent 2014
 
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
 
09 - Fábio Akita - Além do rails
09 - Fábio Akita - Além do rails09 - Fábio Akita - Além do rails
09 - Fábio Akita - Além do rails
 
BEST REST in OpenStack
BEST REST in OpenStackBEST REST in OpenStack
BEST REST in OpenStack
 
Deployment of DevOps Environment with CA Solutions
Deployment of DevOps Environment with CA SolutionsDeployment of DevOps Environment with CA Solutions
Deployment of DevOps Environment with CA Solutions
 

Dernier

TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 

Dernier (20)

TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 

More than Data

  • 1. MORE THAN DATA Using Riak Core to Manage Distributed Services
  • 2. Who Am I? Miles O’Connell @milesoc (twitter/github) Software Engineer at StackMob
  • 3. Backend-As-A-Service • Data API • Push • Third Party Marketplace • etc.
  • 4. Backend-As-A-Service • Data API • Push • Third Party Marketplace • etc. Service Oriented Architecture (SOA)
  • 5. Service Oriented Architecture Creative Commons License – Flickr/Jared Tarbell
  • 6. CAP Theorem • Consistency • Availability • Partition Tolerance
  • 7. Service Oriented Architecture • Versioning (“Consistency”) • Availability • Partition Tolerance
  • 8. Service Oriented Architecture Service A Service B Service C Service D
  • 9. Service Oriented Architecture Service A Service B Service B (v2) Service C Service D Service D (v2)
  • 10. Service Oriented Architecture Service A Service B Service B (v2) Service C Service D Service D (v2)
  • 11. Service Oriented Architecture Service A Service B (v2) Service C Service D (v2)
  • 12. Service Oriented Architecture • Versioning (“Consistency”) • Availability • Partition Tolerance
  • 13. Custom Code Data API 3rd Party Push API Versioning etc. etc. etc.
  • 14. Custom Code Data API Push 3rd Party API Versioning etc. etc. etc. Custom Code
  • 15. Custom Code Data API 3rd Party Push API Versioning etc. etc. etc.
  • 16. Service Oriented Architecture • Versioning (“Consistency”) • Availability • Partition Tolerance
  • 17. Service Oriented Architecture • Versioning (“Consistency”) • Availability • Partition Tolerance • Automated
  • 18. Riak Core • https://github.com/basho/riak_core • Erlang library for building distributed systems
  • 22. Riak Core Physical Server 1 Physical Server 2 Physical Server 3
  • 23. Riak Core Physical Server 1 Physical Server 2 Physical Server 3
  • 24. Riak Core K, V Physical Server 1 Physical Server 2 Physical Server 3
  • 25. Riak Core K, V Physical Server 1 Physical Server 2 Physical Server 3
  • 26. Riak Core K, V Physical Server 1 Physical Server 2 Physical Server 3
  • 27. Riak Core K, V Physical Server 1 Physical Server 2 Physical Server 3
  • 28. Riak Core Physical Server 1 K, V Physical Server 3 Physical Server 2
  • 29. Riak Core K, V Physical Server 1 Physical Server 2 Physical Server 3
  • 30. Riak Core K, V Physical Server 1 Physical Server 2 Physical Server 3
  • 31. SOA on Riak Core Request Physical Server 1 Physical Server 2 Physical Server 3 Service Instance
  • 32. SOA on Riak Core Request Physical Server 1 Physical Server 2 Physical Server 3 CC Instance
  • 33. SOA on Riak Core Request Physical Server 1 Physical Server 2 CC Instance
  • 34. Physical Server 1 SOA on Riak Core Request CC Instance Physical Server 2
  • 35. Physical Server 1 SOA on Riak Core Request Webmachine CC Instance Physical Server 2
  • 36. Physical Server 1 SOA on Riak Core Request Webmachine proxy_coord CC Instance Physical Server 2
  • 37. Physical Server 1 SOA on Riak Core Request Webmachine proxy_coord vnode CC Instance Physical Server 2
  • 38. Physical Server 1 SOA on Riak Core Request Webmachine proxy_coord vnode instance_mgr CC Instance Physical Server 2
  • 39. Physical Server 1 SOA on Riak Core Request Webmachine proxy_coord vnode instance_mgr proxy_op CC Instance Physical Server 2
  • 40. Physical Server 1 SOA on Riak Core Request Webmachine proxy_coord vnode instance_mgr proxy_op CC Instance Physical Server 2
  • 41. Physical Server 1 SOA on Riak Core Request Deploy Webmachine proxy_coord deploy_coord vnode instance_mgr instance_mgr proxy_op deploy_op CC Instance CC Instance Physical Server 2
  • 42. SOA on Riak Core Request Physical Server 1 Physical Server 2 Physical Server 3 CC Instance
  • 43. Service Oriented Architecture • Versioning (“Consistency”) • Availability • Partition Tolerance • Automated
  • 44. SOA on Riak Core - Replication Request Service Instance Service Instance Service Instance
  • 45. SOA on Riak Core - Replication •R • How many replicas must we read •W • How many replicas must we write •N • How many replicas should exist
  • 46. Riak Core - Replication K, V
  • 47. Riak Core - Replication K, V Physical Server 1 Physical Server 2 Physical Server 3
  • 48. SOA on Riak Core - Replication Request Service Instance Service Instance Service Instance Physical Server 1 Physical Server 2 Physical Server 3
  • 49. SOA on Riak Core - Replication Request Service Instance Service Instance Service Instance Physical Server 1 Physical Server 2 Physical Server 3
  • 50. SOA on Riak Core - Replication Request Service Instance Service Instance Service Instance Physical Server 1 Physical Server 2 Physical Server 3
  • 51. SOA on Riak Core - Replication Request Service Instance Service Instance Service Instance Physical Server 1 Physical Server 2 Physical Server 3
  • 52. SOA on Riak Core - Replication Request Service Instance Service Instance Service Instance Physical Server 1 Physical Server 2 Physical Server 3
  • 53. SOA on Riak Core - Replication Request Service Instance Service Instance Service Instance Physical Server 1 Physical Server 2 Physical Server 3
  • 54. SOA on Riak Core - Replication Request Service Instance Service Instance Service Instance Physical Server 1 Physical Server 2 Physical Server 3
  • 55. SOA on Riak Core - Replication Deploy Physical Server 1 Physical Server 2 Physical Server 3
  • 56. SOA on Riak Core - Replication Deploy Service Instance Service Instance Service Instance Physical Server 1 Physical Server 2 Physical Server 3
  • 57. SOA on Riak Core • Versioning (“Consistency”) • Availability✔ • Partition Tolerance
  • 58. SOA on Riak Core • Versioning (“Consistency”) • Availability✔ • Partition Tolerance
  • 59. SOA on Riak Core - Handoff Service Instance Service Instance Physical Server 1 Physical Server 2 Physical Server 3
  • 60. SOA on Riak Core - Handoff Service Instance Physical Server 1 Physical Server 2 Physical Server 3
  • 61. SOA on Riak Core - Handoff Service Instance Physical Server 1 Physical Server 2 Physical Server 3
  • 62. SOA on Riak Core - Handoff Service Instance Physical Server 1 Physical Server 2 Physical Server 3
  • 63. SOA on Riak Core - Handoff Service Instance Physical Server 1 Physical Server 2 Physical Server 3
  • 64. SOA on Riak Core - Handoff Service Instance Physical Server 1 Physical Server 2 Physical Server 3
  • 65. SOA on Riak Core - Handoff Service Instance Physical Server 1 Physical Server 2 Physical Server 3
  • 66. SOA on Riak Core - Handoff Service Instance Service Instance Physical Server 1 Physical Server 2 Physical Server 3
  • 67. SOA on Riak Core - Handoff Service Instance Service Instance Physical Server 1 Physical Server 2 Physical Server 3
  • 68. SOA on Riak Core • Versioning (“Consistency”) • Availability✔ • Partition Tolerance✔
  • 69. SOA on Riak Core • Versioning (“Consistency”) • Availability✔ • Partition Tolerance✔
  • 70. SOA on Riak Core - Versioning Deploy (v2) Service (v1) Service (v1) Service (v1)
  • 71. SOA on Riak Core - Versioning Deploy (v2) Service (v1) Service (v1) Service (v1)
  • 72. SOA on Riak Core - Versioning /{service}/{version}/api/{endpoint}
  • 73. SOA on Riak Core - Versioning Request Bastion Service (v1) Service (v1) Service (v1)
  • 74. SOA on Riak Core - Versioning Service A (v1) Service A (v1) Service B (v1) Service B (v1)
  • 75. SOA on Riak Core - Versioning Service A (v1) Service A (v1) Service B (v1) Service B (v1)
  • 76. SOA on Riak Core - Versioning Service A (v1) Service B (v1) Service A (v1) Service B (v1) Service A (V2) Service B (V2) Service B (V2) Service A (V2)
  • 77. SOA on Riak Core - Versioning Service A (v1) Service B (v1) Service A (v1) Service B (v1) Service A (V2) Service B (V2) Service B (V2) Service A (V2)
  • 78. SOA on Riak Core - Versioning Service A (v1) Service B (v1) Service A (v1) Service B (v1) Service A (V2) Service B (V2) Service B (V2) Service A (V2)
  • 79. SOA on Riak Core • Versioning (“Consistency”) ✔? • Availability✔ • Partition Tolerance✔
  • 80. SOA on Riak Core - Integration Three key features
  • 81. SOA on Riak Core - Integration Three key features • Management API (Startup/Shutdown)
  • 82. SOA on Riak Core - Integration Three key features • Management API (Startup/Shutdown) • Consistent Service Responses
  • 83. SOA on Riak Core - Integration Three key features • Management API (Startup/Shutdown) • Consistent Service Responses • Status Check Endpoint
  • 84. SOA on Riak Core • Riak Core can work for any distributed system
  • 85. SOA on Riak Core • Riak Core can work for any distributed system • Riak Core provides: • Availability • Partition Tolerance
  • 86. SOA on Riak Core • Riak Core can work for any distributed system • Riak Core provides: • Availability • Partition Tolerance • You need external coordination (Consistency)
  • 87. SOA on Riak Core • Riak Core can work for any distributed system • Riak Core provides: • Availability • Partition Tolerance • You need external coordination (Consistency) • You provide: • Management API • Consistent Responses • Health Check
  • 88. Acknowledgements • Jordan West (GitHub: jrwest) • Everyone at StackMob

Notes de l'éditeur

  1. So versioning can be a bit of a headache. But I’m sure you all have ways to solve this within your own clusters. This is, however, a little trickier for us, and I’ll talk about that in a moment.
  2. So we’ve got these three requirements, and we’ve got this theorem that says that we can only have two at any given time, and while that will hold true, we’re gonna talk later about a workaround we used. Now we at StackMob have had to solve these issues for all of our sercices, we’ve come up with various ways to do it, but we do have one service that makes things a little more complicated.
  3. Call back to original slide
  4. We needed something that can do all these things automatically. So basically, we needed a database to store our services.
  5. For that, there’s Basho’s own Riak Core! While Riak Core is generally used for storing and manipulating data, it’s really just a library for building distributed systems.
  6. Now, I do wanna stress that this is quite the simplification. For example, this request doesn’t strictly come into a vnode, it comes into one of the physical servers in the ring and then routes it to the appropriate vnode. But this is a convenient way to portray it and so we’ll be using this sort of diagramSo it would really look a little more like this
  7. It’ll look a little more like this, if we’re being precise. You’ve got your physical ring, your three joined servers, and a request comes into one of those.
  8. But we’re gonna simplify and use this as our diagram for now, where these requests come into some form of coordinator, and So riak core also gives you replication, and that’s because
  9. That for replication, you can just walk around the ring. Now, this is a simplification and riak core works in slightly more interesting ways. But this is how riak core attempts to distribute different replicas to different physical servers. There are relatively few strict guarantees but it works pretty well!So like I said earlier, what we really need is sort of a database, but which stores services. So what if, instead of putting data in here, we put service instances?
  10. It looks sort of like this! the request comes in, and that request uses the service id as its ‘key’. So we hash that, figure out which vnode will service that request, and send the request along to the custom code instance
  11. So in our case specifically, we specifically put our custom code instances behind the requestLet’s look a little deeper now into how we implemented this. Let’s just take this pipeline
  12. …And rearrange it a bit
  13. So here’s our stack. When a req comes in…
  14. It comes into webmachine, which serves the node’s HTTP interface.
  15. We then create a coordinator to handle the request. In this case, we’ll create a proxy coordinator since we’re proxying a request to our custom code instance. Consistent HashingFigure out vnode
  16. So a vnode’s just an actor, and riak core keeps track of them. So riak core has this catalog of vnodes and provides the interface we use to communicate with them.
  17. That, in turn, is responsible ode, in for keeping track of its instances. So this vnode actor manages a bunch of instance manager actors, and those actors are in turn responsible for keeping track of the actual instance.This instance manager is responsible for whole instance lifecycle. It knows whether the instance is ready for service, etc etc. However, it doesn’t handle the request directly. Instead we create a new actor.
  18. So, like the coordinator, the operation actor is responsible for only a single request and it handles the lifecycle of sending that request to the custom code instance. It dies after the request is done. So now, we’ve gotta get the response back to the server
  19. To do that we end up skipping a few layers. This is mainly for performance. Since actors in erlang can only process one message at a time, we don’t want to block on these requests in the vnode and instance manager, because those actors are responsible for all our requests for that instance. Instead, we go from the op directly back to the coordinator with our response. This is what the stack looks like when you proxy a request.
  20. Other requests work the same way. If you want to deploy a new instance, you create a coordinator, you go to the vnode, you create a new instance manager, and that instance manager starts up a deploy op actor.And all that comes together to give us this
  21. So this is pretty simple so far, let’s start talking about what riak core gives us!
  22. Riak core is made for building distributed systems, and you can’t have a distributed system without replication
  23. Riak uses R/W/N
  24. This is replication, blah blah. So like I said earlier, what we really need is sort of a database, but which stores services. So what if, instead of putting data in here, we put service instances?
  25. This is replication, blah blah. So like I said earlier, what we really need is sort of a database, but which stores services. So what if, instead of putting data in here, we put service instances?
  26. So this is how we ‘read’ from our service ‘database’ – we send a request to a service, and get a response back. But at the same time, we’ve detected a failure, we’ve repaired that failure, while simultaneously making the request to the next available node. All automatically.So the next question is, how do we start these services in the first place? Turns out you don’t always need to – In some cases, it’s better to just let a request come in, detect no instance, and send a repair command. That’s what we do in custom code (explain)
  27. This might look a little confusing, but basically what you’ve got here is two separate networks. Each of them is talking a different API, they don’t have to know about each other, and you can test your new stuff in production before you ever let an outside service talk to it.