关于服务器实现的服务器/客户端结构iOS App开发的建议?

问题描述:

必须有很多应用程序被设计为与服务器通信。我的问题只是关于App安装在iOS设备+服务器端的服务交互。 Web应用程序不是我在说的,并且应该没有网页涉及在这个讨论。典型的例子是像Instagram和Twitter这样的应用程序,其中在应用程序和服务器之间交换的大多数信息只是像字符串,图像和整数(包裹在JSON或XML),无需网页显示的数据。

There are must be a lot of apps that are designed to communicate with server. My question is only about App installed on iOS device + Server side service interaction. Web app is not what I am talking about, and there should be no webpage involved in this discussion at all. Typical examples are Apps like Instagram and Twitter, in which most of the information exchanged between the App and the server is just data like String, Image and Integers(wrapped in JSON or XML), no webpage presentation needed.

我的问题是:如果你是一个独立的应用程序开发者,并且你从头开始设计这样的应用程序,没有任何现有的网站API,数据库结构或应用程序不受任何现有的API或数据库结构或应用程序协议限制),什么是最有效的方法?

My question will be: if you are an independent app developer, and you are designing such an app from scratch without any existing website API, database structure or application(so you are not limited by any existing API or database structure or application protocol), What will be the most efficient approach?

服务器端需要做的是:


  • 接收数据发送应用程序;

  • 使用设计的逻辑处理数据;

  • 与数据库(如MySQL)进行交互;

  • 数据挖掘和分析 - 这可以是应用客户端所请求的不断运行的服务或一次性任务;

  • 根据请求或自发地将数据发送回应用程序;

  • 在不同的应用客户端之间交换或广播数据(即:群聊和对等消息);

  • receive data send by the App;
  • process the data with designed logic;
  • interact with database(like MySQL);
  • do necessary data mining and analysis---this could be a constantly running service or one time task requested by the App client;
  • send the data back to the App upon request or spontaneously;
  • exchange or broadcast the data between/among different App clients (i.e.: group chatroom and peer to peer message);

我知道有3个明显的选项来实现服务器端:

As far I as know there are 3 obvious options to implement the server side:


  • PHP

  • Python

  • Ruby on Rails

我的问题是:



  • 如果应用程序专注于自然人类语言/文本搜索,分析和数据挖掘,哪一个是最好的选择?我听说Python在这方面做得很好。

  • 有关数据库选择的任何建议吗?我现在使用MySQL,我发现它对我的目的相当强大,我听说Twitter正在切换到Cassandra。

  • 对于服务器端,如果您需要构建一个服务器管理界面,您可以作为管理员来管理和监视社区,成员资格和数据等等,有没有任何现有的解决方案,或框架或工具呢?什么是最有效的方法?

  • 如果一个新程序员没有经验,你建议他/她从哪个开始?

  • 材料或示例代码在服务器端在这样的上下文中我们可以从中学习?

  • which one is the most appropriate choice to implement the server side?
  • If the App is focusing intensively on natural human language/text searching, analyzing and data mining, which one is the best choice? I heard Python is doing pretty good in this area.
  • Any advice on the database choices? I am using MySQL for now, and I found it's quite powerful for my purposes, I heard Twitter is switching to Cassandra. Will that be too difficult to start with?
  • For the server end, if you need to build a Server management interface, for you as an admin to manage and monitor the community, membership, data and such, is there any existing solution, or framework or tool for that? what will be the most efficient approach?
  • If a new programmer has no experience in non of them, which one you suggest he/she to start with?
  • Is there any good reference material or sample code on the server side in such context we can learn from?

我知道在Stackoverflow上有很多非常有经验的专家在这些领域,但我看到更多的新手刚刚进入iOS开发在服务器/数据库编程经验方面没有太多的知识。我希望这个线程可以帮助这些谁正在设计一个应用程序与服务器/客户端结构,但不知道从哪里开始。

I know there are a lot of very experienced experts on these areas on Stackoverflow, but I saw more newbies who just entered the iOS developing area without much knowledge in server/database programming experience. And I hope this thread can help these who are thinking to design an App with server/client structure but have no idea where to start with.

ps:我将继续更新此问题线程,并添加我对此主题的发现,以帮助所有其他用户stackoverflow。 :-)请尝试让你的答案信息丰富,易于理解和建设性。我想大多数读者对这个线程将是这个伟大的社区的新成员。

ps: I will keep updating this question thread and adding my findings on this topic, to help all other users at stackoverflow. :-) Please try to make your answer informative, easy to understand, and constructive. I guess most of readers for this thread will be new members of this great community.

您确定要花时间&金钱开发自己的服务器&开发自己的API?
今天有很多mBaaS(移动后端服务)提供者,如 QuickBlox Parse StackMob ,可立即使用,他们有伟大的自定义对象API和一些预定义模块。他们有很大的自由计划与大配额。其中一些这样的QuickBlox有企业计划 - 所以你可以购买许可证和他们服务器团队更新服务器为您的目的。

Are you sure you want to spend time & money to develop your own Server & develop your own API? There are lots of mBaaS (mobile Backend as a Service) providers today such QuickBlox, Parse,StackMob, which are ready to use and they have great Custom Objects API and some of predefined modules. They have great free plans with big quota. Some of them such QuickBlox has Enterprise plan - so you can buy license and they server team update server for you purpose.

因此,我建议不要开发您的服务器,并考虑mBaaS市场。

So, i recommend not develop your server and think about mBaaS market.

关于您的问题 - 我可以推荐您参考 QuickBlox Custom Objects代码示例以及自定义对象API 。自定义对象模块提供了灵活性来定义所需的任何数据结构(模式)。模式在管理面板中定义。该模式称为类,并包含字段名称及其类型。我认为这是你需要的。

Just about your issue - I can recommend look at QuickBlox Custom Objects code sample and also Custom Objects API. Custom Objects module provides flexibility to define any data structure(schema) you need. Schema is defined in Administration Panel. The schema is called Class and contains field names and their type. I think it's what you need.