⬆️ ⬇️

Cloud for development companies: how Robots Can Dream made a project for the FINA World Cup 2015

Hello everyone from Kazan robots! We are " Robots Can Dream ". Our company was created by a group of like-minded people who believe in the unlimited potential of mobile technologies. In the capital of Tatarstan, we decided to open our company with blackjack and our vision of how to create mobile apps.



In early 2105, we set about to develop a mobile application for the FINA 2015 World Aquatics Championship . Shortly before that, we developed a KAZAN AR presentation application with augmented reality technology for FINA 2015. Now the goal of creating the application was to provide guests and participants of the championship with a fast and convenient way to receive information related to the championship. At the time of the start of work on the project, there was only a site, no external API yet existed. In just one month, we needed to develop a multi-functional application for 2 platforms, and the image of the Republic was at stake. How we coped with the task and how Microsoft Azure helped us in this, read below:



Solution Architecture



When developing an application for iOS and Android platforms, we were faced with the task of providing a single backend. We chose the Azure cloud platform due to its reliability, the ability to quickly start and ease of development.

')

As a result, the following architecture was created:





Back-end: Django 1.7 + Django REST Framework web application (http://apifina.robotscandream.com/). Azure Web App is a PaaS service with the ability to host Django applications, as well as other applications based on PHP, .NET, Java and Node.js.



Parser : Ubuntu virtual machine. For parsing, the Grab python library was used. The backend and the parser have a common code base. Azure virtual machines allow you to host any solutions on Linux and Windows, offering ready-made templates based on different distributions and solutions from the Azure Marketplace .



DB : Mysql on Ubuntu virtual machine, without replication. The Azure Virtual Machines Gallery provides ready-made official Ubuntu images with support from Canonical.



Push Notifications: Azure Push Notification Hub, subscriptions to tags by sports, countries and medals using templates for localizing messages. Azure Push Notification Hubs, a ready-to-use on-demand service, offers the capabilities of a single mechanism for sending large-scale push notifications to any device with any operating system and PNS services. The service helps the developer by offering subscription of users by tags out of the box, message templates for distribution to different audiences and in different languages ​​and much more.



Images : Azure Storage is a large-scale storage that by default stores data in three copies and allows you to save any type of data: blobs, queues, data as key-value, and even files as an SMB resource.



Data display



The client kept a database identical to the server base, with the exception of some service entities. Data on the client was updated incrementally (with requests like "Get a list of news, changed after a specified time"). The update is performed separately (separate http requests) for different sections (Schedule, Results, News, Photo, etc.) and started as automatically (background fetch on iOS, sync adapter in Android), and "manually" (but imperceptibly for the user) when viewing the application.



The server side of the display is as simple as possible. The classes of serializers (ModelSerializer) and views (ModelViewSet) were declaratively set (for all 2 small files), the rest was occupied by the Django REST Framework.



Receiving and loading data on the server



Information about objects (description, photo, routes of transport) could change during the championship, so we stopped at the option: manually filled in through the admin panel. To upload photos to the Azure repository, a slightly modified django-storages library was used.



For parsing news and media sections used the Grab Spider API library. That allowed to adequately collect information from the site in two languages ​​(English and Russian). At the same time, changes were already tracked in the news base.



The medal offset was synchronized with the site kazan2015.com through the API provided by the developers of the site (the only one that managed to be knocked out), which issued the data in XML format. This information was converted and put into the server database in the required format (for incremental client updates)



The schedule and information about the athletes were loaded and updated from the CSV-tables. For updates also had to implement the identification of changed records.



The results of the competitions were filled in manually through the admin panel, since it was not possible to write PDF file parsers downloaded from the official website of the supplier of FINA 2015 competition results - www.omegatiming.com . In addition, the files had a different display format for different disciplines.



Push notifications were sent automatically when the relevant data appeared. We have provided the user with the functionality of creating a personalized push subscription.



Word numbers



Below are the results of using an iOS-based client:







The results of using the client based on Android:









A little bit about the interface



We would like to note that in the process of designing the application, we used the practice of “survivor’s error” that we introduced into the design stage. Since the application was used by citizens of different countries, we needed to make the application user friendly for users with different user experiences. For this, we analyzed the most unsuccessful applications of sports events to prevent their mistakes.



The app has received 4 of 5 stars on the Play Market and 4.5 out of 5 on the App Store. We think this is a good result. In addition, we constantly received letters of appreciation for a good application in a variety of languages. It was the best reward for our work - [:)]



Team Robots Can Dream.



Source: https://habr.com/ru/post/270745/



All Articles