Monday, November 18, 2013

What is the befitting protocol between mobile(iphone, android) and server PHP/MySQL? [android help]


What is the befitting protocol between mobile(iphone, android) and server PHP/MySQL?



How are you?
I am developing the School-Parents Message Systems.
Here is my initial system spec.
1. School teacher create a new message on PC(by website) or Mobile(by website or mobile app).
In this point of time, the teacher can set a parents list that should be received the message.
2. Each mobile device of the parents list display the message that the teacher already created.
3. The parents can reply to the teacher concerning the message on mobile.
4. The teacher also can reply to the parents concerning the message that was replied by parents on mobile(of course the teacher can reply on PC).
The messages can be communicated between teacher-parents, teacher-pupils, teacher-teacher, parents-parents, parents-pupils, pupils-pupils.

Here is my initial development spec.
I am guessing the number of clients include teacher, parents and pupils as 200,000+.
I need to develop for the iphone and android.
I am going to use the PHP/MySQL for the development of server side.
So, I am planning to implement the server side in the following way.
I.E. All of the messages are created to the MySQL DB.
In DB may be exist the config parameter field can specify the messages such as created_date, sender, receiver, deliver_date etc.
Then a mobile device check a new message in DB regularly and display the message.
If a clients reply to the message, then the message will be send to the server and is inserted in DB.

It is my small idea.
So, what is the my questions and problems?

How can the mobile device check a new message regularly?
Probably, you might advise to use the Push Notification service.
But, I cannot use any other service.

1. What is the protocol between mobile and server?
I am guessing to use HTTP.
So, JSON or XML might be offered the data to communicate between mobile app and server.

2. How can be executed the mobile app regularly?
I hope, whenever new message is registered in our system, that should be reflected into the mobile app immediatly, not pulling regularly.

If it is impossible, so the mobile check regularly e.g. 1min or 10min or 30min, then when use HTTP, here it is my cares.
Regularly the mobile can be access to server to check a new message.
Number of clients is larger than 200,000+.
So, server always must reponse about the request from 200,000+ clients regularly(e.g. 1min or 10min or 30min).
Is it clear architecture?
I am very trouble in the server performance point of view.

If you have a good idea and excellent architecture system, please teach me.

Thanks a lot for your time.

Kind regards
Niao Jina



Read more

stackoverflow.comm



No comments:

Post a Comment

Google Voice on T-Mobile? [General]

Google Voice on T-Mobile? So I recently switched from a GNex on Verizon to a Moto X DE on T-Mobile. I had always used Google Voice for my v...