Live data from Hacker News

Write libraries instead of services, where possible

catern.com

41–50 of 328 posts

Re: Write libraries instead of services, where possible

#41
post #23

This is very sound advice. That being said it's incredibly hard to follow this advice in environments which encourage a polyglot stack and 'the best tool for the job' mindset. The moment you have more than one language in your stack it becomes easier to build services than to maintain libraries in each language. You can of course write native C libraries with bindings to different languages but that's a bit weird. It…

Not everyone's cup of tea, but on Linux gobject-introspection allows for automatic or semi-automatic generation of bindings for X languages.

.NET also -- and this is only my interpretation -- is following that path.

Re: Write libraries instead of services, where possible

#42
post #2

I like the approach and it seems to be definitely better for everyone, but how you monetize a library?

Does everything have to be about money? This is "Hacker" News, not "Monetize Everything" News.

It most certainly is both.

Re: Write libraries instead of services, where possible

#43

This makes no sense. In order to build a service, you need a library (or something very much like it) supporting it. If you need a library, and can use a library, yay, you're done, it's the simplest and fastest thing possible. If, for some reason, the logic you need can't be run locally, then you need a service. Find or build one and use it. You will pay in application complexity, dealing with the possibility that th…

Looking over the rest of the conversation here, there's a clear bias in a lot of areas to build services when a library would suffice. You're agreeing with the article, and seem to be suggesting that your agreement represents a universal viewpoint, but it does not seem to.

Yes, we are both saying "use a library when possible". I am mystified by the need to write or read such an article. It seems akin to "don't use an airplane to go to the corner store for a dozen eggs".

Re: Write libraries instead of services, where possible

#44

> A service has constant administration costs which are paid by the service provider. A properly designed library instead moves these costs to the users of the library. I agree with the articles point, but this introduction, right there, is why it's not happening. SaaS turns your startup into a unicorn and yourself into a rich person. Or at least that's what you are hoping/aiming for. A library is not going to make y…

Only on the FOSS world, because it is the only way to force devs to pay.

There is another alternative universe where commercial software, including libraries, gets sold.

Re: Write libraries instead of services, where possible

#46
post #3

Earlier quoted context omitted.

You can sell a library just as well as any other piece of software I think.

Not really. Your market is different. Instead of selling to business managers seeking to solve a problem, you're selling to developers. Developers tend to like solving problems themselves, and you're competing versus free.

On the Sony, Nintendo, Microsoft, Apple and Google developer ecosystems there are plenty of shops selling libraries.

Basically where most devs selling commercial software live on.

Re: Write libraries instead of services, where possible

#47
I’m working on GCP mostly using Python and I agree that it would be nice to share a library across services instead of having yet another service.

However, practically speaking:

- I don’t think it is possible to create a Python library that is not publicly available through pypi/pip, but can be installed in cloud functions

- if the library is a service, I only need to update one service to add a new function or fix a bug

- a service can be called by other non Python services.

With that being said it is much, much easier writing code that import a library than call out to a service. And it is also much, much easier to test.

Re: Write libraries instead of services, where possible

#48
post #3
post #2

I like the approach and it seems to be definitely better for everyone, but how you monetize a library?

You can sell a library just as well as any other piece of software I think.

For example gamedev middleware is an example of that - be it individual library, for example audio: fmod, criware, wwise, miles, etc., or full blown game enines (unity, unreal, etc.). Just few examples.

Re: Write libraries instead of services, where possible

#49

> A service has constant administration costs which are paid by the service provider. A properly designed library instead moves these costs to the users of the library. I agree with the articles point, but this introduction, right there, is why it's not happening. SaaS turns your startup into a unicorn and yourself into a rich person. Or at least that's what you are hoping/aiming for. A library is not going to make y…

Is SaaS really the only viable (or "unicorn") business model? Do people not sell software licenses anymore? (In theory nothing prevents you from making your license require recurring payment as well)

*Most who sell licenses seem to be moving their old stuff/cash-cow-behemoths/etc to saas as quickly (slowly) as possible.

-certainly there are exceptions. Exceptions seem more likely with smaller older companies with different priorities.

Re: Write libraries instead of services, where possible

#50
post #17
post #2

I like the approach and it seems to be definitely better for everyone, but how you monetize a library?

You may take a look at Fluence's ideas on that https://fluence.network It basically allows you to share your code to others in exchange for a fee. If someone builds an app or service that uses your library, and it is paid within Fluence, you will receive a fee. This works transitively.

There's also https://iex.ec/ - marketplace for applications, TEE-protected (yeah, yeah I know) compute to execute them, and data sources.
Post reply on HN