The service is being developed in the web.

But it must exist in conjunction with the application on Android'e.

Found several sites for developing for Android. I read, something is clear, something is not.

The essence of the question: (all questions about the service)

  1. The web project will have an API for the application (IOS, Android) Same for both platforms
  2. The application must have settings for synchronization between the service. those. if at the moment there is no Internet, for whatever reason, then the application writes data at home, when the Internet is received, the application is synchronized in the service according to a certain logic.
  3. How best to do data synchronization? There is data in the database, mostly small text and photos, photos are not large, but still, with frequent use of the photo service, there are many of them, respectively, and will the application not consume all the memory on the device during synchronization? Or give the pictures at the request of the user, by the button let's say "upload a photo" then the problem is solved quickly.
  4. Has anyone encountered writing an API to a service? How are they spelled correctly? I imagine it probably differently than each of us. Any ideas?
  5. The service will work initially on its one server, as soon as there is exhaust, there will be more servers.
  6. The service at the design stage will therefore be heard all opinions on the choice of database, Apache / Nginx server, https access protocol, since services from banks will be connected. (at the moment the service is being written on Yii, Nginx server, DB - MySql) The number of records in the database is also a lot of samples from it, we also look towards PostgreSQL - who will say about it what's good?

Service at its core is a kind of “calculator” for showing the user in a beautiful design the data that he entered. The number of input data is large, if we take an average of 1 user per day can enter from 1 to 50 different numbers (let's call them that) i. for each user up to 50 records in 1 table, which is divided into several more with their own connections. If we imagine that there are several thousand users per day (this is the first time, then the number of records is 100K records) along with its internal statistics and other records in the database. + upload photos and finally output for any parameters of this data, day, week, month, year, 5 years, etc.

Who in what area can tell?

ps probably "This is too controversial issue" because Not much is a question, but I find it interesting and the service should start by the summer (alpha exactly) :)

  • Updated the answer with a link to read about synchronization. It describes in some detail what you need. - DroidAlex

2 answers 2

1) for the base part I recommend choosing json. In extreme cases - xml. No binary protocols. For the future, you can always screw on the top of the ssl and get both security and encryption.

2) and there are no problems with synchronization. Moreover, on androids, starting from 2.2 there is a built-in mechanism for synchronization ( http://habrahabr.ru/post/118450/). Of course, he imposes his own model of data presentation, but gives certain guarantees.

3) partially answered above. Also, do not forget to use sdcard - I do not think that a person will easily get a gigabyte of data per day, and there is usually such a memory on the card. But this does not cancel the memory control.

4) api wrote. It all depends on the tasks. You can do on the basis of REST (Google by the words "android rest" gives a lot of interesting things). And some take the usual xmpp protocol. For him, and the server is, and client libraries, and simply append a functional.

5) load balancing is a classic task. The main thing is that the load on the database is properly divided (either to configure synchronization, or the correct distribution of clients across servers)

6) once the muskul is already selected, then let it be. In most cases, switching to another base can only lead to problems. Now, of course, there will be people who will recommend NoSQL solutions, but it is better to choose what you are well-versed in. Therefore, take what is already there at the moment, but do not make a strong dependency (that is, do not use what is specific for MySQL) and there will be happiness. If at some point you realize that muskul does not fit, it will be much easier to switch. With other components the same story. If you know Yii well, that means it and use it.

    From all this it is not clear the main thing - what is the question and what are your difficulties?

    You will have api to the site. Write the client under the android, ayos or any OS.

    1. Write a parser json, xml or whatever the service will issue
    2. Synchronize data on the client. If the data changes frequently, write a special api method and pull it, checking the flag is not updated and changing the data on the client. If the data changes infrequently, then update periodically sending a request from the client. You can check the date and compare. There are many ways - choose the most suitable for your requirements.
    3. Cache all that is possible. Desirable in the database. The Internet is not always on the device, but the user still wants to see a working application.
    4. Take all actions from the network to external streams at once (AsyncTask, etc.) - then say thanks :)
    5. Adapt the client's design to popular resolutions (320x480, 480x800, 1280x800). This item is for the future to avoid problems when designing an architecture and estimating time.

    To read about syncing: https://stackoverflow.com/questions/10829371/sync-data-between-android-app-and-webserver

    To read about creating applications: http://developer.android.com/ http://startandroid.ru/ru/

    • 1) it is not necessary to write a parser, it already exists, at least in android - KoVadim
    • classes from json package? - DroidAlex
    • org.json - KoVadim
    • Um, ok. And doesn’t the answer api need to be parsed using the same classes? Not understanding :) This is parsing, parser, any other abstruse word :) - DroidAlex
    • this is no longer parsing, but simply parsing the data. - KoVadim