Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (741)
Games in Android Showcase (225)
games submitted by our members
Games in WIP (823)
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 2368 times)
0 Members and 1 Guest are viewing this topic.
Offline Jakibah

Junior Devvie


Medals: 1
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:
http://www.typhonvideo.com/

Founder & Principal Architect; TyphonRT, Inc.
http://www.typhonrt.org/
http://www.egrsoftware.com/
https://plus.google.com/u/0/+MichaelLeahy/
Offline Jakibah

Junior Devvie


Medals: 1
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  
 
 

 
Ecumene (110 views)
2017-09-30 02:57:34

theagentd (145 views)
2017-09-26 18:23:31

cybrmynd (245 views)
2017-08-02 12:28:51

cybrmynd (241 views)
2017-08-02 12:19:43

cybrmynd (240 views)
2017-08-02 12:18:09

Sralse (254 views)
2017-07-25 17:13:48

Archive (872 views)
2017-04-27 17:45:51

buddyBro (1024 views)
2017-04-05 03:38:00

CopyableCougar4 (1573 views)
2017-03-24 15:39:42

theagentd (1373 views)
2017-03-24 15:32:08
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

SF/X Libraries
by SkyAphid
2017-03-02 06:38:56

SF/X Libraries
by SkyAphid
2017-03-02 06:38:32

SF/X Libraries
by SkyAphid
2017-03-02 06:38:05

SF/X Libraries
by SkyAphid
2017-03-02 06:37:51
java-gaming.org 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‑gaming.org
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!