First of all I am a self-taught programmer/developer, sorry for some obvious questions. This topic is more of a design questions than programming.
I have a.t.m an Android game live at play store, I use 3rd party backend and networking solution. Now I want to build my own simple backend and networking solution. Why? Because:
For your information, my game is some sort of Spades.
Now my questions:
I am thinking to use node.js, socket.io and mongoDB to create my backend system.
These are what I want to do:
Networking:
Backend functions:
What will my gamelogic do for each room (ATM my gamelogic is totaly client side, so vulnerable to hacking and cheating):
Is it possible to create this with node.js, socket.io and mongoDB? And if yes is it smart thing to do it with node.js, socket.io and mongoDB or is it better to do it with another technology?
Or should I use node.js and socket.io for the networking part, and another technologie(example asp.net) for game logic? I have read that node.js is not good at CPU heavy tasks, and I think the gamelogic part is CPU heavy.
Maybe some of you may want to know how much player my system will support? Well atm I have daily 20 CCU but my game is for 3 weeks in store and I don’t promote a lot because I want first a strong backend system. I want my backend be able to handle 10 000 CCU, maybe I will never reach it but that’s my aim.
I hope I was clear about what I want, let’s hope you guys can help me out. I have looked for a week if what I want to do is possible and efficient.
NodeJS is a fine choice for this type of thing. Lots of concurrent IO, in relatively short bursts. You can definitely make a scalable server-side with the technologies you listed.
That game logic might get complex, but I doubt you'll even notice a CPU spike for the rules and checks you need to implement for a card game. At each stage, you'll have maybe 5-10 rules to check, and maybe iterate over a 52-card array (twice!). Not a problem. For CPU bound tasks, think "1000's of iterations" (image processing?) or "mathematical calculations" (overused fibonacci?).
I will point you to actionherojs as a node server with built-in chat (for your game room communications), built-in tasks (for your 10-second timeouts and AI turns), and a nice project structure for starting a new NodeJS app from scratch.
Have fun!