Hacker News new | ask | show | jobs
by abracadabra_ 1345 days ago
Write small, well tested services in the easiest to use framework you can find. If the service becomes hard to maintain then replace it. This should be a simple job guided by the tests.
2 comments

People talk about services like libraries aren't a thing. That exact same statement with `s/services/libraries/`.

"Write small, well tested libraries..."

If you have a library with a solid, small public interface and you carefully maintain compatibility on that interface with great testing, you can be decoupled. Plus you don't have 2 network interfaces and the internet injected into a call to the interface.

Yes, this applies almost equally well to libraries as well. With the slight exception that you are not just bringing the library into your code but all of its dependencies as well. This makes it _slightly_ harder to wholesale change a library compared to a service.
Not everything should be a small service
Maybe not, but the larger it is the harder it is to change.

There are pros/cons to both sides.