4 ms·
Sometimes I feel like the articles posted here are elaborate trolls. Like they wanted to know what the purpose of a cache is and how/when to implement one, but
by 0xbadcafebee 3y ago
Sometimes I feel like the articles posted here are elaborate trolls. Like they wanted to know what the purpose of a cache is and how/when to implement one, but they didn't want to do research, so they came up with the worst idea they could imagine and blogged about it, hoping someone on HN would tell them the right way (or just laughing at people trying to correct them).
It gives me anxiety how much truly awful advice is upvoted here. It feels like children playing in a sand pit, and then one of the children dumps a box of rat poison on the ground, and some kid says how rat poison is actually good for you because it contains minerals or something. So they all start quickly scarfing it down. You try to tell them rat poison is bad for them, and then several of the kids start defending rat poison, with one lecturing you for being so negative about rat poison. I guess I should just let the kids poison themselves, but it's a terrible thing to watch.
- luibelgo 3y agoNot super constructive either, the beauty of having things like HN is to be able to discuss ideas, rather than just point to them as wrong. At least a couple of counterpoints on why this would be a bad idea and offer a better approach.
- mrd3v0 3y agoThere are way more terrible ideas than good ones, and that means treating all of them equally is a one-way road to HN losing the one thing it has going: new ideas. Feedback like root comment is important to keep pushing ideas forward, instead of a loop.
- thunky 3y ago> Feedback like root comment What feedback? All I see is someone smelling their own farts.
- 0xbadcafebee 3y agoI would honestly love to educate people here. But when the rabble come together to downvote you and dismiss what you're saying, the general perception from any reader is going to be that I'm wrong because so many people are disagreeing with me. Despite the fact that I'm literally an expert and they're not. So it's useless. (And just hurts my soul.)
- eloisant 3y agoYes, and honestly his "why" section really reads like "A hammer can do everything a screwdriver can, and I really like my hammer so I'll use it to push screws into planks".
- inopinatus 3y agoThis is Cunningham’s Law. https://en.wikipedia.org/wiki/Ward_Cunningham#%22Cunningham's_Law%22 https://en.wikipedia.org/wiki/Ward_Cunningham#%22Cunningham'...
- macNchz 3y agoDo you have specific criticisms? There are myriad and varied different use cases for a cache. I’ve used Postgres in a pinch. It’s fine, for certain things. I’ve used a lot of other caches as well that would be highly inappropriate for the situations I’ve used Postgres in. In my experience there are far more highly-overwrought bloated architectures deployed than there are overly-clever minimalist ones. Everyone wants to put the cool tools on their resume.
- lnxg33k1 3y agoSo for one we do cache to remove load from dbms, then makes a lot of sense to remove load from dbms by giving it the load of cache too, another thing might be that separate services might be optimised for different tasks, redis is built with being first class in memory cache service, postgres is built with different first-class usage in mind, another one I can think of is resources, I can scale redis and dbms independently as their specific needs change Overall for me this cache in postgres is a bad idea too
- mbreese 3y agoI see this as an issue of scale. HN loves to think about infinite scales where there are millions of simultaneous users of systems. This is rarely the case. Caching in Postgres is for smaller scale applications where the extra complexity of a dedicated memory cache isn’t worth the extra overhead. But at least you bring up some actual limits that should to be considered. DB load: part of the load on a DB is the network connection for the query, but a large part is also finding the data. If you have a complex query, storing a de-normalized form in a cache table would be a lighter load. (Provided that you aren’t limited by the network or number of concurrent connections) I think that whether or not this is a good idea depends highly upon what scale you’re operating at. For high traffic applications, it’s not a good plan, but if you already have a DB setup and you have a lighter load, I could think of worse solutions.
- lnxg33k1 3y agoI mean if you have a light application then maybe you dont even need the cache, at a certain threshold of small you can go ahead with sqlite or access, or excel, of course HN has an issue of scaling, because if we talk about caching then lets talk about situations where talking about caching makes sense,
- lnxg33k1 3y agoI was working at a company where we had stupid things from the tech world as loading message for slack, like “parsing html with regex”. I think “caching in postgres” might deserve a spot there too
- biorach 3y agoVery dramatic. No actual technical arguments. It's easy to envisage systems where this would have no negative impact whatsoever.
- John23832 3y agoOP here: I was looking around on the internet, found the article, thought it was interesting and posted it. I think that's being constructive. You on the other hand haven't added anything to the discussion (caching/postgres), but rather are yelling at the clouds. If you think the article is such a bad idea, provide some alternative links. If you're not in the mood to do that, just go to the next thing you might find interesting on the endless scroll that is HN. Being a curmudgeon is frankly worse than having sub optimal articles.
- voidfunc 3y agoThe problem is it's so hard to get on the HN Frontpage that stuff that does get there tends to be seen as having value but fools looking at at a foolish idea don't know any better. OPs post was constructive. It indicates there might be a need for more heavy handed moderation and technical vetting of content before it reaches frontpage.
- hadlock 3y agoThis was also the third time it has been posted in five months.
- drewda 3y agoMany of the technical blog posts that are most up-voted here on HN would be best described as content marketing. That the posts describe something technical is almost incidental to the point of making you aware that the company writing the post exists. HN eats up all sorts of these posts from companies selling backend-as-a-service, low-code-web-UI-as-a-service, unreliable-replacement-for-Heroku's-free-tier-as-a-service, and so on...
- gembeMx 3y agoIt’s most “articles” shared on here these days, low effort gunk