简体   繁体   English

服务器应用程序入门

[英]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. 我有一个iPhone游戏( Combination ),在下一个版本中,我想设置一个服务器,用户(通过应用程序)可以在该服务器上提交他们已完成的关卡,并查看其他用户的情况。 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?" 您是否使用过Java / C#/ Perl / Python和其他“服务器端语言”? 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或C#是真正强大的服务器端语言,但是托管这些语言可能需要更多的工作(和金钱?)。

Java might be a good starting point, because you can setup Tomcat yourself and try hosting some web-services. Java可能是一个很好的起点,因为您可以自己设置Tomcat并尝试托管一些Web服务。 MySQL is a good database to start with, but there are even more lightweight database alternatives. 首先,MySQL是一个很好的数据库,但是还有更多轻量级的数据库替代品。 There might be a bit of a learning curve with any of these. 这些可能有些学习曲线。

How about having a look at Onyx Online or OpenFeint ? 看看Onyx OnlineOpenFeint怎么样?

Onxy Online is from the makers of Trism, and they say, "the XBox Live Arcade ecosystem brought to the iPhone". Onxy Online来自Trism的制造商,他们说:“ iPhone带来了XBox Live Arcade生态系统”。 I wrote this kind of system into Trism as a case study, and it's been a complete success. 我将这种系统写为Trism作为案例研究,并取得了圆满成功。 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. 自Trism在7月推出以来,我们一直在努力修改此在线代码以在任何iPhone游戏中使用,并且效果惊人。 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." 我们要做的是允许任何开发人员将Onyx代码插入他们的游戏中,这将立即启用在线评分,成就,排行榜和自定义论坛。”

OpenFeint is from the developers of Aurora Feint. OpenFeint来自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. “ OpenFeint允许任何iPhone游戏添加玩家配置文件,好友列表,墙壁,新闻源和实时聊天室,从而使游戏能够以零成本的运营开销和最短的开发时间围绕自己建立一个真实的社区。OpenFeint由服务器和客户端组成。OpenFeint服务器与Google的OpenSocial REST API完全兼容,并且可以通过OpenFeint客户端代码库和Aurora Feint Inc.的示例UI代码进行访问。独立开发人员不必操作服务器,该服务器将托管在Aurora Feint的数据中心中。

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: 在iPhone游戏的首次开发中,iPhone游戏开发人员将有能力将超过2个月的开发工作减少到1天,并完全消除了后端服务器的操作,同时为玩家提供了广泛的可自定义的社交和社区构建功能:

  • Profiles: Players can upload an avatar photo or take one with their iPhone camera. 个人资料:玩家可以上传头像照片或使用iPhone相机拍摄照片。
  • 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 好友列表:玩家可以与社区内或整个iPhone游戏社区中的其他玩家成为朋友
  • 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" 全球社区聊天室,供玩家讨论iPhone上其他游戏的建议,技巧和评论”

I would also recommend you to use an online database service such as Viravis , DabbleDB or Zoho Creator . 我还建议您使用在线数据库服务,例如ViravisDabbleDBZoho 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. 几乎所有这些类型的服务都需要集成功能才能与Web,桌面,Windows Mobile或IPhone等客户端一起使用。

Have you heard of ICE touch ? 您听说过ICE touch吗? ICE is a middleware for network communication and has a basic persistence support. ICE是用于网络通信的中间件,并且具有基本的持久性支持。 It supports every major platform: 它支持每个主要平台:

  • iPhone as a client iPhone作为客户端
  • Android as a client Android客户端
  • Objective-C Mac OS X as client/server 使用Objective-C Mac OS X作为客户端/服务器
  • C++ Linux as client/server C ++ Linux作为客户端/服务器
  • Java [any OS] as client/server Java [任何操作系统]作为客户端/服务器
  • C#/C++, Windows .NET (with Silverlight) and native as client/server C#/ C ++,Windows .NET(带有Silverlight),本机作为客户端/服务器

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. 他们将Skype命名为其客户之一。

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. 您可以运行Java服务器,与iPhone,G1和Silverlight客户端连接并进行聊天。 Pretty impressive interoperabilty! 令人印象深刻的互操作性!

Here comes the drawback : GPL (you cannot link against it without being GPL yourself) or commercial (individual pricing). 缺点是 :GPL(您自己不能成为GPL才能与之抗衡)或商业(个体定价)。

Java/Javascript is the defacto combo for most developers because of the Java support for every platform. 对于大多数开发人员来说,Java / Javascript是事实上的组合,因为每个平台都对Java有所支持。 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) Java Script有很多“问题”,其余的使用.NET(伴随的100MB运行时上载软件每9个月更改一次)

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. php,pearl,ruby等对于服务器端都很有用,但是如果您想使用代码,最好的解决方案可能是C / C ++(或类似的产品)和CGI / FastCGI。

This allows you to write communication algos once and use them on both ends. 这使您可以编写一次通信算法,并在两端使用它们。 Any encryption/compresssion sim same. 任何加密/压缩SIM卡相同。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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