Mastodon doesn't implement the #ActivityPub "API" (C2S). They don't conform to either the client or server profiles in the AP Recommendation. They implement a very small subset of AP/AS2 and they don't conform to the AS2 Recommendation for the parts they implement. Their software supports > 80% of the MAU in the Fediverse (all protocols, not the SWF definition). And Evan uses this as evidence of ActivityPub's success? I think Mastodon has thrived despite ActivityPub problems, not because of it.
@nik@evan I'll let you and @evan discuss that. He's made it clear to me that plain JSON (no JSON-LD processing) has primacy over JSON-LD/RDF. That's one reason this thread is so interesting to me, given the recommendation to use the OWL ontology.
@evan@nik Using the OWL Ontology for validation is not ideal for multiple reasons. 1) It's not maintained, 2) it's not complete (only AS2, no AP), 3) it's not fully consistent with normative AS2, 4) it requires RDF, which requires JSON-LD processing of AP messages, 5) if you want message validation, you'll need write code to do something that already exists (SHACL, ShEx). I recommend JSON Schema for plain JSON applications.
@nik What's this well-defined RDFS vocabulary (vs the normative JSON-LD context)? Do you mean the non-normative (and non-maintained) AS2 OWL ontology? A JSON Schema definition could define constraints that can be used for plain JSON message validation (and developer documentation) for specific AP interoperability domains (microblogging, forums, online markets, etc.). And it would be useful for non-RDF (plain JSON) consumers given AP is primarily intended to be used in that context (per @evan ).
@evan Right, the RDF differs because the Collection's JSON-LD serialization is different in the paged serialization. I'd prefer that the Collection representation wouldn't change for paging, but I know that's another aspect of AS2 that will not change. Linked Data Platform (LDP) Paging describes a different way that doesn't couple the Collection and page representations so tightly. IIRC, they use Link headers for page refs and transient objects (in AP terms) for pages. https://dvcs.w3.org/hg/ldpwg/raw-file/default/ldp-paging.html
@evan Yes, that’s essentially it. The AS2 Collection paging is a whole other discussion. The RDF triples are accurately representing what’s in the page-related JSON-LD, but the JSON-LD isn’t literally serializing one item in a Collection. It’s serializing a Collection referencing a CollectionPage (via `first`) that references one item (which is consistent with the RDF triples).
@evan JSON-LD is a Linked Data (RDF) serialization. I think it's a stretch to call it a schema language in the same genre as JSON Schema. The JSON-LD AP context can only be compared to a schema language in very limited ways. I'd expect one would use RDF Schema (RDFS) or SHACLE or Shape Expressions (ShEx), maybe OWL, *with* JSON-LD for that purpose. Given that, would you personally still choose JSON-LD today, since the focus is on plain JSON? I'm not asking about what Snell chose a decade ago.
@evan There's no need to "cast" me in that light. However, intentional pact or not... it would be like selecting RDF/XML as the AP/AS2 representation but saying it should be treated as generic XML and has no relationship to RDF. Or using Turtle and suggesting that it be interpreted as just lines of text with no relation to RDF. I think it's a very confusing position. If you had to make that decision (to use JSON-LD) today, would you make the same decision? Why?
@evan We're back in the circular reasoning since JSON-LD *has* a well-defined data model. It's RDF and graph-based (Chapt 10. JSON-LD 1.1 spec.). The statement that AP uses "JSON-LD" but is not an RDF data model doesn't make sense to me given how JSON-LD is specified. I don't think JSON-LD provides much extensibility benefit to plain JSON apps. Maybe there should be a variant of #ActivityPub that is unambiguously plain JSON with a plain JSON extensibility design? Maybe less confusing for devs?
@evan I understand. That's why I said repeatedly that I'm not discussing serialization. I agree that serializing Collections with embedded copies of Objects is needed for interoperability with most existing AP S2S implementations. To clarify, are you concerned about statements related to valid, allowed AP (serialized) representations that aren't the ones typically implemented? Versus invalid representations?
@evan I'm open to style suggestions. However, I still think my original statements are true. I've tried to explain why, but if you have questions, let me know.
@evan One can discuss containment without identifying the *real* location of objects (whatever that even means). You seem to be annoyed with this discussion, so I'm going to end my part in the thread now. However, I think it's important (and maybe I'm the only one that feels this way?) to discuss and fully understand these and other confusing aspects of AP/AS2, so don't be surprised to see related posts in the future.
@evan Not necessarily. If you'd like, I can quickly write a simple AP-server that will return a JSON-serialized inbox Collection with URIs in the "orderedItems" array instead of embedded serialized copies of the object referents. It won't interoperate with typical server implementations (Vocata is one exception), although AFAIK it would be conformant with AP/AS2. But again, this is conflating serialization with whatever abstract data model underlies it.
@evan I understand the extension goal, but how does that work without using JSON-LD processing to expand (disambiguate) terms? In other words, how is extensibility supposed to work for developers using plain JSON?
@evan I think we're conflating data models with JSON(-LD) *serialization* of those models and that's going to cause even more confusion. Without RDF, I think it's not going to be easy to discuss whatever abstract data model AP uses.
I'm still not clear about the discussion we had yesterday. @evan are AS2 (and #ActivityPub) serializations JSON-LD or not? I see the AS2 spec says the serialization only has "“compatibility with JSON-LD” but must conform to JSON-LD algorithm requirements. I understand if it's JSON-LD, it is also JSON (but not necessarily the inverse). Like we discussed yesterday, JSON-LD is JSON and it's an RDF data model. JSON, in general, is neither JSON-LD nor an RDF data model.
@evan To be clear, I'm not saying Mastodon per se is broken wrt Updates. I'm saying change tracking is problematic in the AP recommendation. An Object URI will always reference the latest state of the Object, not the previous states for previous Updates (all referring to the same `object` URI). The Update could have had the changes as the Activity `object` and the target URI to update as, well, the `target`. Then the history of changes could have been preserved.
American living in Southern France. Developer of the FIRM server platform. I'm interested in #computers, #SoftwareDevelopment, #SemanticWeb, #osint, #DistributedComputing, #pkm, #HomeAutomation, #PhysicalComputing, #iot, #rpi, #esp32, #hiking, #traveling, learning #french and lots of other stuff.