SlideShare uma empresa Scribd logo
1 de 20
Decouple your application logic from your data




          Juan Soprano - juan@pixable.com
          Director of Software Development
                      Pixable Inc.
What is Pixable?
Pixable in numbers
   ~5 million users
   9 billion photos (~5 Terabytes)
   35 new million photos a day
   80 million categories
   16 million writes/hour (~40GB/hour)
   30 million reads/hour (~120GB/hour)

Logging and profiling
- 15k inserts/sec
Where can you find us?
        Pixable.com
Where can you find us?
       iPhone/iPod/iPad
Where can you find us?
         Android
Presentation
   In Pixable we have migrated from/to different data storage
    solutions. To accomplish this, we've built a plugin-like data layer
    to allow complete separation between application code and
    data storage. In fact, our whole migration from MySQL to
    MongoDB was performed over this layer, helping us to move
    chunks of data little by little while learning how the system
    behaved under the new configuration. During the process, we
    managed to maintain duplicate copies in MySQL and Mongo for
    a while until the transition was complete. All of this happened in
    a way almost transparent to the application code, requiring very
    little changes in the code.

   During this talk, we are going to show how we built this
    architecture and how easy is to integrate other data storages
    (memcached, S3, etc) on it. We will also share some tips that
    we've learned down the road and pros/cons of working under
    this schema.
Initial infrastructure
   LAMMP (Lynux-Apache-Memcache-MySQL-PHP)
                             Backend
    Frontend                                          MySQL
                 API            User                   DB


 class user {
    $id;
    $first_name;
    $last_name;
    public function getUser($id) {
       $sql = ‘SELECT * FROM users WHERE id =’.$id;
       $userRS = db->fetchArray($sql);
       $user = $this->buildUser($userRS);
       return $user;
    }
 }
Issues encountered
   Limit on the DB connections to Master.
   Not able to hit the DB hard without generating
    lag on the slave servers.
   Adding a field to an existing table with billions
    of records would mean downtime of the App.
   Adding new DB servers was slow (in some
    cases required downtime of the app) and high
    in server costs.

…so we needed a DB engine easy to
grow, schema-less and low in server cost.
Solution found
   MongoDB
     Has built-in sharding
     ReplicaSet features automatic data
        clone, synchronization and PRIMARY failover.
       Our data fits perfectly in the MongoDB document
        paradigm.
       Schema-less.
       Easier to have many small machines, failures or
        maintenances are less traumatic.
       Background index creation.

…now we needed a way to start migration
without having downtime and data loss.
Implementing solution
    Migrating code from classes/functions with
     SQL queries all around the project code to
     the new Flexible Plugin-like data layer.
                 API       Backend
     Frontend                                    MySQL
                            User                  DB



                                       MySQL             MySQL
                                       User DS
                                                          DB
           API   Backend       User
Frontend                       Data
                   User       Source   MongoDB           Mongo
                                       User DS
                                                          DB
Implementing solution – Step 1
   User Data Source (Plugin manager)

              • Gets the call from the backend for the user
                data source.
              • Evaluates the conditions defined by us to see
                what Data Source to return and looks for the
     User
                user in the correct data source.
     Data
              • If the conditions for migrating are activated will
    Source
                migrate the user if its not migrated already to
                the new DB Engine.
              • Will return the Data Source defined by the
                conditions above.
Implementing solution – Step 2
   Building each DB engine plugin
                                    User
                                    Data
                                   Source



    MySQL               MongoDB             Memcached               …
    Plugin               Plugin               Plugin              Plugin

    Requirements:
    • All plugins have to implement the same set of public
      methods/functions.
    • All have to reply in the exact same data structure and format.
    • All plugins constructors may accept as a parameter another plugin
      so we can chain them together if needed.
Implementing solution – Step 3
      Moving all SQL queries from different classes
       methods/functions to the new Data Source infrastructure:

Old Class code:                                  New Class code:
class user {                                     class user {
 $id;                                             $id;
 $first_name;                                     $first_name;
 $last_name;                                      $last_name;
 public function getUser($id) {                   public function getUser($id) {
  $sql = ‘SELECT * FROM users WHERE id =’.$id;
  $userRS = db->fetchArray($sql);
                                                   $uDS = UserDataSource::getUserDS($id);
  $user = $this->buildUser($userRS);               $userRS = $uDS->getUser();
  return $user;                                    $user = $this->buildUser($userRS);
 }                                                 return $user;
}                                                 }
                                                 }
