GithubHelp home page GithubHelp logo

sync_test's Introduction

1- I implemented a factory and used faker to improve the way in which we are inserting data into the database.

2- The sync all limit is pretty straight forward, so we get all the rows in the source database and we inserted them in the target.

3- The sync all safely is an implementation of batching insertion, based on a batch size we implementad a kind of pagination to insert an amount of records in batches, this implementation wanted to follow the sendEvent method that was required, but in real if we want to do a "batch insertion" we should use the massive insert.

4- The sync new changes is using a "flag variable" that's storing basically the date of the last sync, so basically when we do a new sync all the records that has update_at > than that date are synced, I created an upsert method because we don't know if the records are new to insert or just updates.

5- The synchronize method is just using the union of syncAllSafety and syncNewChanges to do the pooling.

sync_test's People

Contributors

lautarob avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.