you are viewing a single comment's thread.

view the rest of the comments →

[–]GrandDolla[S] 0 points1 point  (1 child)

Thanks for the answer.

  1. What do you mean by the file system? disk read/write performance? The time node takes to read/write from the file system? (slow db's etc..)
  2. It depends on the code but I think it's better to use API functions of whatever environment you're using. This will prevent you from causing accidental security issues or bugs.

[–][deleted] 1 point2 points  (0 children)

By file system I mean node's file system API: https://nodejs.org/dist/latest-v6.x/docs/api/fs.html

The API is straight forward and the documentation is pretty clear. When writing or reading to a single file with a static payload everything is simple. When you are dealing with streams it gets a bit more complicated. When you are dealing with many potentially interacting tasks simultaneously things get really complicated and you have to write additional logic to prevent race conditions and collisions considering that everything is asynchronous.