SlideShare una empresa de Scribd logo
1 de 22
Descargar para leer sin conexión
The Memonic Architecture
Webtuesday

Chris Hauzenberger   chris@memonic.com
Patrice Neff         patrice@memonic.com

20100413




                                           memonic
Overview
                              Internet


             cluster



                                          staticpage
     geoip

                              Frontend
                                                                  html_cleanup
                                          command
 browser




                                                                   screenshot    mime
     index             user    label     storage




 ©    memonic                                          pipeline   email_sender
REST Services
 • Dependencies local to service
      • Database
      • Queue
      • Synchronization
 • Try the simplest service that works
 • Services are the new classes?




 ©   memonic
Motivation for Services
 • Modularity
      •   Team separation
      •   Clear boundaries
      •   Easier migrations / replacements
      •   Versioning
 • Competence centre
 • Re-use of services
 • Best tool for the job
      • Programming language
      • Dependencies (Database, Queue, ...)
 • Scalability

 ©   memonic
Showcase: Cluster
 • User ID to cluster (shard)
 • Assigns a user to cluster on first visit
 • Challenge: anonymous users leave garbage




 Bonus: Twitter's Gizzard seems to be a better version of
 our cluster service.

 ©   memonic
Showcase: Command
 •   Handles cluster lookups
 •   Stores undo tickets (X-Undo-Ticket response header)
 •   Undo operation with the ticket ID
 •   Clean up old undo ticket




                                     Intent: Encapsulate a request as an
                                     object, thereby letting you
                                     parameterize clients with different
                                     requests, queue or log requests, and
                                     support undoable operations.
                                             (Gamma et. al. - Command pattern)

 ©   memonic
Showcase: Pipeline
 •   Asynchronous processing of dependencies
 •   Add additional data, create screenshot, index, send
     notifications, …
 •   Uses AMQP internally - but HTTP externally




                                     Intent: Define a one-to-many
                                     dependency between objects so that
                                     when one object changes state, all its
                                     dependents are notified and updated
                                     automatically.
                                               (Gamma et. al. - Observer pattern)

 ©   memonic
Showcase: Simple services
 • GeoIP
 • Browser
 • MIME
 • HTML cleanup
 • Logo
 • Screenshot
 • …




 ©   memonic
WsgiService example: GeoIP
     import logging
     import datetime
     import pygeoip
     from wsgiservice import *

     log = logging.getLogger(__name__)

     @mount('/1/{ip}')
     @validate('ip', doc='The IP address to look up.',
                     re='[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}')
     class IpResource(Resource):
         """Represents the GeoIP information of a single IP address."""
         @expires(datetime.timedelta(days=365))
         def GET(self, ip):
             """Return the country code for the given IP address."""
             geoip = pygeoip.GeoIP()
             country_code = geoip.country_code_by_addr(ip)
             if not country_code:
                 raise_404(self)
             log.debug("Mapped IP %s to country code %s", ip, country_code)
             return {'country_code': country_code}


     app = get_app(globals())

 ©   memonic
Showcase: Data storage
 • Storage
 • Label
 • Index
 • User
 • Subscription
 • …




 ©   memonic
Dealing with Services: RestClient
 • Easy-to-use interface for finding and accessing
   services
 • Resolves cluster
 • Finds service
 • Performs HTTP call




 ©   memonic
RestClient: Code
 # GET request to command service
 client.GET('command', ClosestCluster,
 ! '/1/label_item/userxyz/inbox',
 ! {'start': 1, 'count': 10},
 ! headers={'some_key': 'some_value'})

 # POST request to pipeline service
 client.POST('pipeline', 'userabc',
 ! '/1/relation/userabc/contacts', {'diff': diff})

 # PUT request to label service
 client.PUT('label', 'userhij',
 ! '/1/label/userhij/somelabel',
 ! {'title':'some title'})


 ©   memonic
Locating Services
 • User cluster
 • Closest cluster
 • Random cluster
 • First cluster (first cluster that returns a successful
   response)
 • All clusters




 ©   memonic
Statistics
 • Each service exposes it's statistics
 • Automatically added to Ganglia




 ©   memonic
Our usage of Amazon Web Services
                                    Internet




                                               Elastic Load Balancer




                  CloudFront
                                                 EC2 (Frontend)




                                      EC2 (Backend)         EC2 (Backend)
     Map Reduce      S3




 ©   memonic                   EC2 or SQS (Queue)            EC2, RDS or SimpleDB
Technology Components
 • Dojo: JavaScript
 • MySQL: Most data stores
 • Pylons: Frontend applications
 • Python
 • RabbitMQ: Queue
 • Solr: Fulltext search
 • WsgiService: Services




 ©   memonic
System Setup and Deployment
 • virtualenv
      • Isolated runtime environment for each service
 • setuptools
      • Create installable packages (eggs)
      • Specify version and dependencies
 • Puppet
      • Configuration management
      • Specify desired server state
      • Daemon assures that setup is complete




 ©   memonic
Puppet: Deploy Service
 class service::geoip inherits service {
     pythonwsgiservice::webpy { geoip: }
     nginx::fcgi { geoip: port => 456,
 ! ! ! ! ! ! source_class => trusted; }
 }


 class service::tinyurl inherits service {
     pythonwsgiservice::webpy { tinyurl: }
     nginx::fcgi { tinyurl: port => 123,
               !   source_class => trusted; }
     mysql::database { "tinyurl": }
     mysql::user { "tinyurl@localhost":
 ! ! ! password_hash => …; }
 }

 ©   memonic
Puppet: Configure Build
 # Works for Python services
 hudson::project {
   "frontend.shared.toolbar":
     directory => "frontend-shared/toolbar",
     package => "nektoon.frontend.shared.toolbar";
   "service.email_listener":
     directory => "service/email_listener",
     package => "nektoon.service.email_listener";
 }

 # Works for Windows applications
 hudson::windowsproject {
   "client.lib.apiabstraction":
     directory => "MemonicApiAbstraction",
     target => "Release",
     binaryname => "MemonicApiAbstraction.dll";
 }
 ©   memonic
Tools
 • Specification / Documentation: Confluence
 • Issue Tracking: Jira
 • Scrum Support: Greenhopper
 • System Setup: Puppet
 • Continuous Building: Hudson
 • Monitoring: Nagios
 • Statistics, Graphs: Ganglia
 • Log Mining: Splunk




 ©   memonic
Links
 • Jobs
     http://www.memonic.com/page/en/jobs


 • Scalability with HTTP
     www.memonic.com/user/pneff/set/presentation-http-scalability
     http://mem.to/t/1Fsc


 • Memonic on AWS
     www.memonic.com/user/pneff/set/presentation-cloud-swiss
     http://mem.to/t/1tMH




 ©   memonic
Thank you!

Chris Hauzenberger   chris@memonic.com
                     http://twitter.com/ch13


Patrice Neff         patrice@memonic.com
                     http://twitter.com/pneff


20100413
                                               memonic

Más contenido relacionado

La actualidad más candente

Servletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,postServletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,postvamsi krishna
 
How to add a new hypervisor to CloudStack - Lessons learned from Hyper-V effort
How to add a new hypervisor to CloudStack - Lessons learned from Hyper-V effortHow to add a new hypervisor to CloudStack - Lessons learned from Hyper-V effort
How to add a new hypervisor to CloudStack - Lessons learned from Hyper-V effortShapeBlue
 
Integration and Batch Processing on Cloud Foundry
Integration and Batch Processing on Cloud FoundryIntegration and Batch Processing on Cloud Foundry
Integration and Batch Processing on Cloud FoundryJoshua Long
 
Apache CloudStack's Plugin Model: Balancing the Cathedral with a Bazaar
Apache CloudStack's Plugin Model:Balancing the Cathedral with a BazaarApache CloudStack's Plugin Model:Balancing the Cathedral with a Bazaar
Apache CloudStack's Plugin Model: Balancing the Cathedral with a BazaarDonal Lafferty
 
