Protobuf alongside JSON in ipx's, the directory's and ipx-play's APIs #465
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The three APIs speak only JSON. Add protobuf (application/x-protobuf) as a second encoding, chosen by Accept and Content-Type, with JSON staying the default so the page, the TUI and older iOS builds keep working unchanged. First clients: the iOS app's native calls (badge, CarPlay, playback positions) and ipx's own calls to ipx-directory and ipx-play. The .proto files are the schema both sides generate from.
In
c0998f1, on main and pushed: new crate ipx-wire (.proto files in crates/wire/proto, one layer converting JSON at the edge); ipx, the directory and ipx-play negotiate by Accept and Content-Type; ipx calls the directory and ipx-play in protobuf. Not deployed yet: Tower had 9.15 GB available, under build-image.sh's 9 GB floor. Deploy order: directory and play first, then ipx, since ipx now sends them protobuf. The iOS side is #468.Deployed
c0998f1: ipx-directory, ipx-play, then ipx. /api/feeds answers 136 KB as JSON and 45 KB as protobuf for Accept: application/x-protobuf; ipx's first snapshot went to the directory as protobuf (1488 accepted). The iOS client is #468.