• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • If you're using Gesior 2012 or MyAAC, please review this thread for information about a serious security vulnerability and a fix.

Technical presentation of Cipsofts software architecture of Tibia (2011)

Worr

Veteran OT User
Joined
Jan 23, 2011
Messages
1,449
Reaction score
369
Location
Sweden
I found this on Reddit and thought it might be interesting to some. It has a chart over all the components including stuff like game servers, login servers, database, query managers and each node has some bullet points with reasoning, pros/cons, lessons learned and so on.
 

Attachments

  • Matthias_Rudy_ProgrammingTrack_InsideTibiaArchitecture.pdf
    7.3 MB · Views: 141 · VirusTotal

Yamaken

Pro OpenTibia Developer
Joined
Jul 27, 2013
Messages
534
Solutions
4
Reaction score
428
Funny enough, its the same architecture found in the leaked files (2005). Once a while they have some major bugs (with rollbacks) that imply the architecture is still the same in general.
 
Last edited:

Antony Cordeiro

Well-Known Member
Joined
May 26, 2017
Messages
321
Reaction score
99
I found this on Reddit and thought it might be interesting to some. It has a chart over all the components including stuff like game servers, login servers, database, query managers and each node has some bullet points with reasoning, pros/cons, lessons learned and so on.
its not accurate to post detailed Business information without their consent unless it was leaked.
I dont think you are gonna get sued by Cipsoft for that but take it into account
 

Danger II

tibiara.com
Premium User
Joined
Nov 21, 2012
Messages
1,642
Solutions
12
Reaction score
549
Location
Germany
its not accurate to post detailed Business information without their consent unless it was leaked.
I dont think you are gonna get sued by Cipsoft for that but take it into account
It morelike seems to be something like a presentation, as on the last page of the pdf document it says 'gamescom'.
 

Boy67

Veteran OT User
Joined
Jul 4, 2007
Messages
468
Solutions
26
Reaction score
371
its not accurate to post detailed Business information without their consent unless it was leaked.
I dont think you are gonna get sued by Cipsoft for that but take it into account

Yes, Cipsoft are well known to sue people for stealing stuff........
 

Ezzz

Developer of Nostalrius and The Violet Project
Joined
Feb 26, 2010
Messages
1,856
Solutions
3
Reaction score
757
Location
Spain, Europe
What I enjoyed reading was the querymanager part, since I am making one for a big project and under TVP, it makes sense and it actually makes it easier for multi-world since SQL dies in such 150+ latencies.
 

Forby

Advanced OT User
Joined
Jul 24, 2011
Messages
125
Reaction score
249
Location
The Lost Lands
Very interesting! Thanks for sharing. Does anybody know if TFS uses async I/O too? So when a player sends a parcel to another player that is offline, does the server block and wait for the MySQL query to update the player file? From the src it doesn't look like it but I'm not into C++.
 

Gesior.pl

Mega Noob&LOL 2012
Senator
Premium User
Joined
Sep 18, 2007
Messages
2,776
Solutions
91
Reaction score
2,811
Location
Poland
GitHub
gesior
Very interesting! Thanks for sharing. Does anybody know if TFS uses async I/O too? So when a player sends a parcel to another player that is offline, does the server block and wait for the MySQL query to update the player file? From the src it doesn't look like it but I'm not into C++.
It's not. Sending parcel freezes server for save time.

I made async version and posted on github 2 or 3 years ago.
It loaded characters in sync, but you could enable RAM cache and pre-load all characters on server start.
Save of characters was async and with X seconds threshold, so spamming parcels would block save of given character and not overload database.
It could be better, if it does not copy all items in RAM every load/save, just move them between 'cache' and 'in game' states, but that would require a lot of changes in items management (ex. decay system).
 

Xikini

I whore myself out for likes
Senator
Joined
Nov 17, 2010
Messages
6,245
Solutions
545
Reaction score
4,489
It's not. Sending parcel freezes server for save time.

I made async version and posted on github 2 or 3 years ago.
It loaded characters in sync, but you could enable RAM cache and pre-load all characters on server start.
Save of characters was async and with X seconds threshold, so spamming parcels would block save of given character and not overload database.
It could be better, if it does not copy all items in RAM every load/save, just move them between 'cache' and 'in game' states, but that would require a lot of changes in items management (ex. decay system).
Makes sense.

A good couple of years ago (5-7?), there was a parcel/mail exploit a guild was using to bog down cipsoft's server's until they crashed, and about 50 people +- got severe bans.
 

Forby

Advanced OT User
Joined
Jul 24, 2011
Messages
125
Reaction score
249
Location
The Lost Lands
It's not. Sending parcel freezes server for save time.

I made async version and posted on github 2 or 3 years ago.
It loaded characters in sync, but you could enable RAM cache and pre-load all characters on server start.
Save of characters was async and with X seconds threshold, so spamming parcels would block save of given character and not overload database.
It could be better, if it does not copy all items in RAM every load/save, just move them between 'cache' and 'in game' states, but that would require a lot of changes in items management (ex. decay system).

Great! Thanks for the answer. I suppose this is the easiest solution because with async I/O you're eventually going to run into race conditions that need to be solved. Like a playing logging in just when they are receiving a parcel; copying over the old state from disk -- making the parcel effectively go lost.
 

Ezzz

Developer of Nostalrius and The Violet Project
Joined
Feb 26, 2010
Messages
1,856
Solutions
3
Reaction score
757
Location
Spain, Europe
Great! Thanks for the answer. I suppose this is the easiest solution because with async I/O you're eventually going to run into race conditions that need to be solved. Like a playing logging in just when they are receiving a parcel; copying over the old state from disk -- making the parcel effectively go lost.
At the moment, even in latest TFS, sending a parcel with over 20k items freezes the server, and at times crashes it, even having a house with many many items and doing !leavehouse, freezes the server, this bug has been unresolved in the public repo, however, custom servers fix this by setting a limit to the depot unlike Tibia where there is no limit for situations like this.
 

Ramon Bernardo

Well-Known Member
TFS Developer
Joined
Oct 7, 2018
Messages
137
Solutions
4
Reaction score
88
I found this on Reddit and thought it might be interesting to some. It has a chart over all the components including stuff like game servers, login servers, database, query managers and each node has some bullet points with reasoning, pros/cons, lessons learned and so on.
Liked it!
It's funny to look at protocolgame/server/connection and see XTEA and RSA being used, as described in the pdf
 
Top