Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

NodeBB

  1. Home
  2. General Discussion
  3. I've started my exploration of using @timbray's Quamina project for saving some compute time in the filters module of #GoActivityPub

I've started my exploration of using @timbray's Quamina project for saving some compute time in the filters module of #GoActivityPub

Scheduled Pinned Locked Moved General Discussion
activitypubgoactivitypub
1 Cross-posts 4 Posts 1 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • mariusor@metalhead.clubM This user is from outside of this forum
    mariusor@metalhead.clubM This user is from outside of this forum
    mariusor@metalhead.club
    wrote last edited by
    #1

    I've started my exploration of using @timbray's Quamina project for saving some compute time in the filters module of #GoActivityPub

    Currently the GoAP storage backends iterate over resources (usually stored as raw JSON bytes), unmarshal them into GoActivityPub object structs, and *only* then apply the custom filtering logic on those objects. Since the majority of the objects generally fail the filtering logic, all that JSON decoding is wasted compute time and makes things slower.

    Ideally quamina will allow me to check the raw JSON payloads directly against the filters, streamlining the execution and speeding things up.

    #ActivityPub

    mariusor@metalhead.clubM 1 Reply Last reply
    0
    • ? Guest crossposted this topic to General Discussion
    • mariusor@metalhead.clubM mariusor@metalhead.club

      I've started my exploration of using @timbray's Quamina project for saving some compute time in the filters module of #GoActivityPub

      Currently the GoAP storage backends iterate over resources (usually stored as raw JSON bytes), unmarshal them into GoActivityPub object structs, and *only* then apply the custom filtering logic on those objects. Since the majority of the objects generally fail the filtering logic, all that JSON decoding is wasted compute time and makes things slower.

      Ideally quamina will allow me to check the raw JSON payloads directly against the filters, streamlining the execution and speeding things up.

      #ActivityPub

      mariusor@metalhead.clubM This user is from outside of this forum
      mariusor@metalhead.clubM This user is from outside of this forum
      mariusor@metalhead.club
      wrote last edited by
      #2

      Sadly adding quamina didn't bring any meaningful changes to the integration test suite I'm using for my federated server, probably because the amount of data they handle is way too low and the overhead of running the application and testsuite is way too high.

      It looks like I need to build some artificial benchmarks handling strictly the storage fetches.

      #benchmarking

      mariusor@metalhead.clubM 1 Reply Last reply
      0
      • mariusor@metalhead.clubM mariusor@metalhead.club

        Sadly adding quamina didn't bring any meaningful changes to the integration test suite I'm using for my federated server, probably because the amount of data they handle is way too low and the overhead of running the application and testsuite is way too high.

        It looks like I need to build some artificial benchmarks handling strictly the storage fetches.

        #benchmarking

        mariusor@metalhead.clubM This user is from outside of this forum
        mariusor@metalhead.clubM This user is from outside of this forum
        mariusor@metalhead.club
        wrote last edited by
        #3

        Well, benchmarking doesn't help either, the measurements are so noisy that I can't even make any inferences from them.

        I'm not sure how I can isolate the tests even more.

        Perhaps the issue is that all the tests rely on the actual filesystem.

        Maybe I need to find a memory backed filesystem mock...

        mariusor@metalhead.clubM 1 Reply Last reply
        0
        • mariusor@metalhead.clubM mariusor@metalhead.club

          Well, benchmarking doesn't help either, the measurements are so noisy that I can't even make any inferences from them.

          I'm not sure how I can isolate the tests even more.

          Perhaps the issue is that all the tests rely on the actual filesystem.

          Maybe I need to find a memory backed filesystem mock...

          mariusor@metalhead.clubM This user is from outside of this forum
          mariusor@metalhead.clubM This user is from outside of this forum
          mariusor@metalhead.club
          wrote last edited by
          #4

          I realized I already run on a memory backed filesystem, as the default testing.T.TempDir() returns a path in /tmp which is tmpfs for the machine where I'm testing.

          Gaaah!!!

          1 Reply Last reply
          0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          Powered by NodeBB Contributors
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups