Have been doing some conquer related programming lately, for some reason it feels like a playground for me, so decided to ask this here.
On an ideal world, we can separate every map in different applications/machines, this comes with the cost of synchronization difficulties that have the potential to be huge, database not updated properly, server failures, creating quest-like npc in different maps may be a pain to do (opening different machines).
it may sound stupid if you want to open a PServer, but i still feel interested in this, sounds fun and maybe will learn something interesting, i have no interest in write npcs, quests, but the base for all that, a working server, but empty, and ridiculously complex to what a CO Server requires.
TL;DR
Want to do this for fun.
So, all the servers will be programmed in C#, what would you recommend/change to this kind of project? libraries, softwarem etc..?(description below this)
Atm, i have thought in 5 different applications
AccServer: same as always.
DataServer: to avoid working on different folders/machines with the MapServers, for example, World server ask to one of the Map servers (mapserver1) to load the map X, mapserver1 doesnt store any data, it requests to the Data server the map info, npc, mobs, etc... now we can work in one single machine, and potentially change anything data related on the runtime.
WorldServer: Link between different map servers, also contains information that is shared by all the maps (guilds, friend list, etc...)
MapServer: Process all the actions related to one or more map, downloads all the data from the DataServer.
RouterServer: can be many, like MapServers, this one just routers all the packets to the corresponding server (World, Map or both)
level 1: DataServer
level 2: WorldServer and MapServers
level 3: ProxyServers
there will be a common library containing packet structures and entities (items, guilds, characters...) that will be shared between these applications.
communication only exists between level 1-2 and level 2-3 (and ofc with each app in the same level)
Problems i can imagine right now:
- Map server crash must be handled to avoid data loss, either with many updates to the data server and world server (who would push updates to others Map servers), or local backups, most likely the first one since certain level of synchronization is required by the game.
- Synchronize servers may become a hard task and may generate some overhead, a layer to abstract this is required so network and "direct calls" are supported, not really direct calls because packets still would be de/serialized, but this would avoid a connection with others servers.
- A lot of asynchronous calls, so threads are not locked when requesting something from other server
custom Features i want to implement (because they sound cool and fun to do)
- Separated npc logic from dialogs for multilanguage support
- Replay system
- Complete log for trades and chat, so reports could be supported
All common things, battle, npcs, equipment, etc...
Sorry if this was poorly written described but i have classes now, hopefully someone gives feedback about this, no intention in going open source since development will be kinda slow but i have no problem in sharing the repo with a few persons.
On an ideal world, we can separate every map in different applications/machines, this comes with the cost of synchronization difficulties that have the potential to be huge, database not updated properly, server failures, creating quest-like npc in different maps may be a pain to do (opening different machines).
it may sound stupid if you want to open a PServer, but i still feel interested in this, sounds fun and maybe will learn something interesting, i have no interest in write npcs, quests, but the base for all that, a working server, but empty, and ridiculously complex to what a CO Server requires.
TL;DR
Want to do this for fun.
So, all the servers will be programmed in C#, what would you recommend/change to this kind of project? libraries, softwarem etc..?(description below this)
Atm, i have thought in 5 different applications
AccServer: same as always.
DataServer: to avoid working on different folders/machines with the MapServers, for example, World server ask to one of the Map servers (mapserver1) to load the map X, mapserver1 doesnt store any data, it requests to the Data server the map info, npc, mobs, etc... now we can work in one single machine, and potentially change anything data related on the runtime.
WorldServer: Link between different map servers, also contains information that is shared by all the maps (guilds, friend list, etc...)
MapServer: Process all the actions related to one or more map, downloads all the data from the DataServer.
RouterServer: can be many, like MapServers, this one just routers all the packets to the corresponding server (World, Map or both)
level 1: DataServer
level 2: WorldServer and MapServers
level 3: ProxyServers
there will be a common library containing packet structures and entities (items, guilds, characters...) that will be shared between these applications.
communication only exists between level 1-2 and level 2-3 (and ofc with each app in the same level)
Problems i can imagine right now:
- Map server crash must be handled to avoid data loss, either with many updates to the data server and world server (who would push updates to others Map servers), or local backups, most likely the first one since certain level of synchronization is required by the game.
- Synchronize servers may become a hard task and may generate some overhead, a layer to abstract this is required so network and "direct calls" are supported, not really direct calls because packets still would be de/serialized, but this would avoid a connection with others servers.
- A lot of asynchronous calls, so threads are not locked when requesting something from other server
custom Features i want to implement (because they sound cool and fun to do)
- Separated npc logic from dialogs for multilanguage support
- Replay system
- Complete log for trades and chat, so reports could be supported
All common things, battle, npcs, equipment, etc...
Sorry if this was poorly written described but i have classes now, hopefully someone gives feedback about this, no intention in going open source since development will be kinda slow but i have no problem in sharing the repo with a few persons.