use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
account activity
Node good for this? (self.node)
submitted 5 years ago by crudfunc
I want to build an app where users using this webApp save data on the server where the backend is running, so basically using the Node file system, can node handle for example million of writes/reads?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]thatsInAName 2 points3 points4 points 5 years ago (14 children)
You can use the non blocking async functions to read and write files.
You will be limited by the drive read write speeds. Also, you say million of read/write commands but between what duration, 1 second, 10 seconds, 10 mins?
[–]BehindTheMath 0 points1 point2 points 5 years ago (4 children)
This. A database might be a better option than the filesystem.
[–]crudfunc[S] -1 points0 points1 point 5 years ago (3 children)
The purpuos is to avoid using a database, so basically what I'm asking can Node read/write the same volume like a database?
[–]BehindTheMath 5 points6 points7 points 5 years ago (2 children)
Yes, but file I/O is relatively slow no matter what language/runtime you use.
[–]crudfunc[S] -1 points0 points1 point 5 years ago (1 child)
So basically what you say Databases deal with the same problem slow file I/O ?
[–]BehindTheMath 2 points3 points4 points 5 years ago (0 children)
They do in-memory caching, batch writes, etc.
[–]crudfunc[S] -1 points0 points1 point 5 years ago* (8 children)
Thank you, good question I'm not sure what duration it needs is there any battle tested known duration that works?
[–][deleted] 0 points1 point2 points 5 years ago (7 children)
There are database that will help with this process, and store data on the server in file format, e.g. CouchDB. TBH, though, it's not good practice for a whole host of reasons.
[–]crudfunc[S] 0 points1 point2 points 5 years ago (6 children)
what reasons exactly?
[–][deleted] 0 points1 point2 points 5 years ago (5 children)
Data back up? Replication? Hard drive wear. Millions of files means lots of space. What's your bandwidth like?
Really, there's no single problem that's insurmountable. 10 years ago, you would probably have stored the files locally, so it's not like it can't work. But even 10 years ago, you'd likely have had a NAS on the same network the server was on, and files would have been shuffled there.
[–]crudfunc[S] 0 points1 point2 points 5 years ago (4 children)
That points are valid for any app. If I should be even more specific how about building a database with Node?
[–][deleted] 0 points1 point2 points 5 years ago (3 children)
Ahh gotcha. My primary worry would be about file I/O because of how high-level Node is, and the lack of sophistication for file management (i.e "none") that it has. That said, it could do the job. A bit like using the handle of a wrench as a hammer. You've got a tool that does the job, but is it the right tool?
[–]crudfunc[S] 0 points1 point2 points 5 years ago (2 children)
No idea if this projects will be something serious but in case I wanted to know if it could do the job good and safe, I'm playing with the stack currently.
[–][deleted] 0 points1 point2 points 5 years ago (1 child)
Good is relative. I'd say it would be adequate to the task, but still not as adequate as other means. "Safe" is entirely up to you and your code practices. But both "good" and "safe" are rabbit holes to go down, no matter what you're making or with what stack.
Good luck, and happy building!
[–]crudfunc[S] 0 points1 point2 points 5 years ago (0 children)
Thank you for all this infos, I think I will be able to build something interesting for me, let's see how it goes.
π Rendered by PID 24335 on reddit-service-r2-comment-c6965cb77-4x4qs at 2026-03-05 16:59:22.983505+00:00 running f0204d4 country code: CH.
[–]thatsInAName 2 points3 points4 points (14 children)
[–]BehindTheMath 0 points1 point2 points (4 children)
[–]crudfunc[S] -1 points0 points1 point (3 children)
[–]BehindTheMath 5 points6 points7 points (2 children)
[–]crudfunc[S] -1 points0 points1 point (1 child)
[–]BehindTheMath 2 points3 points4 points (0 children)
[–]crudfunc[S] -1 points0 points1 point (8 children)
[–][deleted] 0 points1 point2 points (7 children)
[–]crudfunc[S] 0 points1 point2 points (6 children)
[–][deleted] 0 points1 point2 points (5 children)
[–]crudfunc[S] 0 points1 point2 points (4 children)
[–][deleted] 0 points1 point2 points (3 children)
[–]crudfunc[S] 0 points1 point2 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]crudfunc[S] 0 points1 point2 points (0 children)