Live data from Hacker News

Write libraries instead of services, where possible

catern.com

101–110 of 328 posts

Re: Write libraries instead of services, where possible

#101
post #75
post #60

I don't hear people talk about the design side of services vs libraries enough, but I think it's a huge part of the picture. Many people reach for services too fast because they feel more comfortable thinking about APIs through the lens of HTTP verbs and resource URLs than they do in the comparatively infinite garden of options inside a program. The REST paradigm, despite most people not understanding, needing, or ut…

SOAP doesn't have anything like the restrictions rest has, does it?

It doesn't, but also, services were far less common compared with libraries when it was popular.

Re: Write libraries instead of services, where possible

#102
post #92

Earlier quoted context omitted.

You're right. The fact that people can make outsize rewards from subscription services are the reason that even small single use tools are now 'services'. I have a piece of software that removes the background from my video feed. It's a subscription, and it regularly phones home. I have a piece of software that lets me visually combine, rotate and reorder pdfs. It's a subscription. Even the simplest things, like a 't…

Pretty sure there is normal software for those uses, and you can get free/open source apps with no ads from F-Droid for all basic needs (such as a "torch").

Unfortunately, normal software cannot afford the marketing budget a service can (particularly a VC-backed service).

Re: Write libraries instead of services, where possible

#103
post #2

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

  but how you monetize a library?
Oh that's a burning question for me. I'm finishing a C lib that - if all goes well - will be very useful.

I worked hard on it and now I don't know how to license it.

I'm okay with non-profit OSS projects to use it freely, but I need others to pay for it. How ? How do you express such a dual license ? And how do you ensure for-profit users reward you ?

That's not the part I prefer in this project...

Re: Write libraries instead of services, where possible

#104

> 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…

You're right. The fact that people can make outsize rewards from subscription services are the reason that even small single use tools are now 'services'. I have a piece of software that removes the background from my video feed. It's a subscription, and it regularly phones home. I have a piece of software that lets me visually combine, rotate and reorder pdfs. It's a subscription. Even the simplest things, like a 't…

> Even the simplest things, like a 'torch' are ad-supported on android these days.

This has a built-in feature on every smartphone for years now. These apps are a scam.

Re: Write libraries instead of services, where possible

#105
post #65

I have a hard disagree here. Though, I suspect it is a matter of what your code is doing. First, my objection, though. Pushing this "to the users" is in no way easier to support. It is easier to abandon, but support is a different thing. You will have support contacts. And, due to the distributed nature of the deployment, you will have a much harder time isolating your code from the environment it is in. With a servi…

You have a disagreement. You don't have a disagree.

Re: Write libraries instead of services, where possible

#106

> 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)

Been a while since I saw a license without recurring payment, particularly for code components. B2B, all libraries I've dealt with were paid per-developer-seat-year.

Re: Write libraries instead of services, where possible

#108
post #2

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

but how you monetize a library? Oh that's a burning question for me. I'm finishing a C lib that - if all goes well - will be very useful. I worked hard on it and now I don't know how to license it. I'm okay with non-profit OSS projects to use it freely, but I need others to pay for it. How ? How do you express such a dual license ? And how do you ensure for-profit users reward you ? That's not the part I prefer in th…

GPLv3 with a commercial exception. Corporate suits don't like the GPL, so if they buy a commercial licence they support the project without having to redistribute (You can also offer support)

Re: Write libraries instead of services, where possible

#109

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…

> 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

Of course it is possible. You can set up your own PEP 503 [0] compliant repository, even unreachable outside your VPC, and use pip to install from it. One caveat: on GCF you can -- if I'm not mistaken -- only install Python-only libraries; but if you use Cloud Run you can install anything inside your container.

There are servers for hosting your own PEP503 repo, such as devpi [1] -- but ultimately you only need a Web server to serve the file index.

[0] https://www.python.org/dev/peps/pep-0503/

[1] https://www.devpi.net/

Re: Write libraries instead of services, where possible

#110
post #105
post #65

I have a hard disagree here. Though, I suspect it is a matter of what your code is doing. First, my objection, though. Pushing this "to the users" is in no way easier to support. It is easier to abandon, but support is a different thing. You will have support contacts. And, due to the distributed nature of the deployment, you will have a much harder time isolating your code from the environment it is in. With a servi…

You have a disagreement. You don't have a disagree.

Hard disagree. Language is fluid, get used to it.
Post reply on HN