News for hackers. Stuff that matters.
Re:We saved $50k/year with a Go microservice coded in a hack... by thorin on Wednesday April 11, 2018 @04:38AM (#16809156)
Entity attribute value anti pattern - this has been well known for at least 20 years. It can be tempting when you want to design a "flexible" system but really needs to be used sparingly. I was BI team lead on a product where the architect insisted that it be used on every entity (>300) as you never knew when you might want to add some bit of data. It led to some interesting (multi-page) sqls and the project ultimately failed. This was one of the reasons. Slow performance and often runtime errors when expected data wasn't present and the application layer couldn't cope. It was a good learning experience. https://mikesmithers.wordpress.com/2013/12/22/the-anti-patte...
Re:We saved $50k/year with a Go microservice coded in a hack... by zimpenfish on Wednesday April 11, 2018 @06:43AM (#16809726)
We have this as a "meta" field (because MySQL is balls at adding new columns to big tables without multi-hour downtime) with some arcane nonsense format. Totally unqueryable with any efficiency.
Re:We saved $50k/year with a Go microservice coded in a hack... by cleong on Wednesday April 11, 2018 @10:40AM (#16811506)
EAV pattern has trade-offs you need to compensate for (performance). Production systems that use EAV have flat tables, and heavy caching to have be flexible with acceptable performance.
Re:We saved $50k/year with a Go microservice coded in a hack... by bpicolo on Wednesday April 11, 2018 @08:51AM (#16810564)
You could argue that there are cases for it. Datomic[0] is basically EAV on steroids.

https://www.datomic.com/