Write libraries instead of services, where possible

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • jOOQ

    jOOQ is the best way to write SQL in Java

  • A few libraries in the Java world have this model. They haven't produced unicorns but seem to be pretty stable businesses - jOOQ(1), hibernate(2) etc. I'm researching DB libraries for work and so those are the ones I recalled immediately, but I think there are some commercial UI ones too.

    [1] https://www.jooq.org/

  • core

    MetaCall: The ultimate polyglot programming experience. (by metacall)

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • LibreSignal

    LibreSignal • The truly private and Google-Free messenger for Android.

  • >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 you a billionaire.

    The article's author seems to be making indirect reference to Moxie Marlinspike (Signal) "ecosystem is moving" essay.

    If so, Moxie Marlinspike's method for becoming a billionaire by creating non-profit 501(c)(3) organization and providing Signal's source code is a very strange way to cash out of a unicorn.

    And btw... even though users/developers have the Signal source[1] which enables them to create an alternate chat universe that's not dependent on Signal's official service/servers, that isn't good enough. They still want to federate[2] with Moxie's servers. This aspect isn't addressed by op's (catern) article.

    In other words, having a library (or even the full client+server source code) doesn't really solve the users end needs. It turns out that many place more importance on the service than the library.

    [1] https://github.com/signalapp

    [2] https://github.com/LibreSignal/LibreSignal/issues/37#issueco...

    [3] my comments about it: https://news.ycombinator.com/item?id=20232499

  • pygooglenews

    If Google News had a Python library

  • Write libraries AND services, where it makes sense.

    I wrote a Python library to scrape google news [0]

    We also have it as a service [1]

    Want to know why? Because devs who can't pay won't pay. Businesses who can pay will rather pay for a service (API in our case), and not care about maintaining it.

    [0] https://github.com/kotartemiy/pygooglenews

    [1] https://newscatcherapi.com/google-news-api

  • ASP.NET Core

    ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.

  • It's easy, you release it open source... Then make sure you have languages "officially" promote it in their documentation and have people adopt it thinking it's great and an actively developed project that's going to be around forever, etc... And then fork it, stop releasing security updates for the older (open-source) versions, and turn it into a product that you charge people for because corporates are now dependent on it.

    For a real-life example of it, see this blatant bait and switch fuckery: https://github.com/dotnet/aspnetcore/issues/26489

  • horde

    Horde is a distributed Supervisor and Registry backed by DeltaCrdt

  • No, typically you register a node and instruct it on what processes to run. But there are libraries to help instrument this kind of behavior.

    For elixir:

    - https://github.com/derekkraan/horde

    - https://github.com/bitwalker/swarm

  • Phoenix

    Peace of mind from prototype to production

  • Anyone like me first hearing about Phoenix and had trouble finding it, it's an Elixir framework: https://www.phoenixframework.org/

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • citus

    Distributed PostgreSQL as an extension

  • > Leaves me more time to work on tuning out database to keep up!

    As your using postgres have you looked at citus[0] at all?

    [0] https://github.com/citusdata/citus

  • libgit2

    A cross-platform, linkable library implementation of Git that you can use in your application.

  • > So why can't you just write your language support library in whatever language you like, wrap that in something that supports the C ABI if it doesn't already, then call that from your editor?

    You can! This is called "defining an API" and this is basically what an LSP is. The downsides of using the C ABI like I said is not all programming languages use the C ABI. To work around this you have suggested writing a wrapper transforms to/from this API that follows the C ABI calling conventions in each language you want to support. To see how fun of an endeavor this is you can look at things like libgit2 [0] which spend a lot of time maintaining bindings for each language. While these bindings do absolutely work they are:

    1. Difficult to maintain (look at some issues [1, 2, 3])

    2. Completely duplicates effort (test frameworks, integration testing, etc cannot be automated).

    If you instead separate into services the lsp team could maintain a whole test suite that your service could be run against. You would provide an LSP + a corpus that has certain features and the test framework could do a set of operations to talk to this system.

    If you use a dsl to describe the protocol you can automatically generate server/client libraries to use to talk to/implement an lsp (and other services!) I'm a huge fan of gRPC for this reason: write a single dsl and now everyone can talk to/implement your service.

    You can define shared debugging tools. For example ebpf can be used to debug any networked application in linux regardless of what it's implemented in. Similar tools can now be developed at an application protocol level for all LSPs to make development easier without tying the infrastructure to a single language or ABI.

    The crux of the issue is: service boundaries solve the exact same thing that C ABI/ffi solve with the following benefit:

    1. No dependency on any language-specific implementation of a protocol or API.

    2. TCP is supported everywhere and you can get a bunch of free monitoring features from using it. It's also pretty darn fast now especially to localhost.

    3. Easy to plug into an TCP server regardless of your runtime environment. Do you need to host your source code on a linus system when your dev environment is running in windows in Visual Studios? No problem!

    > Language support people still have to write language support code. Editor people still have to write editor support code.

    Correct! Except it's which code gets duplicated. Could LSPs been implemented as .so & dlls that followed the C ABI calling conventions passing HSOURCE_FILE* back and forth in process? Yes! Would it have been easy to implement that for all languages in a safe and secure way that can run in an adversarial environment and allow different people to manage and debug different implementations while sharing standardized tooling? No, not easily.

    [0] - https://github.com/libgit2/libgit2#language-bindings

    [1] - https://github.com/nodegit/nodegit/issues

    [2] - https://github.com/libgit2/git2go/issues

    [3] - https://github.com/libgit2/pygit2/issues

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts