Live data from Hacker News

Write libraries instead of services, where possible

catern.com

181–190 of 328 posts

Re: Write libraries instead of services, where possible

#181
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.

How do you survive without any money?

Re: Write libraries instead of services, where possible

#183
This is a bad take and a false dichotomy. The reasons for choosing a library or a service are so myriad and context-dependent that any generalization about which is "better" is just silliness. It's like saying, "If you have to get somewhere, running is better than walking." Sure, in the case of a race or escaping a predator, running is probably the best option. But what if you want to take in the sights or you can't sweat in your clothes? Running would be a bad choice, even though it's faster. There are just too many variables in the real world to make any sort of blanket statement about which approach is "better."

Re: Write libraries instead of services, where possible

#184
post #93
post #54

I was agreeing until I got to this nonsense: An object in a type-safe language can contain capabilities for resources which it uses to implement its methods, without those capabilities being available to the code calling those methods. Java-style stack inspection can restrict user or library code to deny access at runtime to unauthorized methods. Capability-safe architectures such as CHERI prevent code from accessing…

>none of these actually work and none of the implementations you will find in the wild are anything but snakeoil This is wrong. The foundation of the modern web is safe Javascript implementations. BPF/eBPF is another widespread technology using isolation mechanisms like this. All of these techniques work. As I mentioned in the very next sentence, only the first in that list is common, but that doesn't mean the rest d…

Huh? NaCL is dead, and as far as I know nothing relies on the JVM sandbox for security anymore (and it was a disaster when they tried).

These also rely on wrapping the entire userspace into a sandbox, which is hardly relevant to the libraries vs. services thing. You can't inspect a stack from inside the attacker's process and expect that to do anything at all, let alone control access to a resource.

Re: Write libraries instead of services, where possible

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

> but how you monetize a library?

It's easier if other people can make money with it.

Re: Write libraries instead of services, where possible

#186

Earlier quoted context omitted.

I don't think either of those subscription services are unicorns or making billionaires. If anything I'm happy to see indie developers able to maintain a decent income making useful (but often niche) tools that other people can use. Of all the SaaS services I pay for, it's one like these that I'm the least apprehensive spending money on. Video codecs are hard. PDFs are a labyrinth of a file format with traps everywhe…

Video codecs are hard, but the reason video utils become services is because the best (by a mile) video codec libraries are (L)GPLed. I suspect the same is true for the best PDF libraries that would be integrated into desktop applications (meaning compiled like SumatraPDF's library, since there are plenty of JS/Python permissive licensed libraries). All the developers I know immediately jump down a level to ffmpeg co…

kdenlive - https://kdenlive.org

shotcut - http://www.shotcutapp.com

olive - https://github.com/olive-editor/olive

Re: Write libraries instead of services, where possible

#188

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

Don't worry. If the functionality is useful, then eventually there will be a free open source library that will prevent the original author from becoming a billionaire.

Re: Write libraries instead of services, where possible

#189

This is a bad take and a false dichotomy. The reasons for choosing a library or a service are so myriad and context-dependent that any generalization about which is "better" is just silliness. It's like saying, "If you have to get somewhere, running is better than walking." Sure, in the case of a race or escaping a predator, running is probably the best option. But what if you want to take in the sights or you can't…

I agree. But if we steel-man this,it could make sense for services that can be replaced by libraries. So simple services that could be replaced by a slim library on the user's machine.

Re: Write libraries instead of services, where possible

#190
Curious what people's experiences are wrt library development within an enterprise. I've been at organizations where basically everything was done via services and there was very little library usage, and I always thought that was suboptimal. Now I'm at a place where we utilize lots of libraries and they seem to pose pretty significant costs of their own.

A typical example is if we need to do something that the library doesn't support, we're faced with an unpleasant choice of updating the library itself or doing some sort of workaround/hack. The former shouldn't be that difficult, but in cases where a library was written by a different team, updating can be painful if you don't have someone with experience with the library/domain on your team, or if you have to jump through approval hoops.

I suppose this is more an ownership/organizational problem and applies to services as well, but somehow dealing with library dependencies feels more onerous.

Post reply on HN