Example 1
 Condition:
 • Read operation and found in Memcached
 • Write operation, writing in MySQL and MongoDB.



                                                     MySQL
                                                     Plugin
             User                          MongoDB
Backen                       Memcached
             Data                           MySQL
  d                            Plugin
            Source                           DS
                                                     MongoDB
                                                      Plugin



           Read operation
           Write operation
Example 2
 Condition:
 • Read and write to MySQL but use MongoDB as backup.




                                                   MySQL
                                                   Plugin
            User                       MongoDB
Backen                     Memcached
            Data                        MySQL
  d                          Plugin
           Source                        DS
                                                   MongoDB
                                                    Plugin



         Read operation
         Write operation
Example 3
 Condition:
 • Only new users should be migrated but use MongoDB as
   backup for all read operations from existing users.



                                                          MySQL
                                                          Plugin
             User                         MongoDB
Backen                      Memcached
             Data                          MySQL
  d                           Plugin
            Source                          DS
                                                          MongoDB
                                                           Plugin



          Read operation
          Write operation
Conclusion
   Pros:
     Separates your app’s code from the Data Storage engines
      languages.
     Adding new Data Engines easily.
     Lets you balance the load generated to each Data Engine.
     As the company grows, a team can be dedicated to the Data
      Plugins development and optimization, while other team can
      actually develop the application itself.
   Cons:
     Your App will generate more queries to the Data Engines.
     You will have to write more lines of code when implementing
      this plugins that when only using one Data Engine.
Final Recap

                     App




                     User
                     Data
                    Source



 MySQL    MongoDB            Memcached     …
 Plugin    Plugin              Plugin    Plugin
Thanks for listening!

         Questions?



    Want to work in NY?
We’re hiring: pixable.com/jobs

Mais conteúdo relacionado

Mais procurados

Mongony aug10
Mongony aug10Mongony aug10
Mongony aug10
bwmcadams
 
NYC Amazon Web Services Meetup: How Glue uses AWS
NYC Amazon Web Services Meetup: How Glue uses AWSNYC Amazon Web Services Meetup: How Glue uses AWS
NYC Amazon Web Services Meetup: How Glue uses AWS
Alex Iskold
 
Transition from relational to NoSQL Philly DAMA Day
Transition from relational to NoSQL Philly DAMA DayTransition from relational to NoSQL Philly DAMA Day
Transition from relational to NoSQL Philly DAMA Day
Dipti Borkar
 
introtomongodb
introtomongodbintrotomongodb
introtomongodb
saikiran
 

Mais procurados (20)

Servlet programming
Servlet programmingServlet programming
Servlet programming
 
MongodB Internals
MongodB InternalsMongodB Internals
MongodB Internals
 
Mongony aug10
Mongony aug10Mongony aug10
Mongony aug10
 
What’s new in Nuxeo 5.2?
What’s new in Nuxeo 5.2?What’s new in Nuxeo 5.2?
What’s new in Nuxeo 5.2?
 
NYC Amazon Web Services Meetup: How Glue uses AWS
NYC Amazon Web Services Meetup: How Glue uses AWSNYC Amazon Web Services Meetup: How Glue uses AWS
NYC Amazon Web Services Meetup: How Glue uses AWS
 
Introduction to NoSQL and Couchbase
Introduction to NoSQL and CouchbaseIntroduction to NoSQL and Couchbase
Introduction to NoSQL and Couchbase
 
Servlet programming
Servlet programmingServlet programming
Servlet programming
 
Responsive & Responsible: Implementing Responsive Design at Scale
Responsive & Responsible: Implementing Responsive Design at ScaleResponsive & Responsible: Implementing Responsive Design at Scale
Responsive & Responsible: Implementing Responsive Design at Scale
 
dba_sathish
dba_sathishdba_sathish
dba_sathish
 
Hong Qiangning in QConBeijing
Hong Qiangning in QConBeijingHong Qiangning in QConBeijing
Hong Qiangning in QConBeijing
 
