Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (754)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (842)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Saving characters online.  (Read 3704 times)
0 Members and 1 Guest are viewing this topic.
Offline Jakibah

Junior Devvie

Medals: 2
Exp: 5 years

« Posted 2017-04-08 08:27:39 »

Today I woke up with a very interesting idea. I was asking myself how do big MMORPG`s like World of Warcraft, Black Desert, Archage etc. save their player characters. Do they save them in some type of Mysql thing? (Probably not because they have to save all your items, stats, achievements, etc.) Or is it in some kind of file on the server computer?
Offline Catharsis

JGO Ninja

Medals: 73
Projects: 1
Exp: 21 years

TyphonRT rocks!

« Reply #1 - Posted 2017-04-08 10:23:03 »

**Disclaimer... I've never worked on a MMORPG.**

MySQL / SQL in general is waning in usage in the game industry from what I gather.

I have been spending a fair amount of time getting up to speed on modern server programming / containers. I'm just going to throw out thoughts as things are likely very dependent on the type of data that needs to be saved and amount of read vs write concerns when it comes to choice of particular solutions and accompanying trade-offs.

First off these days everything should be done with containers (Docker / rkt, etc.) and some sort of orchestration platform (I've chosen Kubernetes as there is a lot of momentum). I'd like to use rkt, but it's a bit light on tooling still as it's more framework than platform like Docker. Self hosted in the cloud or one could use Google Container Engine and other services of this nature.

If you're going Java on the server side two architectures worth looking at are Scala / Akka / actors (probably light on tooling for MMO applications) and the other I'd look at is Aeron. If using Aeron I'd also combine that with the Disruptor. Between Akka or Aeron / Disruptor the goal is to setup pipelines that are event driven. You might for instance use an in memory DB for some things, but to make sure things can be brought back from some failure you'd also journal / save all of the events flowing through the system, so that state can be rebuilt from periodic snapshots (also useful for debugging). Periodically (say twice a minute) for character players the current state of the in memory DB would be punted out likely over the wire to another container / DB for longer term storage or perhaps Amazon S3 or other cloud storage. Perhaps there is no in memory DB at all though I'd gather all of the really big MMOs have some sort of in memory DB as part of the pipeline. For DBs in general I'd look at Riak or Couchbase, but there are many options here. For high throughput everything stays as a binary blob; IE JSON / strings or XML is not desirable in high throughput pipelines, but in others it's fine. I gather in general there is some NoSQL going on for quite a bit of the data modeling / storage though I wouldn't be surprised if Blizzard or any other large game company rolls there own DB versus using off the shelf options. Here is a blog article on Pokemon Go that indicates Couchbase was used for certain parts of the architecture. From there I suppose it really depends on what your game back-end has to do. Perhaps Apache Spark is involved at some point for data analytics. No matter what though analytics at some level needs to be involved to detect problems, scaling issues, and any failures.

I'm sure you've heard about microservices. I guess the nice thing or the bane for documentation / maintenance is theoretically any particular one could be the best stack for the problem at hand including choice of language / DB which would only store the data specific to the microservice (say lobbies / chatting for a game / or user profiles). Instead of a more monolithic server things are broken down as separate stacks for very particular and limited purposes.

I'd suggest looking up articles on Pokemon Go architecture for a game that had to scale rather quickly. There should be plenty out there.

Check out the TyphonRT Video Suite:

Founder & Principal Architect; TyphonRT, Inc.
Offline Jakibah

Junior Devvie

Medals: 2
Exp: 5 years

« Reply #2 - Posted 2017-04-08 12:21:06 »

Thanks for this really nice answer!!!
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline jonjava
« Reply #3 - Posted 2017-04-08 17:37:39 »

WoW uses Oracle RDBMS which is an SQL like thing. Relational databases aren't going anywhere - pretty much every MMO should be built around one.

SQL in general is not waning in usage. There are many flavours of it.

NoSQL databases have their place but won't probably ever compete with relational databases.

Use what make sense. A lot of big projects use many databases for different purposes. Redis is quite popular as a cache for example.

Big messy projects like an MMO will (should) definitely use a relational/SQL database. NoSQL databases don't even come close for those kinds of use cases. At least not yet, probably never.

My favourites in these categories are Postgres (SQL), MongoDB (NoSQL) and Redis (message broker, cache)

Pages: [1]
  ignore  |  Print  

DesertCoockie (33 views)
2018-05-13 18:23:11

nelsongames (75 views)
2018-04-24 18:15:36

nelsongames (70 views)
2018-04-24 18:14:32

ivj94 (752 views)
2018-03-24 14:47:39

ivj94 (82 views)
2018-03-24 14:46:31

ivj94 (622 views)
2018-03-24 14:43:53

Solater (98 views)
2018-03-17 05:04:08

nelsongames (179 views)
2018-03-05 17:56:34

Gornova (405 views)
2018-03-02 22:15:33

buddyBro (1065 views)
2018-02-28 16:59:18
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!