66
votes
Accepted
Why can FAT16 not store more than 2 GB?
FAT16 uses 16 bits to identify clusters. Thus there are a maximum of 65536 clusters before you run out of identifiers, and some identifiers are reserved for non-file uses. Each file occupies at least ...
55
votes
Accepted
What is the size of the number 65535 in bytes?
TL;DR
The key takeaway here is that there is a world of difference between the number 65535 and a piece of text which represents the digits '6', '5', '5', '3' and '5'. It may look the same to you when ...
12
votes
Why can FAT16 not store more than 2 GB?
There were actually several variants of "FAT16" over the years with different limits but lets consider the version that persisted from "compaq DOS 3.31" through to windows 95.
FAT volumes are divided ...
9
votes
Share files between microservices
The goal in a microservice architecture is to reduce dependencies shared by multiple services, so that if, e.g. the FileService needs to change the file system or structure, other services are not ...
8
votes
What is the size of the number 65535 in bytes?
There are likely several variables at play here, but 65535 is 5 characters. 1 byte per character = 5 bytes. Text editors don't have a notion of what a number is the same way that your code does, so ...
7
votes
Accepted
How do different file types generally store data?
The reason there are many different file formats is that there are many different goals for the way data is formatted. Some of these are in opposition to each other and some are orthogonal to each ...
6
votes
What is the size of the number 65535 in bytes?
As Thomas Weller noted, you can use less than 2 bytes if you restrict the number of possible expressions that you want to convey.
You could even use as little as one bit if you and your communication ...
6
votes
What is the size of the number 65535 in bytes?
The reason the file contains 5 Bytes of information is because the text (String) '65535' that you typed in is five characters long.
Each of those characters is very common, a digit, and is part of the ...
6
votes
Accepted
Is storing files of up to 50MB in size in a database for use by multiple servers a reasonable idea? Example inside
NO, don't store files in a relational database
Trust me, I've learned this the hard way. One problem with applications that deal with files, is as they evolve, the users always want to store more than ...
5
votes
Accepted
Is it safe to store application files to user's temp directory?
Direct answer
Is it safe to store application files to user's temp directory?
To the letter of your question, yes, it is safe. However, very much take the bolded part into account. Not just any ...
4
votes
Creating associated resources before creating the main one in a REST setting
Perhaps you're documenting a visit to the radiologist,
so in addition to pulse rate and blood pressure we're
recording lots of giant X-ray images in lots of S3 image files.
S3 has no efficient bulk ...
4
votes
Accepted
Saving and reading files in user specific application data in C or C++
I would heavily avoid any solution which uses chdir, since it is way too errorprone. It might interfer with other places in a codebase assuming the current directory wasn't changed (or worse - change ...
4
votes
Accepted
Strategies to shard local storage folders based on sequential key
Given you have ~30 million files in total, that means you need ~3000 directories. Therefore just do hash(filename) % 3000.
3
votes
What is the size of the number 65535 in bytes?
A number is a mathematical concept which is not made of bytes. Bits or bytes only come into play when you want to represent (or encode) a number on a computer, and the amount of bits/bytes you need ...
3
votes
Best way to store and fetch image bytes?
There's two issues in your problem statement:
A cache is a subset of the larger data to server files that are accessed more frequently. You have to invalidate low hit rate cache entries or you will ...
3
votes
Is storing files of up to 50MB in size in a database for use by multiple servers a reasonable idea? Example inside
Obviously, you have some options but there are also trade-offs. To answer your questions:
Is this a reasonable way to store files of this size for serving?
The answer of that really depends on ...
3
votes
How do database storage engines handle new columns?
It Depends...
If you are really interested in all of the possible ways find yourself a book on database engines, something like An Introduction to Database Systems
The Dumb Way
Treat every record ...
2
votes
When is the point where a JSON text file storage is not enough?
There is no point.
Wow, talk about a "zen" answer. However, what I mean is that instead of a point, in reality you rather have a spectrum.
Hard criteria
Don't get me wrong, a hard criterium ...
2
votes
Does a replicated distributed file system minimise the need for durability?
Key value stores that don't persist to disk are generally billed as caches, implying there is another long-term durable storage your application manages somewhere else. If your data is important to ...
2
votes
In DDD, is it worth it to define a Bounded Context for file access?
As I understand it file management is not part of your business domain so a dedicated bounded context does not make sense from my opinion.
I can somehow understand though that you don't feel ...
2
votes
What is the size of the number 65535 in bytes?
TL;DR: With typical representations, it can vary from 2 bytes to 14 bytes.
You ask about the size of 65535 in bytes, and that depends on many factors.
A byte is a unit of 8 bits, that's easy and ...
2
votes
Accepted
Why does most software break or refuse to continue immediately if the folder where their data is stored is not available?
In C programming, we have this notion of undefined behavior.
It means that, if you write code that creates situations that are not defined by the language standard, anything can happen. The program ...
2
votes
Creating associated resources before creating the main one in a REST setting
I agree with J_H's answer, but there are several additional points I would like to make:
It is implied that you will be storing meta data about the upload into another data store - someone can always ...
2
votes
PHP secure storage for sensitive document uploads
Secure against what?
If you're afraid someone is going to pull the HD and take it home then full disk encryption works (so long as you didn't leave the key lying around).
If you're afraid someone is ...
1
vote
What is the size of the number 65535 in bytes?
What is a byte? Let's assume the modern eight bits.
What is the representation? What other values have to be possible in that representation?
Suppose we assume a pure binary representation which can ...
1
vote
File system for abstracting S3 object storage
You have a choice between sanity and robustness.
The sanest way to do this is indeed to generate the unique ID. You then don't need to disturb S3 (or whatever) if, for example, you rename a file.
The ...
1
vote
How could creating symlinks/aliases to files on S3 work, while still taking advantage of CDN optimizations?
User uploads file to your app and receives a unique URL which points to your app.
User follows that url, your app receives the request, and responds with a 302 redirect to the CDN's shared file ...
1
vote
Share files between microservices
In most situations this is a Bad Idea™.
It breaks encapsulation, but much worse it opens you up to supply chain risk.
That FileService API isn't guaranteed to function the sameway tomorrow. It might ...
1
vote
How to store legacy source texts snapshots with FTS (full text search) all through their history?
I would recommend using GIT anyway.
not because its fast.
not because it makes life easier
not because you can make an actual timeline
but because that data will rot in the file system as more and ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
file-storage × 58file-systems × 10
database × 8
file-handling × 7
storage × 7
c# × 4
architecture × 4
aws × 4
design × 3
java × 3
performance × 3
data × 3
file-structure × 3
files × 3
python × 2
web-development × 2
rest × 2
data-structures × 2
windows × 2
xml × 2
azure × 2
design-patterns × 1
c++ × 1
php × 1
domain-driven-design × 1