Navigating the Transition from relational to NoSQL - CloudCon Expo 2012
Navigating the Transition from relational to NoSQL - CloudCon Expo 2012Navigating the Transition from relational to NoSQL - CloudCon Expo 2012
Navigating the Transition from relational to NoSQL - CloudCon Expo 2012
 
Transition from relational to NoSQL Philly DAMA Day
Transition from relational to NoSQL Philly DAMA DayTransition from relational to NoSQL Philly DAMA Day
Transition from relational to NoSQL Philly DAMA Day
 
Jdbc introduction
Jdbc introductionJdbc introduction
Jdbc introduction
 
Jdbc
JdbcJdbc
Jdbc
 
Spring jdbc dao
Spring jdbc daoSpring jdbc dao
Spring jdbc dao
 
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
 
Server side programming bt0083
Server side programming bt0083Server side programming bt0083
Server side programming bt0083
 
Nosql intro
Nosql introNosql intro
Nosql intro
 
introtomongodb
introtomongodbintrotomongodb
introtomongodb
 
Jms deep dive [con4864]
Jms deep dive [con4864]Jms deep dive [con4864]
Jms deep dive [con4864]
 

Semelhante a A flexible plugin like data layer - decouple your -_application logic from your data

Beginning MEAN Stack
Beginning MEAN StackBeginning MEAN Stack
Beginning MEAN Stack
Rob Davarnia
 

Semelhante a A flexible plugin like data layer - decouple your -_application logic from your data (20)

Performance analysis of MongoDB and HBase
Performance analysis of MongoDB and HBasePerformance analysis of MongoDB and HBase
Performance analysis of MongoDB and HBase
 
How to boost performance of your rails app using dynamo db and memcached
How to boost performance of your rails app using dynamo db and memcachedHow to boost performance of your rails app using dynamo db and memcached
How to boost performance of your rails app using dynamo db and memcached
 
MongoDB
MongoDBMongoDB
MongoDB
 
Introduction to MongoDB and its best practices
Introduction to MongoDB and its best practicesIntroduction to MongoDB and its best practices
Introduction to MongoDB and its best practices
 
MongoDB World 2018: Bumps and Breezes: Our Journey from RDBMS to MongoDB
MongoDB World 2018: Bumps and Breezes: Our Journey from RDBMS to MongoDBMongoDB World 2018: Bumps and Breezes: Our Journey from RDBMS to MongoDB
MongoDB World 2018: Bumps and Breezes: Our Journey from RDBMS to MongoDB
 
Webinar: What's New in MongoDB 3.2
Webinar: What's New in MongoDB 3.2Webinar: What's New in MongoDB 3.2
Webinar: What's New in MongoDB 3.2
 
Spring data presentation
Spring data presentationSpring data presentation
Spring data presentation
 
Beginning MEAN Stack
Beginning MEAN StackBeginning MEAN Stack
Beginning MEAN Stack
 
How do you connect your mongo db database with node.js
How do you connect your mongo db database with node.js How do you connect your mongo db database with node.js
How do you connect your mongo db database with node.js
 
Node Js, AngularJs and Express Js Tutorial
Node Js, AngularJs and Express Js TutorialNode Js, AngularJs and Express Js Tutorial
Node Js, AngularJs and Express Js Tutorial
 
Getting Started With Mean Stack
Getting Started With Mean StackGetting Started With Mean Stack
Getting Started With Mean Stack
 
How To Scale v2
How To Scale v2How To Scale v2
How To Scale v2
 
Analytical data processing
Analytical data processingAnalytical data processing
Analytical data processing
 
Creating a Facebook Clone - Part XVII - Transcript.pdf
Creating a Facebook Clone - Part XVII - Transcript.pdfCreating a Facebook Clone - Part XVII - Transcript.pdf
Creating a Facebook Clone - Part XVII - Transcript.pdf
 
How to scale your web app
How to scale your web appHow to scale your web app
How to scale your web app
 
SQL vs NoSQL, an experiment with MongoDB
SQL vs NoSQL, an experiment with MongoDBSQL vs NoSQL, an experiment with MongoDB
SQL vs NoSQL, an experiment with MongoDB
 