Evolution of a cloud start up: From C# to Node.js
Evolution of a cloud start up: From C# to Node.jsEvolution of a cloud start up: From C# to Node.js
Evolution of a cloud start up: From C# to Node.jsSteve Jamieson
 
Cloud Native Computing - Part II - Public Cloud (AWS)
Cloud Native Computing - Part II - Public Cloud (AWS)Cloud Native Computing - Part II - Public Cloud (AWS)
Cloud Native Computing - Part II - Public Cloud (AWS)Linjith Kunnon
 
Learn Cloud-Native .NET: Core Configuration Fundamentals with Steeltoe
Learn Cloud-Native .NET: Core Configuration Fundamentals with SteeltoeLearn Cloud-Native .NET: Core Configuration Fundamentals with Steeltoe
Learn Cloud-Native .NET: Core Configuration Fundamentals with SteeltoeVMware Tanzu
 
CUBRID Inside - Architecture, Source & Management Components
CUBRID Inside - Architecture, Source & Management ComponentsCUBRID Inside - Architecture, Source & Management Components
CUBRID Inside - Architecture, Source & Management ComponentsCUBRID
 
Cloud apps with REST APIs using Windows Azure, Asp.NET, ServiceStack and Angu...
Cloud apps with REST APIs using Windows Azure, Asp.NET, ServiceStack and Angu...Cloud apps with REST APIs using Windows Azure, Asp.NET, ServiceStack and Angu...
Cloud apps with REST APIs using Windows Azure, Asp.NET, ServiceStack and Angu...mobiweave
 
Cloud Native Computing - Part III - Containers
Cloud Native Computing - Part III - ContainersCloud Native Computing - Part III - Containers
Cloud Native Computing - Part III - ContainersLinjith Kunnon
 
2012 CloudStack Design Camp in Taiwan--- CloudStack Overview-1
2012 CloudStack Design Camp in Taiwan--- CloudStack Overview-12012 CloudStack Design Camp in Taiwan--- CloudStack Overview-1
2012 CloudStack Design Camp in Taiwan--- CloudStack Overview-1tcloudcomputing-tw
 
To Kill a Monolith: Slaying the Demons of a Monolith with Node.js Microservic...
To Kill a Monolith: Slaying the Demons of a Monolith with Node.js Microservic...To Kill a Monolith: Slaying the Demons of a Monolith with Node.js Microservic...
To Kill a Monolith: Slaying the Demons of a Monolith with Node.js Microservic...Tony Erwin
 
.NET Developer Days - Launching Patterns for Containers
.NET Developer Days - Launching Patterns for Containers.NET Developer Days - Launching Patterns for Containers
.NET Developer Days - Launching Patterns for ContainersMichele Leroux Bustamante
 
Inside Azure Diagnostics (DevLink 2014)
Inside Azure Diagnostics (DevLink 2014)Inside Azure Diagnostics (DevLink 2014)
Inside Azure Diagnostics (DevLink 2014)Michael Collier
 
.NET Developer Days - So many Docker platforms, so little time...
.NET Developer Days - So many Docker platforms, so little time....NET Developer Days - So many Docker platforms, so little time...
.NET Developer Days - So many Docker platforms, so little time...Michele Leroux Bustamante
 
Building Bizweb Microservices with Docker
Building Bizweb Microservices with DockerBuilding Bizweb Microservices with Docker
Building Bizweb Microservices with DockerKhôi Nguyễn Minh
 
Gaming across multiple devices
Gaming across multiple devicesGaming across multiple devices
Gaming across multiple devicesPatric Boscolo
 
Social Photos - My presentation at Microsoft Tech Day
Social Photos - My presentation at Microsoft Tech DaySocial Photos - My presentation at Microsoft Tech Day
Social Photos - My presentation at Microsoft Tech DayTechMaster Vietnam
 

La actualidad más candente (20)

Servletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,postServletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,post
 
How to add a new hypervisor to CloudStack - Lessons learned from Hyper-V effort
How to add a new hypervisor to CloudStack - Lessons learned from Hyper-V effortHow to add a new hypervisor to CloudStack - Lessons learned from Hyper-V effort
How to add a new hypervisor to CloudStack - Lessons learned from Hyper-V effort
 
Integration and Batch Processing on Cloud Foundry
Integration and Batch Processing on Cloud FoundryIntegration and Batch Processing on Cloud Foundry
Integration and Batch Processing on Cloud Foundry
 
Apache CloudStack's Plugin Model: Balancing the Cathedral with a Bazaar
Apache CloudStack's Plugin Model:Balancing the Cathedral with a BazaarApache CloudStack's Plugin Model:Balancing the Cathedral with a Bazaar
Apache CloudStack's Plugin Model: Balancing the Cathedral with a Bazaar
 
So Many Docker Platforms...so little time
So Many Docker Platforms...so little timeSo Many Docker Platforms...so little time
So Many Docker Platforms...so little time
 
Kubernetes
KubernetesKubernetes
Kubernetes
 
Evolution of a cloud start up: From C# to Node.js
Evolution of a cloud start up: From C# to Node.jsEvolution of a cloud start up: From C# to Node.js
Evolution of a cloud start up: From C# to Node.js
 
Cloud Native Computing - Part II - Public Cloud (AWS)
Cloud Native Computing - Part II - Public Cloud (AWS)Cloud Native Computing - Part II - Public Cloud (AWS)
Cloud Native Computing - Part II - Public Cloud (AWS)
 
Learn Cloud-Native .NET: Core Configuration Fundamentals with Steeltoe
Learn Cloud-Native .NET: Core Configuration Fundamentals with SteeltoeLearn Cloud-Native .NET: Core Configuration Fundamentals with Steeltoe
Learn Cloud-Native .NET: Core Configuration Fundamentals with Steeltoe
 
CUBRID Inside - Architecture, Source & Management Components
CUBRID Inside - Architecture, Source & Management ComponentsCUBRID Inside - Architecture, Source & Management Components
CUBRID Inside - Architecture, Source & Management Components
 
Cloud apps with REST APIs using Windows Azure, Asp.NET, ServiceStack and Angu...
Cloud apps with REST APIs using Windows Azure, Asp.NET, ServiceStack and Angu...Cloud apps with REST APIs using Windows Azure, Asp.NET, ServiceStack and Angu...
Cloud apps with REST APIs using Windows Azure, Asp.NET, ServiceStack and Angu...
 
Cloud Native Computing - Part III - Containers
Cloud Native Computing - Part III - ContainersCloud Native Computing - Part III - Containers
Cloud Native Computing - Part III - Containers
 
2012 CloudStack Design Camp in Taiwan--- CloudStack Overview-1
2012 CloudStack Design Camp in Taiwan--- CloudStack Overview-12012 CloudStack Design Camp in Taiwan--- CloudStack Overview-1
2012 CloudStack Design Camp in Taiwan--- CloudStack Overview-1
 
To Kill a Monolith: Slaying the Demons of a Monolith with Node.js Microservic...
To Kill a Monolith: Slaying the Demons of a Monolith with Node.js Microservic...To Kill a Monolith: Slaying the Demons of a Monolith with Node.js Microservic...
To Kill a Monolith: Slaying the Demons of a Monolith with Node.js Microservic...
 
.NET Developer Days - Launching Patterns for Containers
.NET Developer Days - Launching Patterns for Containers.NET Developer Days - Launching Patterns for Containers
.NET Developer Days - Launching Patterns for Containers
 
Inside Azure Diagnostics (DevLink 2014)
Inside Azure Diagnostics (DevLink 2014)Inside Azure Diagnostics (DevLink 2014)
Inside Azure Diagnostics (DevLink 2014)
 
.NET Developer Days - So many Docker platforms, so little time...
.NET Developer Days - So many Docker platforms, so little time....NET Developer Days - So many Docker platforms, so little time...
.NET Developer Days - So many Docker platforms, so little time...
 
Building Bizweb Microservices with Docker
Building Bizweb Microservices with DockerBuilding Bizweb Microservices with Docker
Building Bizweb Microservices with Docker
 
Gaming across multiple devices
Gaming across multiple devicesGaming across multiple devices
Gaming across multiple devices
 
Social Photos - My presentation at Microsoft Tech Day
Social Photos - My presentation at Microsoft Tech DaySocial Photos - My presentation at Microsoft Tech Day
Social Photos - My presentation at Microsoft Tech Day
 

Destacado

Blending Formal & Informal Learning Using New Technologies in the Workplace
Blending Formal & Informal Learning Using New Technologies in the WorkplaceBlending Formal & Informal Learning Using New Technologies in the Workplace
Blending Formal & Informal Learning Using New Technologies in the WorkplaceButhaina AlOthman
 
Scalable applications with HTTP
Scalable applications with HTTPScalable applications with HTTP
Scalable applications with HTTPPatrice Neff
 
Startup in den Wolken
Startup in den WolkenStartup in den Wolken
Startup in den WolkenPatrice Neff
 
Getting the Most out of the Social Web to Create New Cultures of Learning & ...
Getting the Most out of the Social Web to Create New Cultures of Learning & ...Getting the Most out of the Social Web to Create New Cultures of Learning & ...
Getting the Most out of the Social Web to Create New Cultures of Learning & ...Buthaina AlOthman
 
Present Perfect Versus Past Tense
Present Perfect Versus Past TensePresent Perfect Versus Past Tense
Present Perfect Versus Past TenseButhaina AlOthman
 

Destacado (7)

Blending Formal & Informal Learning Using New Technologies in the Workplace
Blending Formal & Informal Learning Using New Technologies in the WorkplaceBlending Formal & Informal Learning Using New Technologies in the Workplace
Blending Formal & Informal Learning Using New Technologies in the Workplace
 
Scalable applications with HTTP
Scalable applications with HTTPScalable applications with HTTP
Scalable applications with HTTP
 
Startup in den Wolken
Startup in den WolkenStartup in den Wolken
Startup in den Wolken
 
Getting the Most out of the Social Web to Create New Cultures of Learning & ...
Getting the Most out of the Social Web to Create New Cultures of Learning & ...Getting the Most out of the Social Web to Create New Cultures of Learning & ...
Getting the Most out of the Social Web to Create New Cultures of Learning & ...
 
Passive voice
Passive voicePassive voice
Passive voice
 
Present Perfect Progressive
Present Perfect ProgressivePresent Perfect Progressive
Present Perfect Progressive
 
Present Perfect Versus Past Tense
Present Perfect Versus Past TensePresent Perfect Versus Past Tense
Present Perfect Versus Past Tense
 

Similar a Memonic Architecture

Sina App Engine - a distributed web solution on cloud
Sina App Engine - a distributed web solution on cloudSina App Engine - a distributed web solution on cloud
Sina App Engine - a distributed web solution on cloudcong lei
 
Social Connections 13 - Troubleshooting Connections Pink
Social Connections 13 - Troubleshooting Connections PinkSocial Connections 13 - Troubleshooting Connections Pink
Social Connections 13 - Troubleshooting Connections PinkNico Meisenzahl
 
JDD 2016 - Jacek Bukowski - "Flying To Clouds" - Can It Be Easy?
JDD 2016 - Jacek Bukowski - "Flying To Clouds" - Can It Be Easy?JDD 2016 - Jacek Bukowski - "Flying To Clouds" - Can It Be Easy?
JDD 2016 - Jacek Bukowski - "Flying To Clouds" - Can It Be Easy?PROIDEA
 
Flying to clouds - can it be easy? Cloud Native Applications
Flying to clouds - can it be easy? Cloud Native ApplicationsFlying to clouds - can it be easy? Cloud Native Applications
Flying to clouds - can it be easy? Cloud Native ApplicationsJacek Bukowski
 
Metarhia: Node.js Macht Frei
Metarhia: Node.js Macht FreiMetarhia: Node.js Macht Frei
Metarhia: Node.js Macht FreiTimur Shemsedinov
 
Exploring Twitter's Finagle technology stack for microservices
Exploring Twitter's Finagle technology stack for microservicesExploring Twitter's Finagle technology stack for microservices
Exploring Twitter's Finagle technology stack for microservices💡 Tomasz Kogut
 
