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 server and proxy and remove gnet/v2 #344

Merged
merged 35 commits into from
Oct 17, 2023
Merged

Commits on Oct 7, 2023

  1. Configuration menu
    Copy the full SHA
    d094e0c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4fc692a View commit details
    Browse the repository at this point in the history
  3. Remove unused Server options

    mostafa committed Oct 7, 2023
    Configuration menu
    Copy the full SHA
    ad69ae8 View commit details
    Browse the repository at this point in the history
  4. Fix tests

    mostafa committed Oct 7, 2023
    Configuration menu
    Copy the full SHA
    f89cfde View commit details
    Browse the repository at this point in the history

Commits on Oct 8, 2023

  1. Fix linter errors

    Remove unused dependencies (gnet/v2 and others)
    mostafa committed Oct 8, 2023
    Configuration menu
    Copy the full SHA
    5cb26b2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    57bc655 View commit details
    Browse the repository at this point in the history

Commits on Oct 9, 2023

  1. Prevent race using a RWMutex

    mostafa committed Oct 9, 2023
    Configuration menu
    Copy the full SHA
    a219b40 View commit details
    Browse the repository at this point in the history
  2. Fix server test

    mostafa committed Oct 9, 2023
    Configuration menu
    Copy the full SHA
    74856a0 View commit details
    Browse the repository at this point in the history

Commits on Oct 13, 2023

  1. Update dependencies

    mostafa committed Oct 13, 2023
    Configuration menu
    Copy the full SHA
    9defae5 View commit details
    Browse the repository at this point in the history
  2. Use an atomic boolean as a simple state machine for controlling Engin…

    …e start/stop
    
    Close channel after send
    Close listener gracefully and raise error if something happened
    Use for/select for stopping long-running goroutines gracefully
    mostafa committed Oct 13, 2023
    Configuration menu
    Copy the full SHA
    3909b20 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    004608a View commit details
    Browse the repository at this point in the history
  4. Use separate metrics for proxy passthroughs (to-server, to-client) an…

    …d plugin registry
    
    Check if the client is actually connected before closing it
    Stop scheduler before clearing the jobs (safer)
    mostafa committed Oct 13, 2023
    Configuration menu
    Copy the full SHA
    fcebc7b View commit details
    Browse the repository at this point in the history
  5. Use an atomic bool to check if the client is connected or not before …

    …taking any action
    
    The atomic bool will eliminate the need for empty read
    Remove unnecessary select
    Add deadline to kill the client connection immediately
    mostafa committed Oct 13, 2023
    Configuration menu
    Copy the full SHA
    38fa88a View commit details
    Browse the repository at this point in the history
  6. Pass all the variables into the goroutine to prevent data races

    Initialize context (_) and span inside the goroutine to prevent data races
    Unify log and trace event message
    mostafa committed Oct 13, 2023
    Configuration menu
    Copy the full SHA
    1548fd2 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    3cb8719 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    020e63f View commit details
    Browse the repository at this point in the history
  9. Fix connection close issue

    Use a separate rwmutex for server code
    mostafa committed Oct 13, 2023
    Configuration menu
    Copy the full SHA
    22a5d09 View commit details
    Browse the repository at this point in the history

Commits on Oct 15, 2023

  1. Internalize net.Conn in Client struct to prevent direct access to met…

    …hods
    
    Use a mutex to prevent data races to client.conn
    Reset context to prevent early timeouts
    Check for field value before logging it
    mostafa committed Oct 15, 2023
    Configuration menu
    Copy the full SHA
    fb9fdab View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e549e58 View commit details
    Browse the repository at this point in the history
  3. Add test for Reconnect

    Fix tests
    mostafa committed Oct 15, 2023
    Configuration menu
    Copy the full SHA
    f02a31f View commit details
    Browse the repository at this point in the history
  4. Fix metrics

    mostafa committed Oct 15, 2023
    Configuration menu
    Copy the full SHA
    8013cb9 View commit details
    Browse the repository at this point in the history
  5. Remove unused variable

    mostafa committed Oct 15, 2023
    Configuration menu
    Copy the full SHA
    3e734cb View commit details
    Browse the repository at this point in the history
  6. Fix connection hanging

    mostafa committed Oct 15, 2023
    Configuration menu
    Copy the full SHA
    e13389a View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    f201736 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    fa790c6 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    068f03c View commit details
    Browse the repository at this point in the history
  10. Move Run function to server.Run

    Check if listener is not nil before closing it
    mostafa committed Oct 15, 2023
    Configuration menu
    Copy the full SHA
    91998ea View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    f1c70bf View commit details
    Browse the repository at this point in the history
  12. Add test for Engine

    mostafa committed Oct 15, 2023
    Configuration menu
    Copy the full SHA
    f377c83 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    91efb66 View commit details
    Browse the repository at this point in the history
  14. Close listener after use

    Add new make target for finding race conditions in tests
    mostafa committed Oct 15, 2023
    Configuration menu
    Copy the full SHA
    ac85264 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    909a23c View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    b009dc1 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    4399644 View commit details
    Browse the repository at this point in the history

Commits on Oct 17, 2023

  1. Update dependencies

    mostafa committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    fc41aed View commit details
    Browse the repository at this point in the history