Industrial Training.pptx
Industrial Training.pptxIndustrial Training.pptx
Industrial Training.pptx
 
MongoDB Developer's Notebook, March 2016 -- MongoDB Connector for Business In...
MongoDB Developer's Notebook, March 2016 -- MongoDB Connector for Business In...MongoDB Developer's Notebook, March 2016 -- MongoDB Connector for Business In...
MongoDB Developer's Notebook, March 2016 -- MongoDB Connector for Business In...
 
Mongodb
MongodbMongodb
Mongodb
 
mongodb tutorial
mongodb tutorialmongodb tutorial
mongodb tutorial
 

Mais de MongoDB

Mais de MongoDB (20)

MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Migrate Anything* to MongoDB AtlasMongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
 
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
 
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
 
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDBMongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
 
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
 
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series DataMongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
 
MongoDB SoCal 2020: MongoDB Atlas Jump Start
 MongoDB SoCal 2020: MongoDB Atlas Jump Start MongoDB SoCal 2020: MongoDB Atlas Jump Start
MongoDB SoCal 2020: MongoDB Atlas Jump Start
 
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
 
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
 
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
 
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
 
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your MindsetMongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
 
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
MongoDB .local San Francisco 2020: MongoDB Atlas JumpstartMongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
 
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
 
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
 
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
 
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep DiveMongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
 
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & GolangMongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
 
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
 
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
 

A flexible plugin like data layer - decouple your -_application logic from your data

  • 1. Decouple your application logic from your data Juan Soprano - juan@pixable.com Director of Software Development Pixable Inc.
  • 3. Pixable in numbers  ~5 million users  9 billion photos (~5 Terabytes)  35 new million photos a day  80 million categories  16 million writes/hour (~40GB/hour)  30 million reads/hour (~120GB/hour) Logging and profiling - 15k inserts/sec
  • 4. Where can you find us? Pixable.com
  • 5. Where can you find us? iPhone/iPod/iPad
  • 6. Where can you find us? Android
  • 7. Presentation  In Pixable we have migrated from/to different data storage solutions. To accomplish this, we've built a plugin-like data layer to allow complete separation between application code and data storage. In fact, our whole migration from MySQL to MongoDB was performed over this layer, helping us to move chunks of data little by little while learning how the system behaved under the new configuration. During the process, we managed to maintain duplicate copies in MySQL and Mongo for a while until the transition was complete. All of this happened in a way almost transparent to the application code, requiring very little changes in the code.  During this talk, we are going to show how we built this architecture and how easy is to integrate other data storages (memcached, S3, etc) on it. We will also share some tips that we've learned down the road and pros/cons of working under this schema.
  • 8. Initial infrastructure  LAMMP (Lynux-Apache-Memcache-MySQL-PHP) Backend Frontend MySQL API User DB class user { $id; $first_name; $last_name; public function getUser($id) { $sql = ‘SELECT * FROM users WHERE id =’.$id; $userRS = db->fetchArray($sql); $user = $this->buildUser($userRS); return $user; } }
  • 9. Issues encountered  Limit on the DB connections to Master.  Not able to hit the DB hard without generating lag on the slave servers.  Adding a field to an existing table with billions of records would mean downtime of the App.  Adding new DB servers was slow (in some cases required downtime of the app) and high in server costs. …so we needed a DB engine easy to grow, schema-less and low in server cost.
  • 10. Solution found  MongoDB  Has built-in sharding  ReplicaSet features automatic data clone, synchronization and PRIMARY failover.  Our data fits perfectly in the MongoDB document paradigm.  Schema-less.  Easier to have many small machines, failures or maintenances are less traumatic.  Background index creation. …now we needed a way to start migration without having downtime and data loss.
  • 11. Implementing solution  Migrating code from classes/functions with SQL queries all around the project code to the new Flexible Plugin-like data layer. API Backend Frontend MySQL User DB MySQL MySQL User DS DB API Backend User Frontend Data User Source MongoDB Mongo User DS DB
  • 12. Implementing solution – Step 1  User Data Source (Plugin manager) • Gets the call from the backend for the user data source. • Evaluates the conditions defined by us to see what Data Source to return and looks for the User user in the correct data source. Data • If the conditions for migrating are activated will Source migrate the user if its not migrated already to the new DB Engine. • Will return the Data Source defined by the conditions above.
  • 13. Implementing solution – Step 2  Building each DB engine plugin User Data Source MySQL MongoDB Memcached … Plugin Plugin Plugin Plugin Requirements: • All plugins have to implement the same set of public methods/functions. • All have to reply in the exact same data structure and format. • All plugins constructors may accept as a parameter another plugin so we can chain them together if needed.
  • 14. Implementing solution – Step 3  Moving all SQL queries from different classes methods/functions to the new Data Source infrastructure: Old Class code: New Class code: class user { class user { $id; $id; $first_name; $first_name; $last_name; $last_name; public function getUser($id) { public function getUser($id) { $sql = ‘SELECT * FROM users WHERE id =’.$id; $userRS = db->fetchArray($sql); $uDS = UserDataSource::getUserDS($id); $user = $this->buildUser($userRS); $userRS = $uDS->getUser(); return $user; $user = $this->buildUser($userRS); } return $user; } } }
  • 15. Example 1 Condition: • Read operation and found in Memcached • Write operation, writing in MySQL and MongoDB. MySQL Plugin User MongoDB Backen Memcached Data MySQL d Plugin Source DS MongoDB Plugin Read operation Write operation
  • 16. Example 2 Condition: • Read and write to MySQL but use MongoDB as backup. MySQL Plugin User MongoDB Backen Memcached Data MySQL d Plugin Source DS MongoDB Plugin Read operation Write operation
  • 17. Example 3 Condition: • Only new users should be migrated but use MongoDB as backup for all read operations from existing users. MySQL Plugin User MongoDB Backen Memcached Data MySQL d Plugin Source DS MongoDB Plugin Read operation Write operation
  • 18. Conclusion  Pros:  Separates your app’s code from the Data Storage engines languages.  Adding new Data Engines easily.  Lets you balance the load generated to each Data Engine.  As the company grows, a team can be dedicated to the Data Plugins development and optimization, while other team can actually develop the application itself.  Cons:  Your App will generate more queries to the Data Engines.  You will have to write more lines of code when implementing this plugins that when only using one Data Engine.
  • 19. Final Recap App User Data Source MySQL MongoDB Memcached … Plugin Plugin Plugin Plugin
  • 20. Thanks for listening! Questions? Want to work in NY? We’re hiring: pixable.com/jobs

