Live data from Hacker News

Write libraries instead of services, where possible

catern.com

11–20 of 181 posts

Re: Write libraries instead of services, where possible

#12
post #2

I think this sentiment is a partial cause of the trend towards self-hostable, downloadable software too. The customer has a cost when they operate a library instead of consume a service, no doubt. They also get more control (no surprise upgrades, availability is their responsibility) and assurances (no worries about the service suddenly being end of lifed).

When you use a library from an outside source, if you update that library, it might break your build.

When you use an outside service, they might break your system at a time of their choosing.

Re: Write libraries instead of services, where possible

#13

Related: Who Does That Server Really Serve? https://www.gnu.org/philosophy/who-does-that-server-really-s...

Stallman performs the vital function of pinning the Overton Window to the left, which benefits those of us with more nuanced views.

I'm not going to run my own mail server in 2023, etc.

Re: Write libraries instead of services, where possible

#14
post #7

Is this really a common scenario where there's a choice between these 2 options that isn't obvious? I've never considered libraries and services to be two equal options of distributing functionality, and you just pick one of them. It's usually a function of practicality and monetization.

> Is this really a common scenario where there's a choice between these 2 options that isn't obvious?

In my experience, no, it isn't any common. But it is somewhat common for people to ignore the obvious option and go for services anyway.

Re: Write libraries instead of services, where possible

#16
post #12
post #2

I think this sentiment is a partial cause of the trend towards self-hostable, downloadable software too. The customer has a cost when they operate a library instead of consume a service, no doubt. They also get more control (no surprise upgrades, availability is their responsibility) and assurances (no worries about the service suddenly being end of lifed).

When you use a library from an outside source, if you update that library, it might break your build. When you use an outside service, they might break your system at a time of their choosing.

Exactly. It'll break sometime (it's software). So when do you want it to break? And is the benefit of controlling/planning the timing of that breakage worth the cost of operating the software?

As always, it depends. Questions I'd ask:

* How critical is the software to your application's proper functioning?

* How big is the team?

* Who are your customers and what are customer expectations around your application's proper functioning?

* How often does the library change?

* What expectations does a service set around backwards compatibility? What commitments are made?

Re: Write libraries instead of services, where possible

#18
post #8

Yeah but then who is responsible for maintaining the library? If you have a bunch of internal teams that depend on your library and there is an issue or a feature request, you're back to the same position of being the one that does the work to implement. Better to have a service IMO, you can get telemetry out of it and scale it out or replace internals without having to worry about who will get affected.

Many engineering organizations have "platform teams"--teams that have as their sole responsibility maintaining shared libraries and "core" services for the entire platform.
Post reply on HN