Hacker Newsnew | past | comments | ask | show | jobs | submit | neon_me's commentslogin

great! singuped! Just please - get rid of that all blue and underlined links. Its hell to read.

Ha, thanks for the feedback! People have made a few points about the styling, it definitely needs a harder look. Maybe a silly question but which do you find worse, the blue color or the underlines?

Install some custom style css extensions and look at all the HN variations. I like the solarized one.

"serverless"


Cheap? 20% increase in cost of BoM equals at least ~100% increase for customer. Would you pay twice for AMD components? What would market do?


Companies charge what the market can bear, not based on their costs. Certainly they will often use some multiplier of their costs as a starting point, and they can't sustainably charge below their costs. But if they double the price of the product and lose more than half of their customers, that's a failure to set pricing properly.

Consider the reverse direction: if a company can decrease costs, they will usually pocket the extra profit, not reduce the price they charge. Price cuts usually only happen for one of two reasons: 1) to avoid losing customers to another company that is charging less (or to entice customers of another company that's charging the same), or 2) to capture more profit if they'll earn more customers at a lower price than they'll lose due to the lower per-unit profit. (Yes, there are other reasons, but these seem to be the main ones.

For goods that are not essential to life, prices are set based on what people are willing to pay vs. how many units can be sold at that price, with the cost as a floor (absent a policy of using a product as a loss leader).


Does a 20% decrease result in a -50% discount? Why would it be nonlinear?


20% decrease would be only 80% price rise for the customer


> 20% increase in cost of BoM equals at least ~100% increase for customer.

I am no expert in BoM and margins, but that seems like a wild claim to me. Could you explain your math?


If people won't pay double for AMD components, that's not what the price will be. Cost increases usually eat into margins partially.


Presumably they would also accept a lower margin on these, so maybe not 100%.


What is the alternative?


100%! Not only local-first. But also private, zero/minimal dependency, open source and environment agnostic!

If there is anyone interested in working on such projects - let's talk! We can't leave our future to greedy surveillance zealots.


Server will store encrypted blob and its hash/etag.

Client before upload of data, check for hash/etag of blob he originally fetched. If blob on server has different one, it will download it, decrypt, patch new data on existing one, encrypt and reupload.

Whats the catch?

AES is hardware accelerated on the most devices - so with all the ops it will be significantly faster than any homomorphic enc nowadays.


I too was wondering the same thing. FHE is cool tech, but this seems to me to be a bad application of it since it will undoubtedly be less efficient.

FHE is useful when trying to compute on data from various sources who all mutually want to keep some information secret. For example, Apple's use of FHE to categorize photos [1]. In this case all the server is really doing is "compressing" for lack of a better word, the change sets, so each offline client doesn't need to sync every message since they are already merged by the server.

If all you want is to keep a synchronizing server in the dark, but all clients can be trusted with the unencrypted data, traditional key exchange and symmetric encryption should suffice.

[1]: https://machinelearning.apple.com/research/homomorphic-encry...


GraphenOS was the only reason to buy pixel.


For now, unfortunately, no - no signed URLs are supported. It wasn't my focus (use case), but if you find a simple/minimalistic way to implement it, I can help you with that to integrate it.

From my helicopter perspective, it adds extra complexity and size, which could maybe be ideal for a separate fork/project?


Signed URLs are great because it allows you to allow third parties access to a file without them having to authenticate against AWS.

Our primary use case is browser-based uploads. You don't want people uploading anything and everything, like the wordpress upload folder. And it's timed, so you don't have to worry about someone recycling the URL.


I use presigned urls as part of a federation layer on top of an s3 bucket. Users make authenticated requests to my api which checks their permissions (if they have access to read/write to the specified slice of the s3 bucket), my api sends a presigned url back to allow read/write/delete to that specific portion of the bucket.


is there a way to wrap their s3 client for use in HonoJS/CF workers?


No. It's implemented in native code (Zig) inside bun itself and just exposed to developers as a JavaScript API.

Source code: https://github.com/oven-sh/bun/tree/6ebad50543bf2c4107d4b4c2...


10/10 Loving it (and how fast it is!) - its just not the use-case that fits my needs.

I want maximum ability to "move" my projects among services/vendors/providers


i assume you can just use it[0] in your project and then build (using bun) for cf workers[1]

[0] https://bun.sh/docs/api/s3

[1] https://hono.dev/docs/getting-started/cloudflare-workers \ (https://bun.sh/docs/api/workers ?)


Personally, I don't like AWS that much. I tried to set it up, but found it "terribly tedious" and drop the idea and instead focus on other platforms.

Right now, I am testing/configuring Ceph ... but its open-source! Every talented weirdo with free time is welcomed to contribute!


Also try out Garage.


Good to see this mentioned. We are considering running it for some things internally, along with Harbor. The fact that the resource footprint is advertised as small enough is compelling.

What's your experience running it?


does it make sense or should that be optional?


checksumming does make sense because it ensures that the file you've transferred is complete and what was expected. if the checksum of the file you've downloaded differs from the server gave you, you should not process the file further and throw an error (worst case would probably be a man in the middle attack, not so worse cases being packet loss i guess)


> checksumming does make sense because it ensures that the file you've transferred is complete and what was expected.

TCP has a checksum for packet loss, and TLS protects against MITM.

I've always found this aspect of S3's design questionable. Sending both a content-md5 AND a x-amz-content-sha256 header and taking up gobs of compute in the process, sheesh...

It's also part of the reason why running minio in its single node single drive mode is a resource hog.


I got some empirical data on this!

Effingo file copy service does application-layer strong checksums and detects about 4.5 corruptions per exabyte transferred (figure 9, section 6.2 in [1]).

This is on top of TCP checksums, transport layer checksums/encryption (gRPC), ECC RAM and other layers along the way.

Many of these could be traced back to a "broken" machine that was eventually taken out.

[1] https://dl.acm.org/doi/abs/10.1145/3651890.3672262


In my view one reason is to ensure integrity down the line. You want the checksum of a file to still be the same when you download it maybe years later. If it isn't, you get warned about it. Without the checksum, how will you know for sure? Keep your own database of checksums? :)


If we're talking about bitrot protection, I'm pretty sure S3 would use some form of checksum (such as crc32 or xxhash) on each internal block to facilitate the Reed-Solomon process.

If it's verifying whether if it's the same file, you can use the Etag header which is computed server side by S3. Although I don't like this design as it ossifies the checksum algorithm.



Well known (apparently not?) that applications can't rely on TCP checksums.


TLS ensures that stream was not altered. Any further checksums are redundant.


This is actually not the case. The TLS stream ensures that the packets transferred between your machine and S3 are not corrupted, but that doesn't protect against bit-flips which could (though, obviously, shouldn't) occur from within S3 itself. The benefit of an end-to-end checksum like this is that the S3 system can store it directly next to the data, validate it when it reads the data back (making sure that nothing has changed since your original PutObject), and then give it back to you on request (so that you can also validate it in your client). It's the only way for your client to have bullet-proof certainty of integrity the entire time that the data is in the system.