Notas do Editor

  1. Now a days fast changing market/products force one to evolve during the process
  2. Q: How many of you started with LAMP?Easy query, but usually queries are much more complicated than this. Tear them down once applied the new plugin structure.
  3. For doing so we had to normalize all the objects to one same structure with default values and data types (dates to linux time format, etc.) as all Data Layers have to reply to the APP in the exact same format to guarantee compatibility if we decide to deactivate one of the layers.
  4. Conditions for migrating can be from true to false to start migrating users as they come to the app, to more complex conditionals like comparing the last two digits of a user ID and comparing it to a percentage defined by us to see if it should be migrated or not to the new Data Source.Chain Data Sources
  5. Plugins IMPLEMENT a interface class, for minimal public functions check.Data Format = reply with an instance of the object already.
  6. Backend calls insertUser().User DS checks conditions and replies with the data source for the user.Memcached won’t find it so it will call the MongoMySQL DS.MongoMySQL DS will then run from the logic of migration and determined that because it’s a new user we will store it only on MongoDB.
  7. Backend calls insertUser().User DS checks conditions and replies with the data source for the user.Memcached won’t find it so it will call the MongoMySQL DS.MongoMySQL DS will then run from the logic of migration and determined that because it’s a new user we will store it only on MongoDB.
  8. Backend calls insertUser().User DS checks conditions and replies with the data source for the user.Memcached won’t find it so it will call the MongoMySQL DS.MongoMySQL DS will then run from the logic of migration and determined that because it’s a new user we will store it only on MongoDB.
  9. ----- Meeting Notes (10/23/12 18:59) -----More queries will only happen while in the migration process.
  10. You can chain them together.You can have different DataSources in different geographic locations for testing a new DB Engine on a location where you have less amount of users.Went form LAMMP to LADP (D = Data = Multiple Data Storage)