A better Rust ATProto crate

Does jacquard directly call PDS? #18

closed
opened by netology.tngl.sh edited

Hi, does jacquard directly call the PDS for querying, or uses some centralized api that may be censored.

Can local app view be build with local computing say in tauri without relying on app view server.

Also I think one can also host PDS locally using Iroh specially using iroh-h3 Axum server. Will you like to add that feature.

jacquard can be pointed at whatever endpoint you wish. The unauthenticated basic client (what I recommend people mostly use to start if they're not doing stuff a user needs to login for) defaults to the Bluesky public API endpoint for convenience, but that can be easily set via set_base_uri().

Generally speaking, once the user has authenticated, it will point at the user's PDS for most requests unless otherwise specified. get_record() and similar helpers will generally resolve the PDS of the repository the record or blob is hosted on and make requests directly to that PDS.

If you want to talk to a specific appview via service proxy, use set_opts() to set those for all requests or call send_with_opts() instead of send() to override for one request. Jacquard requests no moderation labelers by default, though appviews/app servers may apply some by default.

I don't think PDS hosting via Iroh is something I'm going to build support for myself (and I'm unsure how compatible it would be with the rest of the ecosystem), though if you want to build it, I would be curious to see how well that works.

As an aside, I'm currently working on a project which is using Jacquard (the project I built Jacquard for, in fact), and the app is built with two hosting modes and two architectural modes in mind. It can run entirely client-side or in a hybrid mode where the server does more (for example, server-side-rendering so that you can curl a page and get useful content, not just a stub). And then architecturally, it can run without any dedicated indexing service or appview, primarily communicating with PDSes with a few requests to microcosm services for things that need it, or it can be run communicating with a dedicated indexing service/appview which provides specialized endpoints that provide the data it needs in the form it needs it. By building it this way, it lets me delay building that indexing service and get more done quickly with less infrastructure, and it also makes it much less dependent on that indexing service in general, and much easier to fully self-host.

That sounds great. Does Jacquard have a simplified PDS‑hosting library, or do we need to use something like Blacksky? If the PDS library is built in Axum, it shouldn’t be too difficult to route the traffic through iroh‑h3. We’ll just need another databaseβ€”perhaps a CRDT such asβ€―automerge or a blockchainβ€”to store PDS addresses. The community can host a PDS address with moderation, and the user can choose the moderation service. An app built with Tauri can be compatible with bothβ€―Bluesky and iroh.

short answer is no, and I don't really intend to make one. It has the axum helpers (which I'd be happy to expand on) and the repository MST and proof implementation, but I'm not planning to go further than that myself. It's fairly complex and not something I'm super interested in doing, though https://tangled.org/@thoth.ptnote.dev is I believe at least planning on making a jacquard-based PDS. Jacquard is intended to be more of a toolbox, and enough scaffolding (beyond what currently exists) to make building a PDS implementation easy would be basically the same as building a PDS, because I'd have to do that to test it.

sign up or login to add to the discussion
Labels

None yet.

assignee

None yet.

Participants 2
AT URI
at://did:plc:b4sujryiw6ffhpnqyz2kgjnt/sh.tangled.repo.issue/3m53yfpfxhj22