Giter Site home page Giter Site logo

nextjs-book-list's Introduction

Investigation on How to Handle Big Data

How to handle a file with hundreds of MBs of JSON data (1,000,000 records).

1. Research Phase

Possible options:

  • To stream the JSON using Node Streams (Discarded: It's complex and there are easier ways to do it)
  • To use a database:
    • Since the data were in JSON format, it seemed natural to import them into a No-SQL database like Mongodb
    • Where to host the data?
      • Using MongoDB Stitch Service (Serverless Functions) (Discarded: Too simple. Incomplete Mongodb API)
      • Using a full-fledged MongoDB database in the cloud

2. Implementation Phase

Features:

  • Backend
  • Frontend
    • ReactJS
    • Lazy loaded images (Only images in the visible portion of the page are loaded)
    • Material UI
    • Responsive Design
    • Use of Repository Pattern
    • Proof of concept of "Infinite Scroll"
  • Database
  • Testing

Demo

Install

  • Download or clone the source code

  • Change the path to the local source code directory

  • Install the dependencies running in the command line:

npm run install

Run

npm run dev

Test

npm run test

Important Considerations

  • Due to time constrains, only e2e tests has been implemented because integration tests have priority in case of apps based in RESTful APIs
  • For the same reason, not all cases have been tested, but the remaining ones are similar
  • The addition of indexes to the database for sorting and filtering is very important. In other case the database will return an error caused by exceeding the maximum memory limit needed to process the number of records (1,000,000)

Audit

Back to top

nextjs-book-list's People

Contributors

yagolopez avatar

Watchers

 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.