Migrating Enterprise Microservices From Cloud Foundry to Kubernetes
Migrating Enterprise Microservices From Cloud Foundry to KubernetesMigrating Enterprise Microservices From Cloud Foundry to Kubernetes
Migrating Enterprise Microservices From Cloud Foundry to KubernetesTony Erwin
 
IBM Think Session 8598 Domino and JavaScript Development MasterClass
IBM Think Session 8598 Domino and JavaScript Development MasterClassIBM Think Session 8598 Domino and JavaScript Development MasterClass
IBM Think Session 8598 Domino and JavaScript Development MasterClassPaul Withers
 
Client Object Model - SharePoint Extreme 2012
Client Object Model - SharePoint Extreme 2012Client Object Model - SharePoint Extreme 2012
Client Object Model - SharePoint Extreme 2012daniel plocker
 
Convertigo Mobile Application Development platform for Enterprises
Convertigo Mobile Application Development platform for EnterprisesConvertigo Mobile Application Development platform for Enterprises
Convertigo Mobile Application Development platform for EnterprisesConvertigo | MADP & MBaaS
 
Monitoring in Motion: Monitoring Containers and Amazon ECS
Monitoring in Motion: Monitoring Containers and Amazon ECSMonitoring in Motion: Monitoring Containers and Amazon ECS
Monitoring in Motion: Monitoring Containers and Amazon ECSAmazon Web Services
 
John adams talk cloudy
John adams   talk cloudyJohn adams   talk cloudy
John adams talk cloudyJohn Adams
 
6. DISZ - Webalkalmazások skálázhatósága a Google Cloud Platformon
6. DISZ - Webalkalmazások skálázhatósága  a Google Cloud Platformon6. DISZ - Webalkalmazások skálázhatósága  a Google Cloud Platformon
6. DISZ - Webalkalmazások skálázhatósága a Google Cloud PlatformonMárton Kodok
 
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
 The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ... The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...Josef Adersberger
 
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...QAware GmbH
 
Serverless Framework Intro
Serverless Framework IntroServerless Framework Intro
Serverless Framework IntroNikolaus Graf
 
Pm ix tutorial-june2019-pub (1)
Pm ix tutorial-june2019-pub (1)Pm ix tutorial-june2019-pub (1)
Pm ix tutorial-june2019-pub (1)ewerkboy
 

Similar a Memonic Architecture (20)

20120306 dublin js
20120306 dublin js20120306 dublin js
20120306 dublin js
 
Sina App Engine - a distributed web solution on cloud
Sina App Engine - a distributed web solution on cloudSina App Engine - a distributed web solution on cloud
Sina App Engine - a distributed web solution on cloud
 
Social Connections 13 - Troubleshooting Connections Pink
Social Connections 13 - Troubleshooting Connections PinkSocial Connections 13 - Troubleshooting Connections Pink
Social Connections 13 - Troubleshooting Connections Pink
 
Cont0519
Cont0519Cont0519
Cont0519
 
JDD 2016 - Jacek Bukowski - "Flying To Clouds" - Can It Be Easy?
JDD 2016 - Jacek Bukowski - "Flying To Clouds" - Can It Be Easy?JDD 2016 - Jacek Bukowski - "Flying To Clouds" - Can It Be Easy?
JDD 2016 - Jacek Bukowski - "Flying To Clouds" - Can It Be Easy?
 
Flying to clouds - can it be easy? Cloud Native Applications
Flying to clouds - can it be easy? Cloud Native ApplicationsFlying to clouds - can it be easy? Cloud Native Applications
Flying to clouds - can it be easy? Cloud Native Applications
 
Metarhia: Node.js Macht Frei
Metarhia: Node.js Macht FreiMetarhia: Node.js Macht Frei
Metarhia: Node.js Macht Frei
 
Exploring Twitter's Finagle technology stack for microservices
Exploring Twitter's Finagle technology stack for microservicesExploring Twitter's Finagle technology stack for microservices
Exploring Twitter's Finagle technology stack for microservices
 
