Remove FedSockets
authorrinpatch <rinpatch@sdf.org>
Tue, 17 Nov 2020 14:28:30 +0000 (17:28 +0300)
committerrinpatch <rinpatch@sdf.org>
Tue, 17 Nov 2020 14:28:30 +0000 (17:28 +0300)
commit2c55f7d7cb25b857265df67c21bc59f7778653ee
tree2524427b5f0216680176b34c8363e482e4ad3f14
parent9b9afe6b3fde77ef005629fe2d198160c8f465a1
Remove FedSockets

Current FedSocket implementation has a bunch of problems. It doesn't
have proper error handling (in case of an error the server just doesn't
respond until the connection is closed, while the client doesn't match
any error messages and just assumes there has been an error after 15s)
and the code is full of bad descisions (see: fetch registry which uses
uuids for no reason and waits for a response by recursively querying a
 ets table until the value changes, or double JSON encoding).

Sometime ago I almost completed rewriting fedsockets from scrach to
adress these issues. However, while doing so, I realized that fedsockets
 are just too overkill for what they were trying to accomplish, which is
 reduce the overhead of federation by not signing every message.
This could be done without reimplementing failure states and endpoint
 logic we already have with HTTP by, for example, using TLS cert auth,
or switching to a more performant signature algorithm. I opened
https://git.pleroma.social/pleroma/pleroma/-/issues/2262 for further
discussion on alternatives to fedsockets.

From discussions I had with other Pleroma developers it seems like they
 would approve the descision to remove them as well,
therefore I am submitting this patch.
23 files changed:
config/config.exs
config/description.exs
docs/configuration/cheatsheet.md
installation/pleroma.nginx
lib/pleroma/application.ex
lib/pleroma/object/fetcher.ex
lib/pleroma/signature.ex
lib/pleroma/user.ex
lib/pleroma/web/activity_pub/activity_pub.ex
lib/pleroma/web/activity_pub/publisher.ex
lib/pleroma/web/activity_pub/transmogrifier.ex
lib/pleroma/web/fed_sockets.ex [deleted file]
lib/pleroma/web/fed_sockets/fed_registry.ex [deleted file]
lib/pleroma/web/fed_sockets/fed_socket.ex [deleted file]
lib/pleroma/web/fed_sockets/fetch_registry.ex [deleted file]
lib/pleroma/web/fed_sockets/incoming_handler.ex [deleted file]
lib/pleroma/web/fed_sockets/ingester_worker.ex [deleted file]
lib/pleroma/web/fed_sockets/outgoing_handler.ex [deleted file]
lib/pleroma/web/fed_sockets/socket_info.ex [deleted file]
lib/pleroma/web/fed_sockets/supervisor.ex [deleted file]
test/pleroma/web/fed_sockets/fed_registry_test.exs [deleted file]
test/pleroma/web/fed_sockets/fetch_registry_test.exs [deleted file]
test/pleroma/web/fed_sockets/socket_info_test.exs [deleted file]