akkoma/lib/pleroma
rinpatch 58a4f350a8 Refactor gun pooling and simplify adapter option insertion
This patch refactors gun pooling to use Elixir process registry and
simplifies adapter option insertion.

Having the pool use process registry instead of a GenServer has a number of advantages:
- Simpler code: the initial implementation adds about half the lines of code it deletes
- Concurrency: unlike a GenServer, ETS-based registry can handle multiple checkout/checkin
requests at the same time
- Precise and easy idle connection clousure: current proposal for closing idle connections in
the GenServer-based pool needs to filter through all connections once a minute and compare their
last active time with closing time. With Elixir process registry this can be done
by just using `Process.send_after`/`Process.cancel_timer` in the worker process.
- Lower memory footprint: In my tests `gun-memory-leak` branch uses about 290mb on peak load (250 connections)
and 235mb on idle (5-10 connections). Registry-based pool uses 210mb on idle and 240mb on peak load
2020-07-15 15:17:27 +03:00
..
activity Activity.Queries: Use correct actor restriction. 2020-05-26 17:46:16 +02:00
bbs Use atoms as keys in ActivityPub.fetch_* functions options 2020-06-04 21:36:26 +04:00
captcha Change Pleroma.CaptchaTest to be a regular module instead of GenServer 2020-04-29 21:26:07 +04:00
chat ChatController: Add last_read_id option to mark_as_read. 2020-06-07 15:38:33 +02:00
config MediaProxy whitelist setting now supports hosts with scheme 2020-07-12 12:41:40 +03:00
conversation Conversations: Return last dm for conversation, not last message. 2020-06-15 12:27:13 +02:00
docs Config/Docs: Expand behaviour suggestions at runtime 2020-07-12 17:23:33 +02:00
ecto_type moving custom ecto types in context folders 2020-06-16 17:50:33 +03:00
emails Add AdminFE reports URL to report emails 2020-07-09 11:55:40 -05:00
emoji Use the Pleroma.Config alias 2020-07-09 10:53:51 -05:00
gopher Update Copyrights 2020-03-03 16:44:49 -06:00
gun Refactor gun pooling and simplify adapter option insertion 2020-07-15 15:17:27 +03:00
helpers Create Pleroma.Maps.put_if_present(map, key, value, value_fun // &{:ok, &1}) 2020-06-05 14:48:02 +00:00
http Refactor gun pooling and simplify adapter option insertion 2020-07-15 15:17:27 +03:00
instances instance: Prevent loop of updates 2020-07-08 06:28:40 +02:00
mfa copyright update 2020-05-18 15:15:51 +03:00
migration_helper Notification Backfill: Explicitly select the needed fields. 2020-07-03 11:25:12 +02:00
object object/fetcher: Pass full Transmogrifier error 2020-06-26 20:10:47 +02:00
plugs Merge branch 'feature/1922-media-proxy-whitelist' into 'develop' 2020-07-14 18:07:44 +00:00
reverse_proxy Refactor gun pooling and simplify adapter option insertion 2020-07-15 15:17:27 +03:00
tests [#2409] Tested all auth setup configs in AuthTestControllerTest. Adjusted :skip_plug definitions for some endpoints. 2020-04-24 16:52:38 +03:00
upload Remove unused @types 2020-07-10 17:08:54 -05:00
uploaders Bump copyright years of files changed after 2020-01-07 2020-03-02 06:08:45 +01:00
user Removed unused trigram index on users. Fixed users_fts_index usage. 2020-07-08 22:50:15 +03:00
web Merge branch 'feature/1922-media-proxy-whitelist' into 'develop' 2020-07-14 18:07:44 +00:00
workers migrate to oban 2.0-rc1 2020-06-23 15:09:01 +03:00
activity.ex Merge branch '1851-favorites-pagination' into 'develop' 2020-06-13 17:20:43 +00:00
activity_expiration.ex Bump copyright years of files changed after 2020-01-07 2020-03-02 06:08:45 +01:00
application.ex Refactor gun pooling and simplify adapter option insertion 2020-07-15 15:17:27 +03:00
application_requirements.ex added tests 2020-06-23 06:59:00 +03:00
bookmark.ex Update Copyrights 2020-03-03 16:44:49 -06:00
chat.ex Chats: Change id to flake id. 2020-06-07 14:25:30 +02:00
clippy.ex Update Copyrights 2020-03-03 16:44:49 -06:00
config.ex Update Copyrights 2020-03-03 16:44:49 -06:00
constants.ex Merge remote-tracking branch 'origin/develop' into feature/embeddable-posts 2020-06-01 17:38:57 +04:00
conversation.ex User: Change signature of get_users_from_set 2020-05-25 15:06:35 +02:00
counter_cache.ex Set sum types in query 2020-05-10 09:13:24 +03:00
delivery.ex Update Copyrights 2020-03-03 16:44:49 -06:00
earmark_renderer.ex Formatting: Do not use \n and prefer <br> instead 2020-03-13 16:07:17 +01:00
ecto_enums.ex [#2332] Misc. improvements per code change requests. 2020-03-31 09:21:42 +03:00
emoji-data.txt Emoji: Add function to detect if a character is an emoji 2019-09-13 02:11:02 +02:00
emoji.ex Update Copyrights 2020-03-03 16:44:49 -06:00
filter.ex renaming back and reject nil on create 2020-07-06 09:30:42 +03:00
following_relationship.ex Filter outstanding follower requests from deactivated accounts 2020-06-24 17:18:53 -05:00
formatter.ex formatter: Use user.uri instead of user.source_data.uri 2020-04-10 06:20:02 +02:00
healthcheck.ex healthcheck: report real amount of memory allocated by beam 2020-05-08 23:57:47 +03:00
html.ex excluding attachment links from RichMedia 2020-06-29 15:25:57 +03:00
instances.ex Use instances table instead of Cachex 2020-07-08 06:28:39 +02:00
job_queue_monitor.ex Update Copyrights 2020-03-03 16:44:49 -06:00
jwt.ex
keys.ex Update Copyrights 2020-03-03 16:44:49 -06:00
list.ex Update Copyrights 2020-03-03 16:44:49 -06:00
maintenance.ex Abstract out the database maintenance. I'd like to use this from AdminFE too. 2020-05-27 16:40:51 -05:00
maps.ex Create Pleroma.Maps.put_if_present(map, key, value, value_fun // &{:ok, &1}) 2020-06-05 14:48:02 +00:00
marker.ex added an endpoint for getting unread notification count 2020-04-15 21:19:43 +03:00
mfa.ex copyright update 2020-05-18 15:15:51 +03:00
mime.ex Bump copyright years of files changed after 2020-01-07 2020-03-02 06:08:45 +01:00
moderation_log.ex Admin API: PATCH /api/pleroma/admin/users/:nickname/credentials, GET /api/pleroma/admin/users/:nickname/credentials. 2020-03-16 20:42:37 +03:00
notification.ex Notification: For follows, notify the followed. 2020-07-08 14:29:29 +02:00
object.ex Merge branch 'issue/1509' into 'develop' 2020-05-20 10:35:36 +00:00
object_tombstone.ex Update Copyrights 2020-03-03 16:44:49 -06:00
otp_version.ex otp version 2020-03-04 09:23:42 +03:00
pagination.ex [#1873] Fixes missing :offset pagination param support. Added pagination support for hashtags search. 2020-06-19 16:14:06 +03:00
password_reset_token.ex Update Copyrights 2020-03-03 16:44:49 -06:00
registration.ex Update Copyrights 2020-03-03 16:44:49 -06:00
release_tasks.ex Update Copyrights 2020-03-03 16:44:49 -06:00
repo.ex added verify RUM settings before start app 2020-06-22 17:27:49 +03:00
repo_streamer.ex Update Copyrights 2020-03-03 16:44:49 -06:00
report_note.ex Update Copyrights 2020-03-03 16:44:49 -06:00
scheduled_activity.ex Add OpenAPI spec for StatusController 2020-05-13 00:25:21 +04:00
signature.ex moving custom ecto types in context folders 2020-06-16 17:50:33 +03:00
stats.ex Update stats admin endpoint 2020-05-09 11:30:37 +03:00
thread_mute.ex Misc refactoring / tweaks (ThreadMute.exists?/2). 2020-03-27 08:01:03 +03:00
upload.ex Upload: Restrict description length 2020-07-06 11:08:13 +02:00
user.ex Merge branch 'features/profile-fields-emojo' into 'develop' 2020-07-13 15:43:46 +00:00
user_invite_token.ex Update Copyrights 2020-03-03 16:44:49 -06:00
user_relationship.ex [#2456] Added support for embed_relationships param, nailed down endpoints which should support it. Fixed :source_mutes relationships subset fetching. 2020-05-12 19:14:35 +03:00
utils.ex Update Copyrights 2020-03-03 16:44:49 -06:00