Migrating Enterprise Microservices From Cloud Foundry to Kubernetes
Migrating Enterprise Microservices From Cloud Foundry to KubernetesMigrating Enterprise Microservices From Cloud Foundry to Kubernetes
Migrating Enterprise Microservices From Cloud Foundry to Kubernetes
 
IBM Think Session 8598 Domino and JavaScript Development MasterClass
IBM Think Session 8598 Domino and JavaScript Development MasterClassIBM Think Session 8598 Domino and JavaScript Development MasterClass
IBM Think Session 8598 Domino and JavaScript Development MasterClass
 
Client Object Model - SharePoint Extreme 2012
Client Object Model - SharePoint Extreme 2012Client Object Model - SharePoint Extreme 2012
Client Object Model - SharePoint Extreme 2012
 
Convertigo Mobile Application Development platform for Enterprises
Convertigo Mobile Application Development platform for EnterprisesConvertigo Mobile Application Development platform for Enterprises
Convertigo Mobile Application Development platform for Enterprises
 
Monitoring in Motion: Monitoring Containers and Amazon ECS
Monitoring in Motion: Monitoring Containers and Amazon ECSMonitoring in Motion: Monitoring Containers and Amazon ECS
Monitoring in Motion: Monitoring Containers and Amazon ECS
 
20120802 timisoara
20120802 timisoara20120802 timisoara
20120802 timisoara
 
John adams talk cloudy
John adams   talk cloudyJohn adams   talk cloudy
John adams talk cloudy
 
6. DISZ - Webalkalmazások skálázhatósága a Google Cloud Platformon
6. DISZ - Webalkalmazások skálázhatósága  a Google Cloud Platformon6. DISZ - Webalkalmazások skálázhatósága  a Google Cloud Platformon
6. DISZ - Webalkalmazások skálázhatósága a Google Cloud Platformon
 
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
 The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ... The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
 
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
 
Serverless Framework Intro
Serverless Framework IntroServerless Framework Intro
Serverless Framework Intro
 
Pm ix tutorial-june2019-pub (1)
Pm ix tutorial-june2019-pub (1)Pm ix tutorial-june2019-pub (1)
Pm ix tutorial-june2019-pub (1)
 

Último

Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 

Último (20)

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 

