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.
Direct_connection

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.
Server_side_application

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.
Web_application
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.
Cloud_Integration

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 :)

转载于:https://www.cnblogs.com/stephen-init/p/4007987.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值