4 ms·
S3 is the complexity. anything added to a system doubles the complexity of said system...
by blondin 8y ago
S3 is the complexity. anything added to a system doubles the complexity of said system...
- scarface74 8y agoSo instead of aphorisms, care to explain the complexity of issuing one command to copy a file and storing the URL in the database and letting AWS taking care of copying?
- BurningFrog 8y agoDoing something is always more complexity than doing nothing. Some seem to think "complexity" only happens when something is really hard. That's not how to think of it at all. Systems usually become overly complex by adding many little simple things. Each of those may be trivial, but together they can make your system impossible to understand and manage.
- scarface74 8y agoYou still haven’t said how in this particular case it’s more complex. In fact, you are offloading sending images to AWS instead of you doing it yourself.
- 0xFACEFEED 8y agoDeletions for one. You'll need a background job with retry logic.
- scarface74 8y agoWhy a background job? Just delete the object when you delete the record.
- bencoder 8y agoYou've skipped over quite a lot. - learning about and understanding S3 in the first place. - Billing and AWS account management (possibly requiring agreement/permission from others) - maintaining credentials securely for your app to access S3. - bug fixing (for e.g. it's easy to get the permissions wrong when you upload so that it's not visible) Since you're already storing the URL in your dB, why not just store the binary data you have? I don't think you're wrong about using something like S3 being a better solution, but it's not quite as simple as "issuing one command"
- scarface74 8y ago- there is literally one command and a quick Google search. - he brought up S3, I am assuming he’s already on AWS - you don’t have to. The role attached to your EC2 instance will have permission. If he is already on AWS, hopefully he knows that. - From the requirements it seems like the images should be publicly accessible. If not, when you create a bucket, it’s by default private. Yes if he wants to limit access he would have to either stream from S3 to the client - I had to do that it was a quick Google search - or generate presigned URL. Why not store binary data in the DB? It makes backups larger. That being said, SQL Server has the filestream type that does in fact store the binary data as a separate file on disk, but gets treated as if it is part of the database for backup and restore purposes.