Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
SRB2
SRB2
  • Project
    • Overview
    • Details
    • Activity
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 265
    • Issues 265
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 74
    • Merge Requests 74
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Commits
  • Issue Boards
  • STJr
  • SRB2SRB2
  • Merge Requests
  • !940

Merged
Opened May 14, 2020 by James R.@james 
  • Report abuse
Report abuse

HTTP Based Master Server + Multithreading

LJ's gonna come in here and say I fucked up the mutexes, huh?

There are 3 reasons for you to review and merge this...

  1. HTTP means connections go through Cloudfare, so the address of mb.srb2.org isn't public.
  2. No memory leaks from the decade old Master Server daemon.
  3. Multithreading means the game does not hang if the Master Server is slow.

Also check out the public REST API.

Edited Jul 12, 2020 by James R.
  • Discussion 11
  • Commits 56
  • Changes 37
{{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved
  • James R.
    @james started a discussion on commit 7d2b3b08 May 14, 2020
    • James R. @james

      mentioned in commit ae453335

      May 14, 2020

      mentioned in commit ae453335

      mentioned in commit ae45333535815d32f47b496734049bb4f25e581e
      Toggle commit list
    Please register or sign in to reply
  • Jaime Ita Passos @Jimita commented May 14, 2020
    Master

    Based? Based on what?

    Based? Based on what?
  • James R. @james commented May 14, 2020
    Owner

    Based on php. Oh, yikes...

    Based on php. Oh, yikes...
  • James R. @james

    changed the description

    May 14, 2020

    changed the description

    changed the description
    Toggle commit list
  • James R. @james

    added 1 commit

    • 0b9c20cc - ok

    Compare with previous version

    May 14, 2020

    added 1 commit

    • 0b9c20cc - ok

    Compare with previous version

    added 1 commit <ul><li>0b9c20cc - ok</li></ul> [Compare with previous version](https://git.magicalgirl.moe/STJr/SRB2/merge_requests/940/diffs?diff_id=5377&start_sha=ae45333535815d32f47b496734049bb4f25e581e)
    Toggle commit list
  • James R.
    @james started a discussion on an old version of the diff May 14, 2020
    Last updated by James R. May 15, 2020
    src/hms123311.c 0 → 100644
    587
    588 hms = HMS_connect("versions/%d", MODID);
    589
    590 if (! hms)
    591 return 0;
    592
    593 ok = 0;
    594
    595 if (HMS_do(hms))
    596 {
    597 version = strtok(hms->buffer, " ");
    598 version_name = strtok(0, "\n");
    599
    600 if (version && version_name)
    601 {
    602 if (atoi(version) != MODVERSION)
    • James R. @james commented May 14, 2020
      Owner

      I think this is worth pointing out specifically. This is intentionally comparing the exact value rather than greater than because it makes it very obvious if we forget to update MODVERSION on the MSCP every single release.

      I think this is worth pointing out specifically. This is intentionally comparing the exact value rather than greater than because it makes it very obvious if *we forget to update MODVERSION on the MSCP every single release*.
    • James R. @james

      changed this line in version 4 of the diff

      May 15, 2020

      changed this line in version 4 of the diff

      changed this line in [version 4 of the diff](https://git.magicalgirl.moe/STJr/SRB2/merge_requests/940/diffs?diff_id=5398&start_sha=0b9c20cc7086000548e02b39c1abf94ffb56feae#5ac2144846cda1016401a55fb4dcbb1c112552c9_602_0)
      Toggle commit list
    Please register or sign in to reply
  • James R. @james

    changed target branch from master to next

    May 14, 2020

    changed target branch from master to next

    changed target branch from `master` to `next`
    Toggle commit list
  • James R. @james

    changed the description

    May 14, 2020

    changed the description

    changed the description
    Toggle commit list
  • Monster Iestyn
    @MonsterIestyn started a discussion on an old version of the diff May 14, 2020
    Resolved by James R. May 15, 2020
    src/console.c
    Unable to load the diff.
    • Monster Iestyn @MonsterIestyn commented May 14, 2020
      Master

      Any reason why this isn't just Unlock_state() like everywhere else? (since it is the same thing as I_unlock_mutex(con_mutex) after all). Also would mean no need for the HAVE_THREADS ifdef obviously

      Any reason why this isn't just `Unlock_state()` like everywhere else? (since it is the same thing as `I_unlock_mutex(con_mutex)` after all). Also would mean no need for the `HAVE_THREADS` ifdef obviously
    • James R. @james

      changed this line in version 4 of the diff

      May 15, 2020

      changed this line in version 4 of the diff

      changed this line in [version 4 of the diff](https://git.magicalgirl.moe/STJr/SRB2/merge_requests/940/diffs?diff_id=5398&start_sha=0b9c20cc7086000548e02b39c1abf94ffb56feae#100e10decd1d2e5572b5dc4a36f3ca1b3a789fae_1341_1340)
      Toggle commit list
    • James R. @james commented May 15, 2020
      Owner

      That was an oversight, thanks. :V

      That was an oversight, thanks. :V
    Please register or sign in to reply
  • Monster Iestyn
    @MonsterIestyn started a discussion on an old version of the diff May 14, 2020
    Resolved by James R. May 15, 2020
    src/hms123311.c 0 → 100644
    Unable to load the diff.
    • Monster Iestyn @MonsterIestyn commented May 14, 2020
      Master

      Cough. We are obviously not SRB2Kart. Also another cough for the choice of filename. =V

      Cough. We are obviously not SRB2Kart. Also another cough for the choice of filename. =V
    • Monster Iestyn @MonsterIestyn commented May 14, 2020
      Master

      (the Kart thing also applies to some other new files, not pointing all these out individually as it'll look like I'm having a coughing fit)

      (the Kart thing also applies to some other new files, not pointing all these out individually as it'll look like I'm having a coughing fit)
    • LJ Sonic @LJSonic commented May 14, 2020
      Master

      httpmserv.c or httpms.c sound like fine names, I suppose

      `httpmserv.c` or `httpms.c` sound like fine names, I suppose
    • James R. @james

      changed this line in version 4 of the diff

      May 15, 2020

      changed this line in version 4 of the diff

      changed this line in [version 4 of the diff](https://git.magicalgirl.moe/STJr/SRB2/merge_requests/940/diffs?diff_id=5398&start_sha=0b9c20cc7086000548e02b39c1abf94ffb56feae#5ac2144846cda1016401a55fb4dcbb1c112552c9_1_0)
      Toggle commit list
    Please register or sign in to reply
  • James R. @james

    added 3 commits

    • fec88797 - Use Unlock_state here too
    • 57c7df74 - Rename hms123311.c to http-mserv.c
    • 2ec97b87 - This is SRB2

    Compare with previous version

    May 15, 2020

    added 3 commits

    • fec88797 - Use Unlock_state here too
    • 57c7df74 - Rename hms123311.c to http-mserv.c
    • 2ec97b87 - This is SRB2

    Compare with previous version

    added 3 commits <ul><li>fec88797 - Use Unlock_state here too</li><li>57c7df74 - Rename hms123311.c to http-mserv.c</li><li>2ec97b87 - This is SRB2</li></ul> [Compare with previous version](https://git.magicalgirl.moe/STJr/SRB2/merge_requests/940/diffs?diff_id=5398&start_sha=0b9c20cc7086000548e02b39c1abf94ffb56feae)
    Toggle commit list
  • Zachary McAlpin @choalover commented May 15, 2020

    Hopefully, this makes it into 2.2.5, because this really improves the performance of SRB2.

    Hopefully, this makes it into 2.2.5, because this really improves the performance of SRB2.
  • James R. @james

    marked as a Work In Progress

    May 15, 2020

    marked as a Work In Progress

    marked as a **Work In Progress**
    Toggle commit list
  • SteelT
    @SteelTitanium started a discussion on an old version of the diff May 15, 2020
    Resolved by James R. May 16, 2020
    src/CMakeLists.txt
    Unable to load the diff.
    • SteelT @SteelTitanium commented May 15, 2020
      Owner

      I'm sure you can see what's wrong here.

      I'm sure you can see what's wrong here.
    • James R. @james

      changed this line in version 5 of the diff

      May 15, 2020

      changed this line in version 5 of the diff

      changed this line in [version 5 of the diff](https://git.magicalgirl.moe/STJr/SRB2/merge_requests/940/diffs?diff_id=5411&start_sha=2ec97b87a0f690aa94634e50ea66aee01be0314c#631c8d07f5ea23b9a9f6c57f5389dfcf94bc33b7_436_436)
      Toggle commit list
    Please register or sign in to reply
  • James R. @james

    added 1 commit

    • 1ccca987 - Jart? What's that?

    Compare with previous version

    May 15, 2020

    added 1 commit

    • 1ccca987 - Jart? What's that?

    Compare with previous version

    added 1 commit <ul><li>1ccca987 - Jart? What&#39;s that?</li></ul> [Compare with previous version](https://git.magicalgirl.moe/STJr/SRB2/merge_requests/940/diffs?diff_id=5411&start_sha=2ec97b87a0f690aa94634e50ea66aee01be0314c)
    Toggle commit list
  • James R. @james

    closed

    Jun 16, 2020

    closed

    closed
    Toggle commit list
  • James R. @james

    reopened

    Jul 12, 2020

    reopened

    reopened
    Toggle commit list
  • James R. @james

    unmarked as a Work In Progress

    Jul 12, 2020

    unmarked as a Work In Progress

    unmarked as a **Work In Progress**
    Toggle commit list
  • James R. @james

    added 44 commits

    • 479bbeac...00ceca8c - 42 commits from branch next
    • 93615b07 - Merge remote-tracking branch 'origin/next' into http-mserv
    • f5c5ec00 - Use SRB2VERSION here...

    Compare with previous version

    Jul 13, 2020

    added 44 commits

    • 479bbeac...00ceca8c - 42 commits from branch next
    • 93615b07 - Merge remote-tracking branch 'origin/next' into http-mserv
    • f5c5ec00 - Use SRB2VERSION here...

    Compare with previous version

    added 44 commits <ul><li>479bbeac...00ceca8c - 42 commits from branch <code>next</code></li><li>93615b07 - Merge remote-tracking branch &#39;origin/next&#39; into http-mserv</li><li>f5c5ec00 - Use SRB2VERSION here...</li></ul> [Compare with previous version](https://git.magicalgirl.moe/STJr/SRB2/merge_requests/940/diffs?diff_id=5962&start_sha=479bbeacbe6a99f59094907c6fdcd696a4b237b6)
    Toggle commit list
  • James R. @james

    added 201 commits

    • f5c5ec00...cc677d2d - 200 commits from branch next
    • 54e44619 - Merge remote-tracking branch 'origin/next' into http-mserv

    Compare with previous version

    Aug 08, 2020

    added 201 commits

    • f5c5ec00...cc677d2d - 200 commits from branch next
    • 54e44619 - Merge remote-tracking branch 'origin/next' into http-mserv

    Compare with previous version

    added 201 commits <ul><li>f5c5ec00...cc677d2d - 200 commits from branch <code>next</code></li><li>54e44619 - Merge remote-tracking branch &#39;origin/next&#39; into http-mserv</li></ul> [Compare with previous version](https://git.magicalgirl.moe/STJr/SRB2/merge_requests/940/diffs?diff_id=6116&start_sha=f5c5ec000d5fd368e9679f435c91148a529d5f5f)
    Toggle commit list
  • James R. @james

    changed milestone to 2.2.7

    Aug 08, 2020

    changed milestone to 2.2.7

    changed milestone to %8
    Toggle commit list
  • James R. @james commented Aug 10, 2020
    Owner

    This has been in regular usage in the Kart community for the past three months. There may be some edge case bugs, and some have reported issues with Cloudflare, but that is a different issue.

    This has been in regular usage in the Kart community for the past three months. There may be some edge case bugs, and some have reported issues with Cloudflare, but that is a different issue.
  • James R. @james

    merged

    Aug 10, 2020

    merged

    merged
    Toggle commit list
  • James R. @james

    mentioned in commit 23f21811

    Aug 10, 2020

    mentioned in commit 23f21811

    mentioned in commit 23f218117cc89127e57689dcf69e3a98b2e06d2c
    Toggle commit list
  • James R. @james

    mentioned in merge request KartKrew/Kart-Public!193 (merged)

    Aug 10, 2020

    mentioned in merge request KartKrew/Kart-Public!193 (merged)

    mentioned in merge request KartKrew/Kart-Public!193
    Toggle commit list
  • Write
  • Preview
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment
Assignee
No assignee
Assign to
2.2.7
Milestone
2.2.7
Assign milestone
Time tracking
2
Labels
Feature Suggestion
Assign labels
  • View project labels
Reference: STJr/SRB2!940
×

Revert this merge request

This will create a new commit in order to revert the existing changes.

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.
×

Cherry-pick this merge request

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.