Sunday 14 February 2016

Data processing inside or outside the route?

I'm developing an API which receives some data and then does a lot of processing on it.Each bit of the processing is separated into its own module.Should I call these modules inside the route (the API point which receives the data), or should I just hand the data (pre-processed) back to the main app and call the processing modules there?I'm worried if I do the processing in the route, it will delay returning a 200 response, and I'm worried if I do the processing in the main app, it might cause performance issues...?Thank you for your advice.

Submitted February 15, 2016 at 07:15AM by MEAN_questions

No comments:

Post a Comment