View Full Version : Database synchronization
moonphoenix
04-20-2003, 04:48 AM
I know this has been covered several times in the past but did anybody ever figure out a way to implement a reliable way of syncing a mysql database?
When ever I've tried, I've found sync'ing is'nt instant enough and zoneing between servers causes characters to revert to earlier saves?
Bardboy
04-20-2003, 05:46 AM
Sorry, I'm not sure what you mean. Do you mean replication of the database between two or more servers? This is an interesting topic and I would like to see more discussion along these lines.
I'm also interested in ways of setting up a 'virtual server' . Anything in the way of remote administration tools for the emu would be of interest to me.
moonphoenix
04-20-2003, 07:57 AM
Yes I mean between 2 or more servers located at different places.
For remote admin of my server I use a terminal server session for direct access (www.RealVnc.com is a good alternative for ppl without dedicated servers, but eats loads of processor time)
PHPMyAdmin for working with the database (http://www.phpmyadmin.net/ - At least basic experiance with setting up php and a webserver required)
And a couple of custom batch files which automatically restart crashed zones (with a 1 minute delay, restarting without a delay causes an authentication problem with the world server)
Edgar1898
04-21-2003, 04:36 AM
Yes- My server and Mads server (when its up) uses replication to run one game server. This method could be used to create a stable server with an unlimited number of users (provided there are enough ppl hosting). After the first night we havent had any trouble with the syncing of data. You will need to set it up by loosely following the guide on mysql.com. I say loosely because the guide is wrong in a few places.
a_Guest03
04-21-2003, 04:41 AM
Lethal, that sounds very promising!
Edgar1898
04-21-2003, 04:48 AM
heh it is :P There are a few issues though. Mysql doesnt support multiple masters, so if you want to create a very large server with 3 or more hosts, you will need to do one of the following:
1. Set it up in a series (kinda like some Christmas tree lights). Problem with this is that, just like some Christmas tree lights, if you remove a bulb, or a server in this case, the replication will stop on the distant servers.
2. Trick mysql into using multiple masters by running multiple instances of it. This will create other problems. The mysql dev team has been promising to add fail-safe replication (if the master fails, it will try another master) since version 4.0, then 4.1, then 5.1. Until they implement that, its going to be a challenge to setup replication for more than 2 servers if the servers could go down at any time.
dunce
04-21-2003, 09:11 AM
I can probably guess as to why MySQL was chosen for this project, but is there any plan to revamp this project so you can plug any database into it?
Trumpcard
04-21-2003, 10:27 AM
No plans as of right now..
Wouldnt be too tough, but someone would need to come up with a good generic odbc api to use, and sprinkle #ifdefs all thoughout the code wherever they encounter a mysql interface call...
dunce
04-22-2003, 03:18 AM
Thank you. I am not a programmer and really don't know what it would take. I just thought that it might make sense to offer that option. If one were to add this support. Would it be through some library call like this? <sorry for my ignorance>:
libodbc++
libodbc++ is a C++ class library for accessing SQL databases. It is designed with standards in mind, so it provides a subset of the well-known JDBC 2.0(tm) and runs on top of ODBC. It is distributed under the LGPL.
The library has shown to compile and work on Linux, FreeBSD and win32 platforms. Any environment with a reasonable compiler, standard C++ library and ODBC Driver Manager should do.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.