Let's review the 8 myths of the well-known distributed systems and how to develop applications to avoid these problems.
1, the network is reliable;
2, the network does not exist time delay;
3, the network bandwidth is unlimited;
4, the network is safe;
5, the network topology structure is not changed;
6, only one administrator;
7, the network transmission is not required any cost;
8, the network is isomorphic.
Fallacy 6: There is only one manager.
As a developer, you can control when new apps or new server versions are released, but no one has control over how many types of devices are running your app. Users can update the app at their own discretion, and may not update it any more. Cause you have to deal with various versions at the same time. This is a big hassle for web-based applications, and you should not be dealing with different versions of API interface requests at the same time. I think it's very important to introduce API versioning at the outset. It may not be necessary to support multiple API versions right away, but such a strategy exists, for example, when you need to modify an existing API call to migrate an interface from api.example.com/1/to API.EXAMPLE.COM/2, making it easier to publish new apps.
In addition, in order to support different versions of Api,app, you need to be able to make a local version upgrade. If the reason for the application upgrade modifies the format of the data (the data may be saved on the hard disk, coredata,keychain), you need to have a plan to migrate the user data (at least the upgraded app cannot throw an exception when reading old data). You need to consider the case of a direct upgrade from version 1.0 to 3.0, and skip version 2.0 from there.
Users are the administrators of their devices, who can set restrictions on their devices, and your app runs on those devices. For example, only some people will allow you to obtain geolocation information, only some people will allow the push message. Some use parental controls to prevent children from using safari, App market, or other apps.
Original link: http://blog.carbonfive.com/2010/12/03/iphone-distributed-computing-fallacy-6-there-is-one-administrator/
Translator's summary:
1, the author mainly says, although you are the application developer, but you actually cannot grasp when to update the application, including the application running environment; This is the author said that more than one manager. In fact, each user is the manager of your app.
2, the author said the local update, I am deeply have experience. Make a previous one even if the communication tool, the data will be saved locally, and later not only need to support the text also need to support voice, picture .... The previous data structure needs to be extended, so the new version of the operation requires the previous data format to be migrated first. Lesson, lesson.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Rethinking the design of the app by "8 Myths of Distributed Systems" sixth fallacy 6: only one manager