oh, and if you are worried about the security of having game clients talk http to your server, https is your friend. I rolled my own security on the first web integration i did, and am using https on the second, and the second was much easier to implement, and is much more secure. On Thu, Nov 11, 2010 at 8:53 AM, Alan Wolfe <alan.wolfe@xxxxxxxxx> wrote: > Heya Kevin, > > Chiming in as a person with 5 years web application dev experience > (online stores, budget and asset tracking for school districts) and 5 > years console game dev experience, including integrating 2 commercial > (sold in store) games with a web back end for user generated content > sharing, stats logging, etc. > > For the back end I would use PHP. it should work just fine. > > For the C++ side, instead of using sockets to talk to the web service, > why not use libcurl? It's a mature, MIT licensed library that already > has all the finer details of the HTTP protocol worked out and is well > tested. > > You might also be interested in doing some research into "cloud > computing". I'm sure you've heard that buzzword before, probably used > by total tools who program VB and think they are the best coders in > the world (lol) but it could seriously be a good fit for your needs. > > Here's a good place to start: > > http://aws.amazon.com/ > > Basically you can put your web code up there and it's hosted by > amazon. It's extremely redundant so there is no single point of > failure unlike if you had a single 2u rack mounted server in a data > center. It's also easily scaled up and down (dynamically in real time > i believe) as your needs increase and decrease. > > Amazon gives you a year for free, and i'm not sure if there are any > practical limits to their offer, but when you do start paying, you pay > only for how much cpu / bandwidth / etc was used. > > PS- I very much recommend starting with PHP server side for numerous > reasons, but, even though i don't really recommend it, there is > something called fast CGI where you can write c++ code for a web > server. Of course, if you go that route, there are new dangers you > hit such as having a server that is capable of leaking memory, having > concurrency issues, being much more likely to crash, and having more > subtle issues like that. It's not that i'm not a fan of c++ trying to > push managed languages in general, but for this situation, php server > side really should be fast enough and will really make your life a lot > easier. IMO it really just is one of the best tools for this job. > Another option beyond fast CGI is writing your own apache module, and > then your c++ is written write where the rubber meets the road, but > again, i don't recommend going that route either. But, i think you > should at least be aware of their existence :P > > Also, to help minimize server load, for things that make sense (such > as slower changing data, but not necessarily server lists since you > want those to ) you should have clients cache data from the server > client side for a short period of time so that if people jump from > menu to menu and each menu has a different message from the server on > it for instance, that they don't keep hitting the server for the same > text they got just a couple seconds ago. > > Good luck! > > On Thu, Nov 11, 2010 at 7:50 AM, Kevin Jenkins > <gameprogrammer@xxxxxxxxxx> wrote: >> I'm trying to write a server directory backend for games that is pretty >> ambitious. I want to host it using http://code.google.com/appengine/ (Google >> app engine) so I don't have to pay monthly fees and can potentially scale >> it. I also want a web-based front end for the service so I can support >> multiple games, and can assign moderators to manage particular games. It >> would also have an SQL database storing the list of running games. >> >> I've never done web programming before, and wanted to ask for advice before >> diving in so I don't end up doing a lot of useless work. >> >> For the web interface, it's clear that I need a programming language of some >> sort. For example, I need to be able to login to the web interface as admin >> in order to manage the list of moderators and therefore show a different >> webpage based on who you are. What recommendations do you have? Is Java a >> server-side programming language I could use for this? Or Python? I know PHP >> can do it. Performance isn't too important for the web-interface, but if I >> can use a language close to C or C++ it would make it easier for me to write >> and learn. Are there other options? >> >> From the C++ side I already know how to connect to either a service running >> TCP, or a http based web service (such as PHP). So I can send queries to the >> server, and they need to be processed fast. Should I even use google app >> engine for this, or can I process everything in PHP fast enough? For >> example, if I am processing thousands of requests a second, can a PHP based >> web host handle this? If I use java or python, would this be faster than >> PHP? And can I scale multiple instances of the application with google app >> engine all using the same database? >> >> Hopefully someone here is knowledgeable about all this. Thanks in advance. >> > --------------------- To unsubscribe go to http://gameprogrammer.com/mailinglist.html