Pleroma/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
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
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
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
upload Remove unused @types 2020-07-10 17:08:54 -05:00
uploaders
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
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
chat.ex Chats: Change id to flake id. 2020-06-07 14:25:30 +02:00
clippy.ex
config.ex
constants.ex Merge remote-tracking branch 'origin/develop' into feature/embeddable-posts 2020-06-01 17:38:57 +04:00
conversation.ex
counter_cache.ex
delivery.ex
earmark_renderer.ex
ecto_enums.ex
emoji-data.txt
emoji.ex
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
healthcheck.ex
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
jwt.ex
keys.ex
list.ex
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
mfa.ex
mime.ex
moderation_log.ex
notification.ex Notification: For follows, notify the followed. 2020-07-08 14:29:29 +02:00
object.ex
object_tombstone.ex
otp_version.ex
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
registration.ex
release_tasks.ex
repo.ex added verify RUM settings before start app 2020-06-22 17:27:49 +03:00
repo_streamer.ex
report_note.ex
scheduled_activity.ex
signature.ex moving custom ecto types in context folders 2020-06-16 17:50:33 +03:00
stats.ex
thread_mute.ex
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
user_relationship.ex
utils.ex