Hacker News new | ask | show | jobs
by habosa 1455 days ago
A few points here:

1) That’s a JOIN and Firestore is not unique among NoSQL databases for being bad at it.

2) That’s the code you’d use in a web browser to load Firestore data. That code also handles all of the API and Authentication code you’d normally put in front of another DB. It’s serverless. So that is a fully functional snippet, your SQL example needs an API layer and frontend deserialization code.

3) It does not make a new HTTP connection per request. It uses a long-lived gRPC connection.

1 comments

2: The code does not handle authentification. The code literally just says "Give me this, give me that...".

3: It is still a "a client-server http roundtrip" for every query. It does not open and close the http connection every time. But it sends a "GET / HTTP ..." request for every query. With hostname, accepted formats, encodings etc.

The code does not handle authentication because it does not need to - all data access and auth rules happen within Firestore/Firebase. If a client requests data they do not have access to, they won’t get it.