Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General improvements for Lanyard #210

Merged
merged 6 commits into from
Jun 28, 2023
Merged

General improvements for Lanyard #210

merged 6 commits into from
Jun 28, 2023

Conversation

meppu
Copy link
Contributor

@meppu meppu commented Jun 24, 2023

⚠️ Since this pull-request replaces a lot of libraries, i wanted to contact phineas first to get his opinion. Since I didn't get any response i created pull-request anyway ⚠️

  • Switched from Cowboy to Bandit. There are several reasons but these are the most important ones:
    • Bandit is written entirely in Elixir
    • Bandit's HTTP/1.x engine is up to 4x faster than Cowboy depending on the number of concurrent requests. When comparing HTTP/2 performance, Bandit is up to 1.5x faster than Cowboy.
  • Switched from Poison to Jason. It is faster and new default for most of the libraries. And Poison didn't received any update in 2 years so it looks like it is currently unmaintained.
  • Switched from HTTPoison to Finch. Finch is more minimal and performant.
  • Added default avatar resolver for new usernames.

I tested these patches on my machine and tested functionalities like KV, REST API and WebSocket and seems like it all works great!

@Phineas
Copy link
Owner

Phineas commented Jun 28, 2023

Usually I'm not a huge fan of changing out libraries for the sake of it. Lanyard works very well and hasn't had downtime for over a year, so I'm hesitant to change something that works well.

However, I've done pretty extensive testing under this PR and haven't discovered any issues - plus it improves code readability, so I'll accept the PR. Thank you!

@Phineas Phineas merged commit 7b10c43 into Phineas:main Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants