3 ms·
> We surely don't want to have the webshop-frontend send database queries to the backend to get the results. We don't? Why not?
by dventimi 3y ago
> We surely don't want to have the webshop-frontend send database queries to the backend to get the results.
We don't? Why not?
- onion2k 3y agoYou could get queries that don't use indexes and have to perform table scans. That's fine when your data is small, but it's a performance bottleneck waiting to happen.
- dventimi 3y agoThe statement timeout will put an end to that.
- contrast 3y agoSome reasons are given in the very first paragraph.
- dventimi 3y agoYou mean the very first paragraph in which the author invites us to reevaluate those reasons? You mean those reasons which include the following? - Exposing an API that accepts SQL is crazy. - It's a terrible idea. - Especially if the API is exposed on the internet. That isn't reasoning. We don't encounter actual reasoning until: - Doing that is insecure - itwill lead to SQL injection attacks - it is a nightmare to maintain - it will lock the backend implementation into a specific technology Even these are highly debatable, so I ask again, why not just expose a SQL API, even over the Internet?