Ask HN: Getting started in server programming
Some background: I have written a reasonbly successful iPhone puzzle game, which I have converted into HTML 5. I would like to put it up on the net. This would require a simple server where users can log in, and their progress is saved. (note - the game does not communicate in 'real time')
While I consider myself a competent Java, C++, Python... algorithms programmer, server/web programming has always scared me. I hear about SQL injections, XSS attacks, password leaks, servers crashing when websites get popular, noSQL, etc.
Given I am starting from scratch, what's the best thing to learn to make simple, efficient and safe servers, to serve webpages and JSON?
4 comments
[ 3.1 ms ] story [ 15.6 ms ] threadFor simple servers, I use Ruby + EventMachine[0], but there's also C++ bindings for it.
Since I use Ruby, I'd simply use Mongrel[1] within my server to serve HTTP docs and all my Ruby data structures can be serialized into JSON by just including a json lib and calling #to_json. I'm sure there's similar embeddable HTTP servers and JSON libs for C++.
[0] https://github.com/eventmachine/eventmachine/wiki[1] http://en.wikipedia.org/wiki/Mongrel_(web_server)
See http://codahale.com/how-to-safely-store-a-password/