[Draft] Communication between server controllers

Moderator: NADEO

The_Big_Boo
Posts: 1026
Joined: 15 Jun 2010, 15:46

[Draft] Communication between server controllers

Post by The_Big_Boo »

Hi fellow developpers,

In ManiaLive 2.4, we introduced a first draft of a communication protocol between any system which is listening to dedicated callbacks. At the moment, we're using it only between the Dedicated Manager and ManiaLive for a simple purpose (checking if ManiaLive is running and stopping it) but we hope it will be extended in the future.

As it is a draft and it is not already widely used, the discussion about messages format is totally open. Anyone who wants to contribute is welcome, as long as there is a standard to keep compatibility between systems implementing it. The fact it is a draft also means it can be replaced by anything else for any reason.

First, we're using the Echo method so here are a few things to know before starting:
  • Messages are sent by calling Echo method on the dedicated
  • Message are received by the callback ManiaPlanet.Echo
  • Echo callback is always sent to everyone
  • Echo method and ManiaPlanet.Echo callback have 2 arguments but there are not in the same order (which most probably won't be fixed)

So now, here is how it works at the moment...

Format

Code: Select all

Echo(sender, message) to send a message
ManiaPlanet.Echo(message, sender) when receiving a message
As stated before, arguments are not in the same order in the method and in the callback. Each argument is a string.

Code: Select all

Message:
    (?|!)method[:recipient]
? is used for requests while ! is used for answers when receiving a request (an answer is not mandatory for every request)
method is a single word
:recipient is optional but used when you want a single system to take care of the message (meaning other systems must ignore it)


Identifiers

Senders and recipients have to be a string, preferably unique. As an example, we have at the moment "ManiaLive 2.4" and "DedicatedManager 1.5". It's not perfect as it doesn't ensure unicity (eg. if you have 2 instances of ManiaLive 2.4) but that's why it's only a draft.


Methods

census: ask systems to identify themselves.

Code: Select all

Sent request:
    Echo( DedicatedManager 1.5 , ?census )

Received answer:
    ManiaPlanet.Echo( !census:DedicatedManager 1.5 , ManiaLive 2.4 )
stop: ask a system (or all) to stop. No answer expected

Code: Select all

Sent request:
    Echo( DedicatedManager 1.5 , ?stop:ManiaLive 2.4 )


And that's all to know (I think). Feel free to comment, contribute or implement it in your controllers! :)
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
User avatar
vni
Posts: 20
Joined: 02 Oct 2011, 09:56

Re: [Draft] Communication between server controllers

Post by vni »

I'll implement that into the upcoming SMART-Version.
SMART - The smarter Servertool for Shootmania
Download SMART at http://smarttool.org
Changelog: here
Frequently Asked Questions: here

IRC: #smart @ QuakeNet (WebChat)
The_Big_Boo
Posts: 1026
Joined: 15 Jun 2010, 15:46

Re: [Draft] Communication between server controllers

Post by The_Big_Boo »

At the moment, the only use case is with the Dedicated Manager so it has nothing to do with something like FreeZone (and moreover, implementing it is absolutely not mandatory). As I want this to be a collaborative work, you can propose anything about it, as long as we all agree on the way it works.


About the Dedicated Manager, we're actually offering you to have the same possibilities than ManiaLive, ie. allowing users to configure, start and stop your controllers from the web interface. It's, in my opinion, a good thing for everybody:
- we can give a very complete tool to remotely administer servers
- people using this tool has more choices than just ManiaLive
- developpers can get their server controllers to be a bit promoted through it

But it requires much more work than just the Echo thing and is a bit trickier. At first we thought to let you do (almost) all the work to add these features in the Dedicated Manager with a quick documentation on how it's done for ManiaLive and then integrate it in future releases. However, it's a bit too soon as:
- it won't be very clean as the integration needs to modify too many files
- you're probably not used to the way we're coding
So it actually needs a small refactoring to make all of this easier.


Edit: By at least implementing the Echo thing, if people start your controller the "normal" way they will be able to see if it's running in the Dedicated Manager and stop it. Which is, I think, already a nice improvement.
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
User avatar
vni
Posts: 20
Joined: 02 Oct 2011, 09:56

Re: [Draft] Communication between server controllers

Post by vni »

It was added for the upcoming SMART version (available from version 0.4.6)

I also added ?reboot:SMART vX.XX

If you want me to add more hooks, tell me.
SMART - The smarter Servertool for Shootmania
Download SMART at http://smarttool.org
Changelog: here
Frequently Asked Questions: here

IRC: #smart @ QuakeNet (WebChat)
User avatar
Slig
Posts: 637
Joined: 15 Jun 2010, 11:52
Location: TraXicoLand

Re: [Draft] Communication between server controllers

Post by Slig »

I would suggest methods (you can decide the names, the goal is to have all use the same ones) that web managers and controllers would send to indicate that it has changed some value(s) in ServerOptions, GameInfos, Maps, and Guest/Ban/Black/Ignore lists, so that others web managers/controllers would know it, then eventually get those values again to have them up to date.
User avatar
fng_thatoneguy
Posts: 722
Joined: 05 Jan 2011, 18:06
Location: That One Place
Contact:

Re: [Draft] Communication between server controllers

Post by fng_thatoneguy »

Slig wrote:I would suggest methods (you can decide the names, the goal is to have all use the same ones) that web managers and controllers would send to indicate that it has changed some value(s) in ServerOptions, GameInfos, Maps, and Guest/Ban/Black/Ignore lists, so that others web managers/controllers would know it, then eventually get those values again to have them up to date.
+1

This would follow a model similar to that of CCOW (Clinical Context Object Workgroup) in the medical industry; which allows disparate apps to sync up in relation to a given patient. It provides a central context which keeps track of all changes and the context notifies everything subscribed to it when changes have been made; then leaves it up to the app to request for the changes when it is ready to.

I think this would be an awesome feature to implement. And having a standard messaging format specified to go with it might be nice too (CCOW sits on top of the HL7 messaging system used in the medical industry.)
Image
User avatar
kapsubm
Posts: 238
Joined: 16 Aug 2011, 23:38
Location: Vienna, Austria
Contact:

Re: [Draft] Communication between server controllers

Post by kapsubm »

would it be possible to implement a method which can take control over the "#Setting " Vars in Various Serverside gamescripts ?

what protocoll does it use ? (UDP ? )
Join CSeSports Platform Server

[url=maniaplanet://:maniaplanet://#join=cs.esports@Platform@nadeolive]CS.eSportsPlatform 0-60K With Fox Control[/url]
[url=maniaplanet://:maniaplanet://#join=csesports2@SMStorm]CS.eSports SM Royal 0-60 k 40 players With Smart Servercontroller[/url]
[url=maniaplanet://:maniaplanet://#join=cs.esports1@TMCanyon]CS.eSports Stunts in Canyon with Smart Servercontroller[/url]
User avatar
Slig
Posts: 637
Joined: 15 Jun 2010, 11:52
Location: TraXicoLand

Re: [Draft] Communication between server controllers

Post by Slig »

kapsubm wrote:would it be possible to implement a method which can take control over the "#Setting " Vars in Various Serverside gamescripts ?
What for ? The discussion here is about communication between server managers/controllers, and each of them has already to possibility to control the #Setting vars.

Btw the #settings values can be added to the list of the changes that managers/controllers could announce to others.
User avatar
kapsubm
Posts: 238
Joined: 16 Aug 2011, 23:38
Location: Vienna, Austria
Contact:

Re: [Draft] Communication between server controllers

Post by kapsubm »

Slig wrote:
kapsubm wrote:would it be possible to implement a method which can take control over the "#Setting " Vars in Various Serverside gamescripts ?
What for ? The discussion here is about communication between server managers/controllers, and each of them has already to possibility to control the #Setting vars.

Btw the #settings values can be added to the list of the changes that managers/controllers could announce to others.
any system which is listening to dedicated callbacks.
to change script settings from remoteside but you are right, thats the thing of the controler of course.
that was a missunderstanding from my side.
Join CSeSports Platform Server

[url=maniaplanet://:maniaplanet://#join=cs.esports@Platform@nadeolive]CS.eSportsPlatform 0-60K With Fox Control[/url]
[url=maniaplanet://:maniaplanet://#join=csesports2@SMStorm]CS.eSports SM Royal 0-60 k 40 players With Smart Servercontroller[/url]
[url=maniaplanet://:maniaplanet://#join=cs.esports1@TMCanyon]CS.eSports Stunts in Canyon with Smart Servercontroller[/url]
Post Reply

Return to “Dedicated Server”

Who is online

Users browsing this forum: No registered users and 1 guest