11. ORM Part 1: Overview

Database access has a crucial impact to the performance of game service. Thus, using DB as a synchronization point may result in too much overhead to a live service. To avoid such issues, it may required to implement complex technologies like database caching, I/O multiplexing, cross-server data synchronization, and application-level transaction. Implementing those features, however, is challenging even to software engineers with lots of experiences, and it takes long time to validate and stabilize implementation. iFun Engine’s Object Relational Mapping (ORM), however, enables efficient database accesses without implementing those complex features.

ORM generates C++/C# classes from database object definition in JSON. By invoking the methods of generated classes, programmers can easily perform database operations such as schema creation/update, data read/write/delete, and data caching. Especially, iFun Engine’s ORM provides a notion of logical transaction across database servers while accessing multiple databases like sharding.