Creation of a communication app

Asked

Viewed 1,810 times

2

Good evening guys, I’m planning to develop a Whatsapp style communication app, more in the intention to learn even, nothing more than that. Well, the app will have contact list | conversations | pending requests.

In this question I will only refer to the contacts, how is that and made this interaction with other users requesting a friend request.

I imagined as follows, I will have in my application a service that listens to a webservice (this webservice would return an object when it existed in the data set the request), ai when there was a response from the webservice it would write the pending contacts to an XML and delete them from the table, then run a broadcast with a notification on mobile with the data of the object that would be on Intent.

Well, I know it must be some libraries that do this exchange of information, but it seems that I’m always doing something very bad, because in webservice would be running a query to answer.

I wonder if anyone has any idea how it is done in these popular apps, or if it should use sockets instead of webservice. Thank you.

  • I know there are some that are Webapps that basically use ajax for everything, but for those that are not made of web, I think the best option are the sockets...

1 answer

1

In this case, I particularly recommend using a Nosql database on the Server side to perform at a minimally acceptable performance (Mongodb).

About your question, Whatsapp for example uses a concept called SSL Socket (http://docs.oracle.com/javase/7/docs/api/javax/net/ssl/SSLSocket.html), is not such a trivial topic, so you will have to study patiently how it works if you want to implement.

at that link:

https://android.stackexchange.com/questions/43970/how-is-whatsapp-able-to-receive-messages-when-not-in-use

has a pretty cool answer (the first if I’m not mistaken) about the dynamic "app -> server" x "server -> app" for the operation of sockets...

remembering that the server side of Whatsapp is done in earlang, but to start you can study this project done in PHP available in Github:

https://github.com/venomous0x/WhatsAPI

At least for starters it’s good, to capture the concepts..

  • Gee, I didn’t think I’d get such a detailed response, thank you very much. It is a pity that these topics within the programming that I call ('ADVANCED') are not addressed in colleges and courses available on the internet.. thank you very much again.

  • :), needing just post there..

Browser other questions tagged

You are not signed in. Login or sign up in order to post.