Thats true, but wouldn't it be still required if you're having a internal S3 service which is used by internal services and does not have HTTPS (as it is not exposed to the public)? I get that the best practice would be to also use HTTPS there but I'd guess thats not the norm?


Theoretically TCP packets have checksums, however it's fairly weak. So for HTTP, additional checksums make sense. Although I'm not sure, if there are any internal AWS S3 deployments working over HTTP and why would they complicate their protocol for everyone to help such a niche use case.

I'm sure that they have reasons for this whole request signature scheme over traditional "Authorization: Bearer $token" header, but I never understood it.


AWS has a video about it somewhere, but in general, it’s because S3 was designed in a world where not all browsers/clients had HTTPS and it was a reasonably expensive operation to do the encryption (like, IE6 world). SigV4 (and its predecessors) are cheap and easy once you understand the code.

https://youtube.com/watch?v=tPr1AgGkvc4, about 10 minutes in I think.


Because a bearer token is a bearer token to do any request, while a pre-signed request allows you to hand out the capability to perform _only that specific request_.


Bearer tokens have a defined scope, which could be used to limit functionality in a similar way to pre-signed requests.

However, the s3 pre-signed requests functionality was launched in 2011, but the Bearer token RFC 6750 wasn't standardised until 2012...


Not always. Lots of companies intercept and potentially modify TLS traffic between network boundaries.


yes, you are right!

On the other hand S3 uses checksums only to verify expected upload (on the write from client -> server) ... and suprisingly you can do that in paralel after the upload - by checking the MD5 hash of blob to ETag (*with some caveats)


You need the checksum only if the file is big and you're downloading it to disk, or if you're paranoid that some malware with root access might be altering the contents of your memory.


Or you really care about the data and are aware of the statistical inevitability of a bit flip somewhere along the line if you’re operating long enough.


I mean if a malware is root and altering your memory it's not like you're in a position where this check is meaningful haha


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: