mobile app 与server通信的四种方式
Have you ever wondered how the information gets into the application installed in your mobile device, how it is updated, and how it is synchronized with your account in the web application on the desktop? If you think that this is a case of miracle then it is time to know the truth.
How is it possible to comprise the database of 1000GB (no current mobile device can handle such an amount of space) into an application weighting 50KB? Impossible?
Let’s take a real example. The database of the famous Facebook equals to 25TB and is stored on several servers. In other words, it can be translated as if the Facebook DB could be stored in about 3200 USB flash cards with capacity of 8GB (a standard size of your photo camera flash card). Only imagine this amount! And on the opposite end, we can see your mobile application for this social media that is only about 7MB.
So, what are the options of communication between your mobile device and a remote storage?
In fact, there are several ways how to do this.
Here are several possible variants among which to choose depending on the business goals.
1. Direct Connection(telnet/ssh)
The mobile application directly connects to the server database to get respond. To ensure the confidentiality the SSH or another encryption type can be used.

Features:
- Direct connection using standard telnet/ssh;
- User verification via simple login/password;
- UI commands converted to server commands.
Advantages:
- Simple;
- No additional costs on developing of the back-end applications;
- No additional costs on maintaining of the additional hardware.
Disadvantages:
- - No scalability;
- - Can’t have access to external servers or databases (cloud access);
- - Has the only functionality of the standard telnet/ssh protocol.
2. Server-side application(socket)
The mobile application directly connects to the server -side
application that is in simple words a software program running on a
remote server.

Features:
- • Direct connection to a server-side application;
- • User verification via simple/secure login/password;
- • UI commands converted to server application commands.
Advantages:
- Direct connection;
- Can use external resources (servers, databases) using in-app connection from the server side;
- No additional costs on maintaining of the additional hardware.
Disadvantages:
- Scaling is possible, but is time and effort consumable;
- More complex and has no built-in possibilities for using in a cloud infrastructure;
- Require developing of the back end application;
- Back end application should be placed on the controllable server.
3. Web application(HTTP传送数据报可以是http数据或者JSON、XML。最常用这种!!!)
The mobile application can communicate with the same web application to get information from it.

Features:
• Using of a web services via specialized API;
• User verification via simple/secure login/password;
• UI commands converted to API requests.
Advantages:
- Using of REST API;
- Easy to develop the client side;
- Can use external resources (servers, databases) using connection from the server side;
- No additional costs on maintaining of the additional hardware;
- Back end part can be placed on the controllable server, or on a dedicated one;
- Easily scalable.
Disadvantages:
- More complex.
* Note: Require developing of the back end web application and API services
4. Cloud Integration( SOAP??)
With Cloud Infrastructure as a Service, your organization actually
receives a private cloud that is quite similar to the classic
understanding of clouds but is used only for your company purposes and
has better security.

