SlideShare une entreprise Scribd logo
1  sur  22
Télécharger pour lire hors ligne
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

Contenu connexe

Tendances

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
 

Tendances (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
 

En vedette

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
 

En vedette (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
 

Similaire à 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
 
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
 
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
 
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
 

Similaire à 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
 
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
 
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?
 
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)
 

Dernier

Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
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
 
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
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
"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
 
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
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
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
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 

Dernier (20)

Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
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
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
"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
 
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)
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
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
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
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
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.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