Hacker News new | past | comments | ask | show | jobs | submit login

I think the recommendation is Monolith First

https://martinfowler.com/bliki/MonolithFirst.html

You start with a Monolith and break it out as needed. (i.e. When you find out that is not a good idea to embed Elasticsearch )

You avoid premature boundaries that can become a significant constraint.




My experience in attempting to build a monolith—and, oh I tried—was that it's basically impossible.

Forget embedding Elasticsearch for the purpose of running it inside your monlith; just the transport layer drivers (supposing you're not using drivers that work over HTTP) basically add all of Elasticsearch onto your classpath. Good luck building your monolith after that. And that's true for so many things you'd want to use. If you want to build a monolith you basically can't have any dependencies. Or be very experienced in dependency management.

This is why I have a microservice that fronts all my Elasticsearch queries. Its artifact has the Elasticsearch drivers, all other microservices that need access data from Elasticsearch talk to this service over gRPC. Any time I want to upgrade Elasticsearch or change something about a query, I only need to do it in one spot. It's great.




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

Search: