The post has been translated automatically. Original language: Russian
The phone can do much more than show the screen and make calls. It has a dozen sensors, and some of them are used by applications all the time.
The acceleration sensor understands how the phone is moving. It is he who tells you that a person is walking, and he counts the steps.
The rotation sensor tells you how the phone is rotated in space. Thanks to it , the screen turns over, and tilt control works in games.
The magnetic sensor shows the direction to the north. Without it, the map wouldn't know where you're looking.
The light sensor changes the brightness of the screen depending on the lighting. The proximity sensor turns off the screen when the phone is at your ear.
Location detection works from several sources at once: satellites, nearby communication towers, and known access points. There are more accurate satellites on the street , and other sources indoors.
This leads to useful conclusions for development. Sensor data is received frequently, and there is usually no need to process each value: it is enough to average over a short period.
The second conclusion is about accuracy. You should request the highest accuracy of the location only where it is really needed.
And the third one. Each sensor that the application accesses must be understood by the user. A clear explanation of why this data is needed removes most of the questions.
Does your app use sensor data or just the network and the screen?
Сервер сайта стоит в одном месте, а пользователи находятся по всему миру. Сигнал идёт по проводам, и расстояние даёт задержку, которую нельзя убрать настройками.
Решение простое по идее: разместить копии файлов ближе к пользователям. Картинки, оформление и скрипты хранятся в разных городах, и человек получает их из ближайшей точки.
Выгода двойная. Файлы приходят быстрее, а основной сервер занимается только тем, что нельзя скопировать заранее.
Хорошо копируется всё, что одинаково для всех: изображения, шрифты, файлы приложения, видео. Плохо копируется личное: список заказов конкретного человека.
Отсюда обычная схема. Личные данные идут с основного сервера, а всё остальное из ближайшей точки. Именно поэтому страница часто появляется быстро, а содержимое подгружается чуть позже.
Есть деталь, о которой стоит помнить. Копия живёт какое-то время. Если файл обновили, а копии продолжают отдавать прежнюю версию, пользователи увидят старое.
Решают это добавлением номера версии в имя файла. Новая версия имеет новое имя, поэтому её точно возьмут заново.
Практический вывод для команды: правило обновления копий стоит определить заранее, иначе после каждого выпуска придётся ждать, пока прежние версии перестанут отдаваться.
А у вас в именах файлов оформления есть номер версии?