Dedicated Server API Client Communication

Discuss the Dedicated Server Tools developed by Nadeo Live such as ManiaLive, Trust Circles, Dedicated Manager, Competition Manager and Lobbies

Moderator: NADEO

User avatar
steeffeen
Translator
Translator
Posts: 2471
Joined: 14 Oct 2012, 16:22
Location: Germany

Re: Dedicated Server API Client Communication

Post by steeffeen » 19 Aug 2014, 12:38

w1lla wrote:where it seems to be based on everyplayerconnect aswell as certain callbacks.
i don't really understand what you want to say, sorry
    Game Mode and Title Pack Creator, Developer, ShootMania-Player & more

    ManiaControl, FancyManiaLinks

    User avatar
    w1lla
    Posts: 2359
    Joined: 15 Jun 2010, 11:09
    Location: Netherlands
    Contact:

    Re: Dedicated Server API Client Communication

    Post by w1lla » 19 Aug 2014, 12:45

    based on this:

    Code: Select all

    [13-Jul-2014 15:25:29 UTC] [ManiaControl EXCEPTION]: Connection timed out while reading header
    Class: Maniaplanet\DedicatedServer\Xmlrpc\TransportException
    Trace:
    #0: Maniaplanet\DedicatedServer\Xmlrpc\GbxRemote->onIoFailure(string(while reading header)) in File core/Libs/Maniaplanet/DedicatedServer/Xmlrpc/GbxRemote.php on Line 225
    #1: Maniaplanet\DedicatedServer\Xmlrpc\GbxRemote->readMessage() in File core/Libs/Maniaplanet/DedicatedServer/Xmlrpc/GbxRemote.php on Line 200
    #2: Maniaplanet\DedicatedServer\Xmlrpc\GbxRemote->flush(boolean(1)) in File core/Libs/Maniaplanet/DedicatedServer/Xmlrpc/GbxRemote.php on Line 130
    #3: Maniaplanet\DedicatedServer\Xmlrpc\GbxRemote->query(string(GetMaxPlayers), array()) in File core/Libs/Maniaplanet/DedicatedServer/Connection.php on Line 153
    #4: Maniaplanet\DedicatedServer\Connection->execute(string(GetMaxPlayers), array(), boolean()) in File core/Libs/Maniaplanet/DedicatedServer/Connection.php on Line 1591
    #5: Maniaplanet\DedicatedServer\Connection->getMaxPlayers() in File plugins/MCTeam/WidgetPlugin.php on Line 314
    #6: MCTeam\WidgetPlugin->displayServerInfoWidget() in File plugins/MCTeam/WidgetPlugin.php on Line 534
    #7: MCTeam\WidgetPlugin->updateWidgets(object(ManiaControl\Players\Player))
    #8: call_user_func_array(array(object(MCTeam\WidgetPlugin), string(updateWidgets)), array(object(ManiaControl\Players\Player))...) in File core/Callbacks/Listening.php on Line 62
    #9: ManiaControl\Callbacks\Listening->triggerCallbackWithParams(array(object(ManiaControl\Players\Player))) in File core/Callbacks/CallbackManager.php on Line 289
    ...
    I think you might have slight issues in the part of getting maxPlayers or on PlayerConnect as where the player information gets updated.
    TM² Info
    SM Info
    QM Info

    OS: Windows 10 x64 Professional
    MB: MSI 970A-G46
    Processor: AMD FX-6300 3500 mHz
    RAM Memory: 16 GB DDR3
    Video: SAPPHIRE DUAL-X R9 280X 3GB GDDR5
    KB: Logitech G510s
    Mouse: Logitech G300s
    Mode Creation
    ManiaScript Docs

    User avatar
    steeffeen
    Translator
    Translator
    Posts: 2471
    Joined: 14 Oct 2012, 16:22
    Location: Germany

    Re: Dedicated Server API Client Communication

    Post by steeffeen » 19 Aug 2014, 12:52

    thanks

    well we have pretty much no idea what we should change or improve because we are basically only executing calls and callbacks
    i don't think we are doing anything special
    and the spots where it happens aren't special in any way either, at least that seems to be the case

    (to make that clear: i'm NOT saying "we are perfect and there is no possibility of an error on our side", we just can't think of a possible error ^^)
      Game Mode and Title Pack Creator, Developer, ShootMania-Player & more

      ManiaControl, FancyManiaLinks

      kremsy
      Posts: 1712
      Joined: 21 Jul 2011, 09:51

      Re: Dedicated Server API Client Communication

      Post by kremsy » 30 Nov 2014, 10:02

      We still have this issue from time to time, but yeah don't really have time for more investigation at the moment.



      I have another idea of improving the Communication API, how about using SPL Features instead of Arrays during the whole class, especially on the callbacks-buffer. The SPL Features are way more efficient and less memory consuming as the other ones. http://css.dzone.com/news/new-spl-features-php-53

      It's just an idea, dunno if it would improve things that easy anyway.
      Lukas alias Kremsy, Developer of:
      ManiaControl: http://www.maniacontrol.com
      ParagonLeague: http://league.paragon-esports.com
      MPAseco: http://mpaseco.org
      ManiaViewer: http://www.maniaviewer.com

      User avatar
      The_Big_Boo
      Posts: 1041
      Joined: 15 Jun 2010, 15:46

      Re: Dedicated Server API Client Communication

      Post by The_Big_Boo » 30 Nov 2014, 11:08

      Though I agree Spl data structures are really great, the performance gain doesn't worth it in this case. As the main loop is fetching callbacks 60 times per second in ManiaLive and even more in ManiaControl, the buffer is often empty and rarely longer than a few callbacks. A SplQueue begins to be really more efficient when working with larger data, like hundreds of elements.
      OS: Win 7 Pro x64
      RAM: 2x4GB Corsair @ 1600MHz
      CPU: Intel i5 760 @ 3.6GHz
      Mobo: Asus P7P55D-E
      GPU: NVidia GTX 760 2GB
      HDD: WD Black 1TB
      Sound: VIA VT1828S (onboard)
      Peripherals: Razer DeathAdder - Razer DeathStalker - Logitech F310

      kremsy
      Posts: 1712
      Joined: 21 Jul 2011, 09:51

      Re: Dedicated Server API Client Communication

      Post by kremsy » 03 Dec 2014, 09:35

      The_Big_Boo wrote:Though I agree Spl data structures are really great, the performance gain doesn't worth it in this case. As the main loop is fetching callbacks 60 times per second in ManiaLive and even more in ManiaControl, the buffer is often empty and rarely longer than a few callbacks. A SplQueue begins to be really more efficient when working with larger data, like hundreds of elements.
      I agree, didn't thought that far, just thought that it probably saves ressources on creating and clearinf the buffer.
      Lukas alias Kremsy, Developer of:
      ManiaControl: http://www.maniacontrol.com
      ParagonLeague: http://league.paragon-esports.com
      MPAseco: http://mpaseco.org
      ManiaViewer: http://www.maniaviewer.com

      kremsy
      Posts: 1712
      Joined: 21 Jul 2011, 09:51

      Re: Dedicated Server API Client Communication

      Post by kremsy » 15 Jan 2015, 12:37

      An exception directly on an Maprestart:

      Code: Select all

      [15-Jan-2015 11:30:23 UTC] [ManiaControl EXCEPTION]: Connection timed out while reading header
      Class: Maniaplanet\DedicatedServer\Xmlrpc\TransportException
      Trace:
      #0: Maniaplanet\DedicatedServer\Xmlrpc\GbxRemote->onIoFailure(string(while reading header)) in File libs/Maniaplanet/DedicatedServer/Xmlrpc/GbxRemote.php on Line 225
      #1: Maniaplanet\DedicatedServer\Xmlrpc\GbxRemote->readMessage() in File libs/Maniaplanet/DedicatedServer/Xmlrpc/GbxRemote.php on Line 200
      #2: Maniaplanet\DedicatedServer\Xmlrpc\GbxRemote->flush(boolean(1)) in File libs/Maniaplanet/DedicatedServer/Xmlrpc/GbxRemote.php on Line 130
      #3: Maniaplanet\DedicatedServer\Xmlrpc\GbxRemote->query(string(GetServerPassword), array()) in File libs/Maniaplanet/DedicatedServer/Connection.php on Line 153
      #4: Maniaplanet\DedicatedServer\Connection->execute(string(GetServerPassword), array(), boolean()) in File libs/Maniaplanet/DedicatedServer/Connection.php on Line 1538
      #5: Maniaplanet\DedicatedServer\Connection->getServerPassword() in File plugins/TheM/QueuePlugin.php on Line 523
      #6: TheM\QueuePlugin->handleEverySecond(double(1421321418.8591))
      #7: call_user_func_array(array(object(TheM\QueuePlugin), string(handleEverySecond)), array(double(1421321418.8591))) in File core/Callbacks/Listening.php on Line 62
      #8: ManiaControl\Callbacks\Listening->triggerCallbackWithParams(array(double(1421321418.8591))) in File core/Callbacks/Listening.php on Line 53
      #9: ManiaControl\Callbacks\Listening->triggerCallback(double(1421321418.8591)) in File core/Callbacks/TimerManager.php on Line 130
      #10: ManiaControl\Callbacks\TimerManager->manageTimings() in File core/Callbacks/CallbackManager.php on Line 213
      #11: ManiaControl\Callbacks\CallbackManager->manageCallbacks() in File core/ManiaControl.php on Line 628
      #12: ManiaControl\ManiaControl->loop() in File core/ManiaControl.php on Line 541
      #13: ManiaControl\ManiaControl->run() in File ManiaControl.php on Line 47
      Lukas alias Kremsy, Developer of:
      ManiaControl: http://www.maniacontrol.com
      ParagonLeague: http://league.paragon-esports.com
      MPAseco: http://mpaseco.org
      ManiaViewer: http://www.maniaviewer.com

      kremsy
      Posts: 1712
      Joined: 21 Jul 2011, 09:51

      Re: Dedicated Server API Client Communication

      Post by kremsy » 26 Feb 2015, 12:12

      We found out that most of the crashes happen on servers with the Speedball Titlepack, on some servers like the COP Speedball, this kind of crash happens after every Mapchange at the begin of the map.
      Lukas alias Kremsy, Developer of:
      ManiaControl: http://www.maniacontrol.com
      ParagonLeague: http://league.paragon-esports.com
      MPAseco: http://mpaseco.org
      ManiaViewer: http://www.maniaviewer.com

      oliverde8
      Posts: 1279
      Joined: 16 Jun 2010, 07:33
      Location: in a Blue Box

      Re: Dedicated Server API Client Communication

      Post by oliverde8 » 06 Feb 2016, 15:14

      Hi I just started to check out eXpansion with PHP7 and well it doesen't look good.

      The issue is with special characters, I tried the fallowing code :

      Code: Select all

      require __DIR__ . '/vendor/autoload.php';
      
      $connection =  Maniaplanet\DedicatedServer\Connection::factory('127.0.0.1', 5005, 5, 'SuperAdmin', 'SuperAdmin');
      
      $connection->chatSendServerMessage('Héllo £world');
      And in maniaplanet I don't see the "é" and the "£" properly.

      For information I tried the latest version here : https://github.com/NewboO/dedicated-server-api

      I am running with PHP7 :

      Code: Select all

      PHP 7.0.3 (cli) (built: Feb  2 2016 14:41:10) ( NTS )
      Copyright (c) 1997-2016 The PHP Group
      Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
      I also checked with the original dedicated server : https://github.com/maniaplanet/dedicated-server-api

      and have the same issue with the original dedicated server api as well.

      Not sure what causes it because it works fine for other applications so I don't think my PHP7 installation is causing it.
      Image
      Developper for The next generation, Clean and Powerfull controller eXpansion for your SM & TM server . Working on eXpansion² with full MP4 support and many other awesome features...

      User avatar
      The_Big_Boo
      Posts: 1041
      Joined: 15 Jun 2010, 15:46

      Re: Dedicated Server API Client Communication

      Post by The_Big_Boo » 06 Feb 2016, 21:47

      First thing first, my fork has been merged a few months ago (Jun 22, 2015 more precisely) so there's no reason to still rely on my repository ;)

      Anyway, are you sure your file is UTF-8 encoded? Depending on your IDE/text editor, it may default to another encoding so that's the first thing you should check.
      OS: Win 7 Pro x64
      RAM: 2x4GB Corsair @ 1600MHz
      CPU: Intel i5 760 @ 3.6GHz
      Mobo: Asus P7P55D-E
      GPU: NVidia GTX 760 2GB
      HDD: WD Black 1TB
      Sound: VIA VT1828S (onboard)
      Peripherals: Razer DeathAdder - Razer DeathStalker - Logitech F310

      Post Reply

      Return to “Dedicated Server Tools”

      Who is online

      Users browsing this forum: No registered users and 3 guests