Memonic Architecture

  • 1. The Memonic Architecture Webtuesday Chris Hauzenberger chris@memonic.com Patrice Neff patrice@memonic.com 20100413 memonic
  • 2. Overview Internet cluster staticpage geoip Frontend html_cleanup command browser screenshot mime index user label storage © memonic pipeline email_sender
  • 3. REST Services • Dependencies local to service • Database • Queue • Synchronization • Try the simplest service that works • Services are the new classes? © memonic
  • 4. Motivation for Services • Modularity • Team separation • Clear boundaries • Easier migrations / replacements • Versioning • Competence centre • Re-use of services • Best tool for the job • Programming language • Dependencies (Database, Queue, ...) • Scalability © memonic
  • 5. Showcase: Cluster • User ID to cluster (shard) • Assigns a user to cluster on first visit • Challenge: anonymous users leave garbage Bonus: Twitter's Gizzard seems to be a better version of our cluster service. © memonic
  • 6. Showcase: Command • Handles cluster lookups • Stores undo tickets (X-Undo-Ticket response header) • Undo operation with the ticket ID • Clean up old undo ticket Intent: Encapsulate a request as an object, thereby letting you parameterize clients with different requests, queue or log requests, and support undoable operations. (Gamma et. al. - Command pattern) © memonic
  • 7. Showcase: Pipeline • Asynchronous processing of dependencies • Add additional data, create screenshot, index, send notifications, … • Uses AMQP internally - but HTTP externally Intent: Define a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically. (Gamma et. al. - Observer pattern) © memonic
  • 8. Showcase: Simple services • GeoIP • Browser • MIME • HTML cleanup • Logo • Screenshot • … © memonic
  • 9. WsgiService example: GeoIP import logging import datetime import pygeoip from wsgiservice import * log = logging.getLogger(__name__) @mount('/1/{ip}') @validate('ip', doc='The IP address to look up.', re='[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}') class IpResource(Resource): """Represents the GeoIP information of a single IP address.""" @expires(datetime.timedelta(days=365)) def GET(self, ip): """Return the country code for the given IP address.""" geoip = pygeoip.GeoIP() country_code = geoip.country_code_by_addr(ip) if not country_code: raise_404(self) log.debug("Mapped IP %s to country code %s", ip, country_code) return {'country_code': country_code} app = get_app(globals()) © memonic
  • 10. Showcase: Data storage • Storage • Label • Index • User • Subscription • … © memonic
  • 11. Dealing with Services: RestClient • Easy-to-use interface for finding and accessing services • Resolves cluster • Finds service • Performs HTTP call © memonic
  • 12. RestClient: Code # GET request to command service client.GET('command', ClosestCluster, ! '/1/label_item/userxyz/inbox', ! {'start': 1, 'count': 10}, ! headers={'some_key': 'some_value'}) # POST request to pipeline service client.POST('pipeline', 'userabc', ! '/1/relation/userabc/contacts', {'diff': diff}) # PUT request to label service client.PUT('label', 'userhij', ! '/1/label/userhij/somelabel', ! {'title':'some title'}) © memonic
  • 13. Locating Services • User cluster • Closest cluster • Random cluster • First cluster (first cluster that returns a successful response) • All clusters © memonic
  • 14. Statistics • Each service exposes it's statistics • Automatically added to Ganglia © memonic
  • 15. Our usage of Amazon Web Services Internet Elastic Load Balancer CloudFront EC2 (Frontend) EC2 (Backend) EC2 (Backend) Map Reduce S3 © memonic EC2 or SQS (Queue) EC2, RDS or SimpleDB
  • 16. Technology Components • Dojo: JavaScript • MySQL: Most data stores • Pylons: Frontend applications • Python • RabbitMQ: Queue • Solr: Fulltext search • WsgiService: Services © memonic
  • 17. System Setup and Deployment • virtualenv • Isolated runtime environment for each service • setuptools • Create installable packages (eggs) • Specify version and dependencies • Puppet • Configuration management • Specify desired server state • Daemon assures that setup is complete © memonic
  • 18. Puppet: Deploy Service class service::geoip inherits service { pythonwsgiservice::webpy { geoip: } nginx::fcgi { geoip: port => 456, ! ! ! ! ! ! source_class => trusted; } } class service::tinyurl inherits service { pythonwsgiservice::webpy { tinyurl: } nginx::fcgi { tinyurl: port => 123, ! source_class => trusted; } mysql::database { "tinyurl": } mysql::user { "tinyurl@localhost": ! ! ! password_hash => …; } } © memonic
  • 19. Puppet: Configure Build # Works for Python services hudson::project { "frontend.shared.toolbar": directory => "frontend-shared/toolbar", package => "nektoon.frontend.shared.toolbar"; "service.email_listener": directory => "service/email_listener", package => "nektoon.service.email_listener"; } # Works for Windows applications hudson::windowsproject { "client.lib.apiabstraction": directory => "MemonicApiAbstraction", target => "Release", binaryname => "MemonicApiAbstraction.dll"; } © memonic
  • 20. Tools • Specification / Documentation: Confluence • Issue Tracking: Jira • Scrum Support: Greenhopper • System Setup: Puppet • Continuous Building: Hudson • Monitoring: Nagios • Statistics, Graphs: Ganglia • Log Mining: Splunk © memonic
  • 21. Links • Jobs http://www.memonic.com/page/en/jobs • Scalability with HTTP www.memonic.com/user/pneff/set/presentation-http-scalability http://mem.to/t/1Fsc • Memonic on AWS www.memonic.com/user/pneff/set/presentation-cloud-swiss http://mem.to/t/1tMH © memonic
  • 22. Thank you! Chris Hauzenberger chris@memonic.com http://twitter.com/ch13 Patrice Neff patrice@memonic.com http://twitter.com/pneff 20100413 memonic