A small tool to view real-world ActivityPub objects as JSON! Enter a URL
or username from Mastodon or a similar service below, and we'll send a
request with
the right
Accept
header
to the server to view the underlying object.
{
"@context": [
"https://www.w3.org/ns/activitystreams",
{
"ostatus": "http://ostatus.org#",
"atomUri": "ostatus:atomUri",
"inReplyToAtomUri": "ostatus:inReplyToAtomUri",
"conversation": "ostatus:conversation",
"sensitive": "as:sensitive",
"toot": "http://joinmastodon.org/ns#",
"votersCount": "toot:votersCount",
"Hashtag": "as:Hashtag"
}
],
"id": "https://mastodon.bsd.cafe/users/zirias/statuses/114353799000407675",
"type": "Note",
"summary": null,
"inReplyTo": null,
"published": "2025-04-17T14:34:57Z",
"url": "https://mastodon.bsd.cafe/@zirias/114353799000407675",
"attributedTo": "https://mastodon.bsd.cafe/users/zirias",
"to": [
"https://www.w3.org/ns/activitystreams#Public"
],
"cc": [
"https://mastodon.bsd.cafe/users/zirias/followers"
],
"sensitive": false,
"atomUri": "https://mastodon.bsd.cafe/users/zirias/statuses/114353799000407675",
"inReplyToAtomUri": null,
"conversation": "tag:bsd.cafe,2025-04-17:objectId=15862338:objectType=Conversation",
"content": "<p>I finally eliminated the need for a dedicated <a href=\"https://mastodon.bsd.cafe/tags/thread\" class=\"mention hashtag\" rel=\"tag\">#<span>thread</span></a> controlling the pam helper <a href=\"https://mastodon.bsd.cafe/tags/process\" class=\"mention hashtag\" rel=\"tag\">#<span>process</span></a> in <a href=\"https://mastodon.bsd.cafe/tags/swad\" class=\"mention hashtag\" rel=\"tag\">#<span>swad</span></a>. 🥳 </p><p>The building block that was still missing from <a href=\"https://mastodon.bsd.cafe/tags/poser\" class=\"mention hashtag\" rel=\"tag\">#<span>poser</span></a> was a way to await some async I/O task performed on the main thread from a worker thread. So I added a class to allow exactly that. The naive implementation just signals the main thread to carry out the requested task and then waits on a <a href=\"https://mastodon.bsd.cafe/tags/semaphore\" class=\"mention hashtag\" rel=\"tag\">#<span>semaphore</span></a> for completion, which of course blocks the worker thread.</p><p>Turns out we can actually do better, reaching similar functionality like e.g. <a href=\"https://mastodon.bsd.cafe/tags/async\" class=\"mention hashtag\" rel=\"tag\">#<span>async</span></a> / <a href=\"https://mastodon.bsd.cafe/tags/await\" class=\"mention hashtag\" rel=\"tag\">#<span>await</span></a> in C#: Release the worker thread to do other jobs while waiting. The key to this is user context switching support like offered by <a href=\"https://mastodon.bsd.cafe/tags/POSIX\" class=\"mention hashtag\" rel=\"tag\">#<span>POSIX</span></a>-1.2001 <a href=\"https://mastodon.bsd.cafe/tags/getcontext\" class=\"mention hashtag\" rel=\"tag\">#<span>getcontext</span></a> and friends. Unfortunately it was deprecated in POSIX-1.2008 without an obvious replacement (the docs basically say "use threads", which doesn't work for my scenario), but still lots of systems provide it, e.g. <a href=\"https://mastodon.bsd.cafe/tags/FreeBSD\" class=\"mention hashtag\" rel=\"tag\">#<span>FreeBSD</span></a>, <a href=\"https://mastodon.bsd.cafe/tags/NetBSD\" class=\"mention hashtag\" rel=\"tag\">#<span>NetBSD</span></a>, <a href=\"https://mastodon.bsd.cafe/tags/Linux\" class=\"mention hashtag\" rel=\"tag\">#<span>Linux</span></a> (with <a href=\"https://mastodon.bsd.cafe/tags/glibc\" class=\"mention hashtag\" rel=\"tag\">#<span>glibc</span></a>) ...</p><p>The posercore lib now offers both implementations, prefering to use user context switching if available. It comes at a price: Every thread job now needs its private stack space (I allocated 64kiB there for now), and of course the switching takes some time as well, but that's very likely better than leaving a task idle waiting. And there's a restriction, resuming must still happen on the same thread that called the "await", so if this thread is currently busy, we have to wait a little bit longer. I still think it's a very nice solution. 😎 </p><p>In any case, the code for the PAM credential checker module looks much cleaner now (the await "magic" happens on line 174):<br /><a href=\"https://github.com/Zirias/swad/blob/57eefe93cdad0df55ebede4bd877d22e7be1a7f8/src/bin/swad/cred/pamchecker.c\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" translate=\"no\"><span class=\"invisible\">https://</span><span class=\"ellipsis\">github.com/Zirias/swad/blob/57</span><span class=\"invisible\">eefe93cdad0df55ebede4bd877d22e7be1a7f8/src/bin/swad/cred/pamchecker.c</span></a></p><p><a href=\"https://mastodon.bsd.cafe/tags/C\" class=\"mention hashtag\" rel=\"tag\">#<span>C</span></a> <a href=\"https://mastodon.bsd.cafe/tags/coding\" class=\"mention hashtag\" rel=\"tag\">#<span>coding</span></a></p>",
"contentMap": {
"en": "<p>I finally eliminated the need for a dedicated <a href=\"https://mastodon.bsd.cafe/tags/thread\" class=\"mention hashtag\" rel=\"tag\">#<span>thread</span></a> controlling the pam helper <a href=\"https://mastodon.bsd.cafe/tags/process\" class=\"mention hashtag\" rel=\"tag\">#<span>process</span></a> in <a href=\"https://mastodon.bsd.cafe/tags/swad\" class=\"mention hashtag\" rel=\"tag\">#<span>swad</span></a>. 🥳 </p><p>The building block that was still missing from <a href=\"https://mastodon.bsd.cafe/tags/poser\" class=\"mention hashtag\" rel=\"tag\">#<span>poser</span></a> was a way to await some async I/O task performed on the main thread from a worker thread. So I added a class to allow exactly that. The naive implementation just signals the main thread to carry out the requested task and then waits on a <a href=\"https://mastodon.bsd.cafe/tags/semaphore\" class=\"mention hashtag\" rel=\"tag\">#<span>semaphore</span></a> for completion, which of course blocks the worker thread.</p><p>Turns out we can actually do better, reaching similar functionality like e.g. <a href=\"https://mastodon.bsd.cafe/tags/async\" class=\"mention hashtag\" rel=\"tag\">#<span>async</span></a> / <a href=\"https://mastodon.bsd.cafe/tags/await\" class=\"mention hashtag\" rel=\"tag\">#<span>await</span></a> in C#: Release the worker thread to do other jobs while waiting. The key to this is user context switching support like offered by <a href=\"https://mastodon.bsd.cafe/tags/POSIX\" class=\"mention hashtag\" rel=\"tag\">#<span>POSIX</span></a>-1.2001 <a href=\"https://mastodon.bsd.cafe/tags/getcontext\" class=\"mention hashtag\" rel=\"tag\">#<span>getcontext</span></a> and friends. Unfortunately it was deprecated in POSIX-1.2008 without an obvious replacement (the docs basically say "use threads", which doesn't work for my scenario), but still lots of systems provide it, e.g. <a href=\"https://mastodon.bsd.cafe/tags/FreeBSD\" class=\"mention hashtag\" rel=\"tag\">#<span>FreeBSD</span></a>, <a href=\"https://mastodon.bsd.cafe/tags/NetBSD\" class=\"mention hashtag\" rel=\"tag\">#<span>NetBSD</span></a>, <a href=\"https://mastodon.bsd.cafe/tags/Linux\" class=\"mention hashtag\" rel=\"tag\">#<span>Linux</span></a> (with <a href=\"https://mastodon.bsd.cafe/tags/glibc\" class=\"mention hashtag\" rel=\"tag\">#<span>glibc</span></a>) ...</p><p>The posercore lib now offers both implementations, prefering to use user context switching if available. It comes at a price: Every thread job now needs its private stack space (I allocated 64kiB there for now), and of course the switching takes some time as well, but that's very likely better than leaving a task idle waiting. And there's a restriction, resuming must still happen on the same thread that called the "await", so if this thread is currently busy, we have to wait a little bit longer. I still think it's a very nice solution. 😎 </p><p>In any case, the code for the PAM credential checker module looks much cleaner now (the await "magic" happens on line 174):<br /><a href=\"https://github.com/Zirias/swad/blob/57eefe93cdad0df55ebede4bd877d22e7be1a7f8/src/bin/swad/cred/pamchecker.c\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" translate=\"no\"><span class=\"invisible\">https://</span><span class=\"ellipsis\">github.com/Zirias/swad/blob/57</span><span class=\"invisible\">eefe93cdad0df55ebede4bd877d22e7be1a7f8/src/bin/swad/cred/pamchecker.c</span></a></p><p><a href=\"https://mastodon.bsd.cafe/tags/C\" class=\"mention hashtag\" rel=\"tag\">#<span>C</span></a> <a href=\"https://mastodon.bsd.cafe/tags/coding\" class=\"mention hashtag\" rel=\"tag\">#<span>coding</span></a></p>"
},
"updated": "2025-04-17T15:05:49Z",
"attachment": [],
"tag": [
{
"type": "Hashtag",
"href": "https://mastodon.bsd.cafe/tags/thread",
"name": "#thread"
},
{
"type": "Hashtag",
"href": "https://mastodon.bsd.cafe/tags/process",
"name": "#process"
},
{
"type": "Hashtag",
"href": "https://mastodon.bsd.cafe/tags/swad",
"name": "#swad"
},
{
"type": "Hashtag",
"href": "https://mastodon.bsd.cafe/tags/poser",
"name": "#poser"
},
{
"type": "Hashtag",
"href": "https://mastodon.bsd.cafe/tags/semaphore",
"name": "#semaphore"
},
{
"type": "Hashtag",
"href": "https://mastodon.bsd.cafe/tags/async",
"name": "#async"
},
{
"type": "Hashtag",
"href": "https://mastodon.bsd.cafe/tags/await",
"name": "#await"
},
{
"type": "Hashtag",
"href": "https://mastodon.bsd.cafe/tags/posix",
"name": "#posix"
},
{
"type": "Hashtag",
"href": "https://mastodon.bsd.cafe/tags/getcontext",
"name": "#getcontext"
},
{
"type": "Hashtag",
"href": "https://mastodon.bsd.cafe/tags/freebsd",
"name": "#freebsd"
},
{
"type": "Hashtag",
"href": "https://mastodon.bsd.cafe/tags/netbsd",
"name": "#netbsd"
},
{
"type": "Hashtag",
"href": "https://mastodon.bsd.cafe/tags/linux",
"name": "#linux"
},
{
"type": "Hashtag",
"href": "https://mastodon.bsd.cafe/tags/glibc",
"name": "#glibc"
},
{
"type": "Hashtag",
"href": "https://mastodon.bsd.cafe/tags/c",
"name": "#c"
},
{
"type": "Hashtag",
"href": "https://mastodon.bsd.cafe/tags/coding",
"name": "#coding"
}
],
"replies": {
"id": "https://mastodon.bsd.cafe/users/zirias/statuses/114353799000407675/replies",
"type": "Collection",
"first": {
"type": "CollectionPage",
"next": "https://mastodon.bsd.cafe/users/zirias/statuses/114353799000407675/replies?only_other_accounts=true&page=true",
"partOf": "https://mastodon.bsd.cafe/users/zirias/statuses/114353799000407675/replies",
"items": []
}
},
"likes": {
"id": "https://mastodon.bsd.cafe/users/zirias/statuses/114353799000407675/likes",
"type": "Collection",
"totalItems": 4
},
"shares": {
"id": "https://mastodon.bsd.cafe/users/zirias/statuses/114353799000407675/shares",
"type": "Collection",
"totalItems": 4
}
}