Features:
• Connect to a cloud using it’s services (API);
• User verification via simple/secure login/password;
• UI commands converted to cloud API commands.
Advantages:
- Using of REST API;
- Easy to develop the client side;
- Can use external resources (servers, databases) using cloud services;
- Can access all of the services provided in a cloud;
- Can gain access to every computer in a cloud according to user permissions;
- Extremely scalable;
- Extremely reliable and solid.
Disadvantages:
- Very complex
- Require developing of a cloud services;
- Require maintaining of a cloud hardware;
- Time and cost consumable.
Shh! Don’t tell anybody! We just have opened you a secret of where
the information that got into your smartphones and tablets was stored in
reality. With no cables, no surgical manipulation, and no pigeon
express. It has been again all about high technologies.
As reported by world IT statistics and experts, the mobile industry
is on the rise and promises to continue evolving for several further
years at least. There are still many open challenges and a big space for
extension in mobile application development including the storage and
security spheres, but, hopefully, IT guys will amaze us with something
new :)
mobile app 与server通信的四种方式的更多相关文章
- Android跨进程通信的四种方式
由于android系统中应用程序之间不能共享内存.因此,在不同应用程序之间交互数据(跨进程通讯)就稍微麻烦一些.在android SDK中提供了4种用于跨进程通讯的方式.这4种方式正好对应于andro ...
- 关于Fragment与Fragment、Activity通信的四种方式
一直想总结一下Fragment与Fragment.Activity通信的问题,今天有时间一共总结了三种,权当抛砖引玉,如果大家还有更好的方式来实现Fragment和Fragment.Activity的 ...
- MSSQL Server数据库的四种连接方法和sql连接字符串
MSSQL Server数据库的四种连接方法和sql连接字符串 分类: [ 03 ] C#(131) [ 07 ] SQL Server(68) [ 01 ] .NET(189) 今天用SQL Ser ...
- .net(C#数据库访问) Mysql,Sql server,Sqlite,Access四种数据库的连接方式
便签记录Mysql,Sql server,Sqlite,Access四种数据库的简单连接方式 //using MySql.Data.MySqlClient; #region 执行简单SQL语句,使用M ...
- SQL server分页的四种方法
SQL server分页的四种方法 1.三重循环: 2.利用max(主键); 3.利用row_number关键字: 4.offset/fetch next关键字 方法一:三重循环思路 先取前20页, ...
- iOS 登陆的实现四种方式
iOS 登陆的实现四种方式 一. 网页加载: http://www.cnblogs.com/tekkaman/archive/2013/02/21/2920218.ht ml [iOS登陆的实现] A ...
- .net core 2.x - 缓存的四种方式
其实这些微软docs都有现成的,但是现在的人想对浮躁些,去看的不会太多,所以这里就再记录下 ,大家一起懒一起浮躁,呵呵. 0.基础知识 通过减少生成内容所需的工作,缓存可以显著提高应用的性能和可伸缩性 ...
- 【Java EE 学习 80 下】【调用WebService服务的四种方式】【WebService中的注解】
不考虑第三方框架,如果只使用JDK提供的API,那么可以使用三种方式调用WebService服务:另外还可以使用Ajax调用WebService服务. 预备工作:开启WebService服务,使用jd ...
- android 定位的四种方式
[原文] 开发中对于地图及地理位置的定位是我们经常要用地,地图功能的使用使得我们应用功能更加完善,下面总结了一下网络中现有对于介绍android定位的4种方式,希望对大家有帮助: android 定 ...
随机推荐
- Docker部署 Mysql .Net6等容器
Centos8安装Docker 1.更新一下yum [root@VM-24-9-centos ~]# yum -y update 2.安装containerd.io # centos8默认使用podm ...
- 100_第一个vue-cli项目
目录 什么是vue-cli 主要的功能 需要的环境 Node.js : http://nodejs.cn/download/ Git : https://git-scm.com/downloads 安 ...
- 14-1-Unsupervised Learning ---dimension reduction
无监督学习(Unsupervised Learning)可以分为两种: 化繁为简 聚类(Clustering) 降维(Dimension Reduction) 无中生有(Generation) 所谓的 ...
- [loj3462]括号路径
对于两条边$(x_{1},y,c)$和$(x_{2},y,c)$,不难发现$x_{1}$与$x_{2}$完全等价,因此可以合并 重复此过程,合并之后用启发式合并来合并边集(注意自环也可以参与合并,即$ ...
- dart系列之:在dart中使用数字和字符串
目录 简介 数字 字符串 StringBuffer 总结 简介 要想熟悉一种语言,最简单的做法就是熟悉dart提供的各种核心库.dart为我们提供了包括dart:core,dart:async,dar ...
- 听说你想把对象存储当 HDFS 用,我们这里有个方案...
传统的大数据集群往往采用本地中心化的计算和存储集群.比如在谷歌早期的[三驾马车]中,使用 GFS 进行海量网页数据存储,用 BigTable 作为数据库并为上层提供各种数据发现的能力,同时用 MapR ...
- 6.K8s集群升级、etcd备份和恢复、资源对象及其yaml文件使用总结、常用维护命令
1.K8s集群升级 集群升级有一定的风险,需充分测试验证后实施 集群升级需要停止服务,可以采用逐个节点滚动升级的方式 1.1 准备新版本二进制文件 查看现在的版本 root@k8-master1:~# ...
- Codeforces 1603D - Artistic Partition(莫反+线段树优化 dp)
Codeforces 题面传送门 & 洛谷题面传送门 学 whk 时比较无聊开了道题做做发现是道神题( 介绍一种不太一样的做法,不观察出决策单调性也可以做. 首先一个很 trivial 的 o ...
- Codeforces 796E - Exam Cheating(dp)
Codeforces 题目传送门 & 洛谷题目传送门 当被数据结构搞自闭的 tzc 信心满满地点开一道 *2400 的 dp 题时-- 却发现自己不会做?! 这足以证明蒟蒻 dp 之菜/dk/ ...
- P4497 [WC2011]拼点游戏
P4497 [WC2011]拼点游戏 在我的 cnblogs 中查看 数据结构大杂烩 + 阿巴细节题. 调了三个小时. 首先考虑第一小问的答案. 注意到点数的计算方式是先负后正的形式,不妨看做选出 \ ...