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

Refactor Realm and Upgrade to Realm2 #52

Merged
merged 169 commits into from
Apr 15, 2022
Merged

Conversation

zephyrchien
Copy link
Collaborator

@zephyrchien zephyrchien commented Feb 20, 2022

This was initially motivated by #36, about half a year ago. At that time I had submitted a patch, unfortunately it did not solve the issue.

Although I had found the reason after looking into the stdlib, it was still hard to solve the issue with Realm's architecture. I supposed that even if we had that issue solved, the code would become more complicated and harder to maintain. As a result, I decided to refactor the whole project, to simplify the code and make it easier to bring in new features.

I have been working on this for a few months(here is the todo-list), testing new features and solving bugs. Now I think it is stable enough and it is time that I could contribute it to the upstream.

Here is the feature list:

Network(Core):

  • zero-copy, reimplement with try_io(requires tokio>=1.9), which is more efficient.
  • tcp-fast-open, related feature requests: 请问real是否支持tcp fast open? #13 支持TFO #40
  • proxy-protocol, with this feature realm could replace haproxy/nginx as a more lightweight solution under some use cases
  • bind address, or network interface, make it easier to choose ipv4/ipv6 as outbound for a dual-stack VPS, also VPS with multiple IPs will benefit from this feature
  • configurable dns resolver: this may meet some users' special needs

Configuration:

Logger:

  • support different log level
  • log connection info & error message, making it easier to identify problems

Utilities:

  • set nofile limit(with -n option) when and also print current soft/hard fd limit when starting. The most frequent mentioned issue is runing out of fd(because by default the limit is only 1024 on linux :(
  • run as unix daemon(with -d option), users don't need to bother to configure systemd any more

Code Coverage:

  • currently tests of core facilities have been covered, including tcp, udp, zero-copy, proxy-protocol

Document:

  • there is a detailed document about how to build, use, and configure realm

Ci:

  • make use of github workflow for linting, nightly build, and automatic release

@zephyrchien zephyrchien marked this pull request as ready for review February 20, 2022 19:48
@zhboner zhboner merged commit bab4567 into zhboner:master Apr 15, 2022
@zephyrchien
Copy link
Collaborator Author

@zhboner Hi, may I have write access to this repo, so that I can contribute to Realm directly.

话说如何才能联系上你啊,给你发邮件你也不回(

@zhboner
Copy link
Owner

zhboner commented Apr 15, 2022 via email

@zhboner
Copy link
Owner

zhboner commented Apr 15, 2022 via email

@zephyrchien
Copy link
Collaborator Author

Hi, I have invited you to be a collaborator of this repo. I highly appreciate your devotion again! zephyr @.>于2022年4月15日 周五17:03写道:

@zhboner https://github.com/zhboner Hi, may I have write access to this repo, so that I can contribute to Realm directly. 话说如何才能联系上你啊,给你发邮件你也不回( — Reply to this email directly, view it on GitHub <#52 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACHHKA5UUG7ZTYA23GTL5JDVFEWFHANCNFSM5O42TAXA . You are receiving this because you were mentioned.Message ID: @.
>

I have pushed tag v2.0.0 just now. Realm2 will be automatically released later. Cheers! 🎉 🎉 🎉

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