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.
Write libraries instead of services, where possible
61–70 of 181 posts
Re: Write libraries instead of services, where possible
#62Services usually depend on databases. Libraries usually don’t. Either you need to support every storage backend your users might have, require them to write an integration layer from your generic hooks, or expect them to provision and manage new storage when using your library. In any case you are asking them to do a lot more work (manage the data) and in some sense breaking encapsulation by making them responsible f…
zeromq is a library
That’s all the storage you need
Re: Write libraries instead of services, where possible
#63Services usually depend on databases. Libraries usually don’t. Either you need to support every storage backend your users might have, require them to write an integration layer from your generic hooks, or expect them to provision and manage new storage when using your library. In any case you are asking them to do a lot more work (manage the data) and in some sense breaking encapsulation by making them responsible f…
This shows that we lack good abstractions over storage.
Re: Write libraries instead of services, where possible
#64Re: Write libraries instead of services, where possible
#65Services usually depend on databases. Libraries usually don’t. Either you need to support every storage backend your users might have, require them to write an integration layer from your generic hooks, or expect them to provision and manage new storage when using your library. In any case you are asking them to do a lot more work (manage the data) and in some sense breaking encapsulation by making them responsible f…
The library uses only the interface to work with whatever orm/db connector exists in the client project.
If services at any given company all use a standard db library, it could even directly interface assuming your using that. I don't think we're talking about public apis and packages here.
Re: Write libraries instead of services, where possible
#66Earlier quoted context omitted.
This shows that we lack good abstractions over storage.
It’s more like data storage needs are not one size fits all so it’s better left to the user who best knows their storage needs.
Re: Write libraries instead of services, where possible
#67Earlier quoted context omitted.
> It's all fun and games until you hit version n+1 or n+2, and often realize how slow many customers are to upgrade the library. How is that different with services? I don't develop services, but I can imagine that before breaking the services, you have to poll with your biggest customers and you don't break until they are ready to move to the new version. The alternative I can imagine is to keep providing the old se…
Many changes are believed to be non-breaking and so you can be running only one version in prod. (Most of the changes believed to be non-breaking are non-breaking.) With a library, you end up with many different minor or point versions running without control over it.
Re: Write libraries instead of services, where possible
#68Services usually depend on databases. Libraries usually don’t. Either you need to support every storage backend your users might have, require them to write an integration layer from your generic hooks, or expect them to provision and manage new storage when using your library. In any case you are asking them to do a lot more work (manage the data) and in some sense breaking encapsulation by making them responsible f…
We just have to get a little more fed up with all of these services and then the initial cost of setting it up in the first place will be worth it. Any day now...
Re: Write libraries instead of services, where possible
#69Re: Write libraries instead of services, where possible
#70Services usually depend on databases. Libraries usually don’t. Either you need to support every storage backend your users might have, require them to write an integration layer from your generic hooks, or expect them to provision and manage new storage when using your library. In any case you are asking them to do a lot more work (manage the data) and in some sense breaking encapsulation by making them responsible f…
sqlite is a library zeromq is a library That’s all the storage you need