:: channels: message stream structures :: :: four shapes that cross client-subscriber-publisher boundaries: :: - actions client-to-subscriber change requests (user actions) :: - commands subscriber-to-publisher change requests :: - updates publisher-to-subscriber change notifications :: - responses subscriber-to-client change notifications :: :: --action--> --command--> :: client subscriber publisher :: <--response-- <--update-- :: :: local actions _may_ become responses, :: remote actions become commands, :: commands _may_ become updates, :: updates _may_ become responses. :: /- g=tlon-groups, c=tlon-cite /+ mp=mop-extensions |% +| %ancients :: ++ mar |% ++ act `mark`%channel-action ++ cmd `mark`%channel-command ++ upd `mark`%channel-update ++ log `mark`%channel-logs ++ not `mark`%channel-posts -- :: +| %primitives :: +$ flag (pair ship term) +$ v-channels (map nest v-channel) ++ v-channel |^ ,[global local] :: $global: should be identical between ships :: +$ global $: posts=v-posts order=(rev order=arranged-posts) view=(rev =view) sort=(rev =sort) perm=(rev =perm) == :: $window: sparse set of time ranges :: ::TODO populate this +$ window (list [from=time to=time]) :: .window: time range for requested posts that we haven't received :: .diffs: diffs for posts in the window, to apply on receipt :: +$ future [=window diffs=(jug id-post u-post)] :: $local: local-only information :: +$ local $: =net =log =remark =window =future == -- :: $v-post: a channel post :: +$ v-post [v-seal (rev essay)] +$ id-post time +$ v-posts ((mop id-post (unit v-post)) lte) ++ on-v-posts ((on id-post (unit v-post)) lte) ++ mo-v-posts ((mp id-post (unit v-post)) lte) :: $v-reply: a post comment :: +$ v-reply [v-reply-seal (rev memo)] +$ id-reply time +$ v-replies ((mop id-reply (unit v-reply)) lte) ++ on-v-replies ((on id-reply (unit v-reply)) lte) ++ mo-v-replies ((mp time (unit v-reply)) lte) :: $v-seal: host-side data for a post :: +$ v-seal $+ channel-seal $: id=id-post replies=v-replies reacts=v-reacts == :: $v-reply-seal: host-side data for a reply :: +$ v-reply-seal $: id=id-reply reacts=v-reacts == :: $essay: top-level post, with metadata :: +$ essay [memo =kind-data] :: $reply-meta: metadata for all replies +$ reply-meta $: reply-count=@ud last-repliers=(set ship) last-reply=(unit time) == :: $kind-data: metadata for a channel type's "post" :: +$ kind-data $% [%diary title=@t image=@t] [%heap title=(unit @t)] [%chat kind=$@(~ [%notice ~])] == :: $memo: post data proper :: :: content: the body of the comment :: author: the ship that wrote the comment :: sent: the client-side time the comment was made :: +$ memo $: content=story author=ship sent=time == :: $story: post body content :: +$ story (list verse) :: $verse: a chunk of post content :: :: blocks stand on their own. inlines come in groups and get wrapped :: into a paragraph :: +$ verse $% [%block p=block] [%inline p=(list inline)] == :: $listing: recursive type for infinitely nested