David Jordanes

David Jordanes

  • NA
  • 2
  • 758

node.js distributed system for processing data

Feb 27 2022 9:16 PM

Requirements:

  • A stateless REST service with node.js
  • A distributed system to process the input data


Simple Example: A client makes a request and sends a list of integers (e.g. 2,1,4,8,9,7,5,2,3,4,1,2). The service should return the sum of the squares of its' input numbers (2^2 + 1^2 + ...). The distributed system should split the process to different servers (part of the distributed system).

Questions:

  • How this system knows when the processing of a request has finished?
  • Assuming we get concurrent requests from various clients: How this system knows which sub-sums should be aggregated to return the correct sum to each client?
  • Has anyone implemented something similar?

I have no code examples so far, I am interested in suggestions for the architecture and good practices.