Giter VIP home page Giter VIP logo

async_live_review-2's Introduction

Async Exercise

You have a server which stores a large square 2d array with even number of rows and columns. The task is to replicate the 2d array on the client.


Instructions to setup the project

  1. Clone the project
git clone https://github.com/pixyj/mb-async-live-review-2 async_live_review
  1. cd to the async_live_review directory
cd async_live_review
  1. Install dependencies
npm install
  1. Start the server
node server.js

In client.js, Perform the below steps in the following order:

  1. Initialize the server by calling the /initialize API using node-fetch. Initialize will initialize a square 2d array in the server and return the size (number of rows / number of columns) of the 2d array
  2. Fetch all the values of the 2d array by calling the /value API by providing the rowIndex and colIndex as query parameters. Example URL: "http://localhost:3000/value?rowIndex=0&colIndex=0". When fetching the values, you need to fetch 2 values concurrently, before moving on to fetching the next 2 values and so on.
  3. Once all the values are fetched, print the 2d array on the client side. Ensure it matches the 2d array printed on the server.

Docs:

async_live_review-2's People

Contributors

pixyj avatar anilmaurya61 avatar

Watchers

 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.