XServer
Snapshot 2.0.5 now available.
Snapshot Version 3.0.0 is still in development! Please use 2.0.5!
MCStats
http://mcstats.org/plugin/XServerProxy
http://mcstats.org/plugin/XServer
Description
XServer is a helper for other plugins. It closes the communication gap between servers.
With this plugin it's simple to send byte arrays to other servers and receive them.
It's usefull if you use plugins on multiple servers that you want to communicate via sockets.
You, the developer, no more have to think about creating sockets and keeping the connection open.
XServer handles all complicated stuff and offers a nice solution to send messages.
It automatically queues outgoing messages and handles incoming messages with an own EventHandler.
Your servers are protected via passwords and are managed via MySql.
There are currently 2 Versions of XServer: one for Bukkit and one for BungeeCord.
XServer has a Core-Module and a API, so these are released in the future, so not only on Bukkit and on BungeeCord can be run XServer.
Setup - Preparation / Configuration
On your MySql-Server create a new Table with:
Then add your servers to the table.Code (Text):
CREATE TABLE IF NOT EXISTS `xserver` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`NAME` varchar(64) COLLATE utf8_bin NOT NULL,
`ADRESS` varchar(128) COLLATE utf8_bin NOT NULL,
`PW` varchar(20) COLLATE utf8_bin NOT NULL,
PRIMARY KEY (`ID`),
UNIQUE KEY `ID` (`ID`),
UNIQUE KEY `ADRESS` (`ADRESS`),
KEY `ID_2` (`ID`)
) DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
"NAME" is your servers name, this name identifies your server and has to be unique!
Remember "ADRESS" is like "host: port" (e.g. "localhost:19999", or "127.0.0.1:19999").
PW is the password you want, that other servers need to connect to this server.
Setup - Bukkit
* Copy "XServer-Bukkit.jar" to your plugin folder.
* Run once the server.
* Goto the xserver plugin folder.
* Open and edit "config.yml".
Default values:Code (Text):
useMotdForServername: false
servername: theNameYouCalledThisServer
mysql:
User: username
Pass: password
Data: database
Host: localhost
Port: 3306
TableXServers: xservers
TableXGroups: xgroups
TableXServersGroups: xservers_xgroups
- Port: 3306
- TableXServers: xservers
- TableXGroups: xgroups
- TableXServersGroups: xservers_xgroups
Setup - BungeeCord
The setup on a BungeeCord Proxy Server is the same as the Bukkit Server.
How to use XServer
See: Your First Plugin
Commands
The commands are currently only available in the Bukkit Version.
/xserver <subcommand>
The subcommands are:
* package [Servername] : Shows package speed to all servers, or the one as given.
* ping [Servername] : Ping all servers, or the one as given.
* reconnect [ s] : Reconnects all servers. It accepts one flag (s) for softly reconnect only those not connected servers.
* reload : Reloads the server list and reconnects.
* status : Shows the connection status to the servers.
*stresstest [times = 10] [targets = all] [async = false] : Stress test for XServer. Targets can be: (all|servernames splitted by ";")
Commands permission is "xserver".
Speed
Trying to force XServer to its knees, i fired on one of 43 Bukkit and 2 BungeeCord Servers running all XServer, the stresstest command with the factor 1000 and still got an average response time of 80-90ms. (The servers are distributed on 4 Root-Servers)
These are 45000 Messages of Strings with a lenght of 32, that are sended and then returned.
Meaning an Incoming and Outgoing traffic of > 64MBit/s on this particular Bukkit server.
Changelog
Snapshot 2.05
* Added Metrics XServer (Bukkit), XServerProxy (BungeeCord)
* Code refactored
Snapshot 2.04
* Fixed rare issue that on BungeeCord XServer freezes on shutdown
* Added debug config option for more information (default disabled)
Snapshot 2.03
* Some minor fixes
Snapshot 2.02
* Groups of servers
* Automatic Installer
* Parent pom file
* Minor optimizations
Snapshot 2.0.1
* Renaming packages from "com.mickare..." to "de.mickare..."
Version 2.0.0
* Complete Rework!!!
* New EventBus
* Usage of java's socket duplex functionality (single connections, no rebuilding of socket connections)
* Faster package sending
* Ping
* Package statistics and stresstest
* Fully and only MySQL configuration
* Core and API divided from Bukkit/Bungeecord Code, so Core-Modul can be used in an own java application.
Version 1.0.3
* Multiple Disabling Message Fix... when having failed in config.
Version 1.0.2
* Bug Fix in Disabling Plugin
* Fix Exception Output to Console.
Version 1.0.1
* EventHandler optimization.
Version 1.0.0
* First release to public.
History
This plugin was developed for use in Server Clusters.
Original it was a Bukkit Plugin for BungeeCord Proxy use, but then was expanded and splitted from BungeeCord, because of some *near* real-time demands.
Downloads
XServer on the repo
Plugins that uses XComServer
XComServerCommand - with open source code that shows how you can use XComServer
Source
https://github.com/mickare/xserver
Maven
http://nexus.spacier.de/content/repositories/rs-public/
Licence
The MIT License (MIT)
Copyright (c) 2013 mickare
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

XServer Version 2.0.5
Send via XServer messages to other servers
Recent Updates
- Nexus Repository moved! Nov 3, 2015
- Groups & automatic - Tableinstallation Oct 22, 2014
- Download Link to Repository Apr 6, 2014