GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Conversation

Notices

  1. Embed this notice
    Lennart Poettering (pid_eins@mastodon.social)'s status on Tuesday, 12-Nov-2024 05:29:11 JST Lennart Poettering Lennart Poettering

    we just let systemd's socket activation logic listen on an AF_UNIX/SOCK_STREAM socket, and then let it fork off a new bootctl instance for each connection. That instance then just processes that connection and is done. And it's easy: it just does what it usually does, but instead of reading the commands to execute from the command line it just reads them from a small JSON object it gets from STDIN. And it just writes its output as JSON to STDOUT, done.

    In fact, because bootctl already…

    In conversation Tuesday, 12-Nov-2024 05:29:11 JST from mastodon.social permalink

    Attachments

    1. No result found on File_thumbnail lookup.
      done.in
      This domain may be for sale!
    • Embed this notice
      Lennart Poettering (pid_eins@mastodon.social)'s status on Tuesday, 12-Nov-2024 05:29:09 JST Lennart Poettering Lennart Poettering
      in reply to

      i.e. for example handles base64 encoding/decoding for handling binary blobs within JSON automatically, or it helps you with dealing with JSON's >53bit integer problem, and various other things.

      Right now, documentation for sd-varlink and sd-json is scarce (one could even say "barely existing"), but there are plenty of real-life examples in the systemd source tree, of course.

      In conversation Tuesday, 12-Nov-2024 05:29:09 JST permalink
      James Morris repeated this.
    • Embed this notice
      Lennart Poettering (pid_eins@mastodon.social)'s status on Tuesday, 12-Nov-2024 05:29:09 JST Lennart Poettering Lennart Poettering
      in reply to

      At Linux' best conference, All Systems Go! 2024 in Berlin this year I gave a (brief) talk about Varlink, and why you should consider it. If you want to know more about the concept, this might be a good starting point:

      https://media.ccc.de/v/all-systems-go-2024-276-varlink-now-

      And that's all for now, enjoy!

      In conversation Tuesday, 12-Nov-2024 05:29:09 JST permalink
      James Morris likes this.
    • Embed this notice
      Lennart Poettering (pid_eins@mastodon.social)'s status on Tuesday, 12-Nov-2024 05:29:10 JST Lennart Poettering Lennart Poettering
      in reply to

      …supported JSON output anyway, the output side was done pretty much anyway.

      Anyway, there are many other stories like that.

      Suffice to say, in v257 there are now 19 Varlink interfaces/services, which we added in a short time, for various things that never had them before when D-Bus was our sole focus, because it was so nasty to add that.

      (For comparison: we provide only 11 D-Bus API services at this time).

      In conversation Tuesday, 12-Nov-2024 05:29:10 JST permalink
    • Embed this notice
      Lennart Poettering (pid_eins@mastodon.social)'s status on Tuesday, 12-Nov-2024 05:29:10 JST Lennart Poettering Lennart Poettering
      in reply to

      There are various bindings for Varlink available from the Varlink project, but with systemd v257 we now make systemd's own C implementation available publically too: sd-varlink.

      sd-varlink has been around for quite a while, and is quite well tested (including fuzzed) by now hence. It's already driving your systemd installations, except mostly internally so far.

      Since Varlink uses JSON for marshalling its messages, sd-varlink comes with a companion API: sd-json. It's another C library for JSON.

      In conversation Tuesday, 12-Nov-2024 05:29:10 JST permalink
    • Embed this notice
      Lennart Poettering (pid_eins@mastodon.social)'s status on Tuesday, 12-Nov-2024 05:29:10 JST Lennart Poettering Lennart Poettering
      in reply to

      You are of course right if you say that there are already so many of those, why another? And you'd be right. My answer to that is that sd-json is much nicer to use than most, since it doesn't just allow you deal with JSON objects, it also helps you with building them from C data structures, and to map JSON objects back to C data structures. It also helps you with higher level operations that the low-level JSON datatypes leave you in the cold with:

      In conversation Tuesday, 12-Nov-2024 05:29:10 JST permalink

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.