What does an AppView implementation entail? #2961
Replies: 1 comment 3 replies
-
Based on those characteristics, are feed generators quite appview? Or can't we call it appview because it doesn't output most of the record information and makes bsky appview hydrate? What if the server does not have an XRPC API? For example, frontpage.fyi and smokesignal.events. They retrieve records from firehose, index them, and provide their own views, but they are integrated with the interface and do not have XRPC. I'm not going to ask for a perfect definition of "appview" here, but I just want to hear your opinion as a reference for what I call it. |
Beta Was this translation helpful? Give feedback.
-
An informal overview of what an AppView does. Similar to #2350, which discussed PDS implementations.
This document isn't "normative": AppView implementations are not required to do all of this. It also isn't complete: sometimes AppView need to do more. What an AppView needs to do is generally pretty application/Lexicion specific. This document is just to give a rough idea of what roles they can fill and services they can provide to the network.
NOTE: this is a wiki-style post and might get updated.
Accounts and Identities
AppViews re-distribute content from repos, which means they need to keep track of account hosting status, and stop re-distributing content from accounts which are deleted, deactivated, taken down, etc.
They usually provide account-specific views, and sometimes host private metadata (such as personal preferences or configuration), which means they need to be able to authenticate requests. This might mean verifying service auth for requests proxied via PDS instances. Or it might mean implementing client OAuth and some bespoke auth system for direct requests from client apps (eg, the "AppView as BFF" architecture, demonstrated in the Statusphere example app).
Record Indexing
AppViews consume content from the network and maintain indices and aggregations.
com.atproto.repo.getRecord
and similar endpoints to fetch raw indexed recordsMedia CDN
If an application includes media files (images, audio, video, etc), the AppView is usually expected to play a role as a CDN. It might also help transform media, for example generation of thumbnails.
Processing un-trusted media files is very risky! Security exploits are common even for common file formats like PNG. It is strongly recommended to implement any media transformations in separate processes, running on separate un-trusted infrastructure, or hosted services.
Personalization
Optionally, an AppView might track personal preferences for users. This is private metadata sent directly from client apps to a specific AppView instance, which has no visible impact to any other account (eg, does not include shared private data, like DMs or private accounts; or data with public side-effects like "block" relationships).
Labeling and Moderation
AppViews are usually aggregating user content from the public network, which may include unwanted, abusive, or even illegal content. AppView need mechanisms to filter or remove such content.
Search and Discovery
As part of record processing, AppViews often implement global search indices. This can include full-text search, type-ahead matching, and ranking. It can also include personalized recommendations and context.
Sometimes these roles can be abstracted out to other modular or replaceable network services (such as "feed generators").
Beta Was this translation helpful? Give feedback.
All reactions