Signal <-> XMPP attachments #3

Open
opened 2025-02-23 01:11:15 +00:00 by m · 0 comments
Owner

Refactor component and processing to have external libraries under clients.
Separate out common functions into generic library where all functions have an additional service argument.

Lower TTFB from Signal to XMPP by chaining these generic operators in two ways:
Signal [get attachment] -> XMPP [get upload slot] -> HTTP [upload attachment] -> XMPP [send attachment]

XMPP [get attachment] -> Signal [send attachment]

Meaning that in deferred, we no longer have:

        # Asynchronously fetch all attachments
        tasks = [signalapi.fetch_signal_attachment(att["id"]) for att in attachments]
        fetched_attachments = await asyncio.gather(*tasks)

as this actually blocks until all attachments are downloaded before sending the first to XMPP.

Check the reciprocal path and ensure the same is not true.

Refactor is key otherwise this is a mess.

Look into removing Redis as a one way intermediary by combining component and processing.

Refactor component and processing to have external libraries under clients. Separate out common functions into generic library where all functions have an additional service argument. Lower TTFB from Signal to XMPP by chaining these generic operators in two ways: Signal [get attachment] -> XMPP [get upload slot] -> HTTP [upload attachment] -> XMPP [send attachment] XMPP [get attachment] -> Signal [send attachment] Meaning that in deferred, we no longer have: ``` # Asynchronously fetch all attachments tasks = [signalapi.fetch_signal_attachment(att["id"]) for att in attachments] fetched_attachments = await asyncio.gather(*tasks) ``` as this actually blocks until all attachments are downloaded before sending the first to XMPP. Check the reciprocal path and ensure the same is not true. Refactor is key otherwise this is a mess. Look into removing Redis as a one way intermediary by combining component and processing.
m added this to the GIA project 2025-02-23 01:11:15 +00:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: XF/GIA#3
No description provided.