简体   繁体   中英

Getting started with Server applications

I have an iPhone game ( Combination ), and in the next version I would like to set up a server, where users (via the app) can submit which levels they have completed, and see how other users are doing. At this point I don't intend that users will need usernames and passwords, just a simple submit data, get back data.

I know very little about server-based language and databases, but I've heard lots of horrible things that can happen if you get it wrong. What would be the best system to design a simple, lightweight, secure database in?

Have you used Java/C#/Perl/Python any other "server side language?" Are you going to be hosting the server-side yourself, or are you looking at hosting companies? Your decision might come down to how you intend to host your server-side stuff, and what capabilites your hosting company offers or what you are comfortable with.

Java or C# are really powerful server-side languages, but hosting these can take a little more work (and money?).

Java might be a good starting point, because you can setup Tomcat yourself and try hosting some web-services. MySQL is a good database to start with, but there are even more lightweight database alternatives. There might be a bit of a learning curve with any of these.

How about having a look at Onyx Online or OpenFeint ?

Onxy Online is from the makers of Trism, and they say, "the XBox Live Arcade ecosystem brought to the iPhone". I wrote this kind of system into Trism as a case study, and it's been a complete success. Since Trism launched in July, we've been hard at work adapting this online code for use in any iPhone game, and the results are stunning. What we're going to do is allow any developer to insert the Onyx code into their game, which will instantly enable online scoring, achievements, leaderboards, and customized forums."

OpenFeint is from the developers of Aurora Feint. From the press release:

"OpenFeint allows any iPhone game to add player profiles, buddy lists, walls, newsfeeds and real-time chat rooms allowing the game to build a real community around itself with ZERO operations overhead and minimal development time. OpenFeint consists of a server and a client. The OpenFeint Server is fully compatible with Google's OpenSocial REST API and will be accessible through the OpenFeint client code library and sample UI code from Aurora Feint Inc. Indie developers do not have to operate the servers, which will be hosted Aurora Feint's data center.

In a first for iPhone games, iPhone game developers will have the ability to reduce over 2 months of development work to 1 day, and completely eliminate back-end server operations, while offering their players an extensive set of customizable social and community building features:

  • Profiles: Players can upload an avatar photo or take one with their iPhone camera.
  • Walls: Each player gets a wall where other players can leave comments and view wall-to-wall conversations
  • Asynchronous Real Time Chat Rooms for meeting other players, sharing tips, strategies and experiences within each game community
  • Buddy List: Players can friend other players within their community or across the iPhone gaming community
  • Newsfeeds: Players can keep in touch with all of their friends' activities (wall comments, actions in games, befriending people)
  • Global Community Chat Rooms for players to discuss recommendations, tips, and reviews of other games on the iPhone"

I would also recommend you to use an online database service such as Viravis , DabbleDB or Zoho Creator . Almost all of these kinds of services have required integration capability to work with such a client as Web, Desktop, Windows Mobile or IPhone.

Have you heard of ICE touch ? ICE is a middleware for network communication and has a basic persistence support. It supports every major platform:

  • iPhone as a client
  • Android as a client
  • Objective-C Mac OS X as client/server
  • C++ Linux as client/server
  • Java [any OS] as client/server
  • C#/C++, Windows .NET (with Silverlight) and native as client/server

I evaluated it some time ago and was surprised about its maturity, good documentation and example code. They name Skype as one of their customers.

As a start I would recommend to have a look at their example chat application . You can run a Java server, connect with your iPhone, your G1 and your Silverlight client and have a chat. Pretty impressive interoperabilty!

Here comes the drawback : GPL (you cannot link against it without being GPL yourself) or commercial (individual pricing).

Java/Javascript is the defacto combo for most developers because of the Java support for every platform. Java Script has more than a few "issues" The rest of the herd uses .NET (with its attendant 100MB run time bloatware that changes every 9 months)

php,pearl,ruby etc are good for server side, but if you want to use code, the best solution is probably C/C++ (or similar) and CGI/FastCGI.

This allows you to write communication algos once and use them on both ends. Any encryption/compresssion sim same.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM