LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   multi platform protocol question (https://www.linuxquestions.org/questions/programming-9/multi-platform-protocol-question-816176/)

gottimw 06-24-2010 01:59 PM

multi platform protocol question
 
I just finished 3rd year of university (computer systems) and in 4th we are required to come up with a FYP (final year project).

I was lately interested in networking so i tried to come up with something that involves connecting "stuff" ;)

My friend gave me an idea to connect few devices (eg mobile, pc, laptop) to a server through some common protocol. So that they can talk to each other through that one server.

Basic idea is that for example you missed a call and your mobile sends an update to server and depending on the server rules an appropriate action would be taken eg if user is connected ping him that he missed call etc.

Here's my question... What protocol should i be using to achieve a multi platform capability? (my goal is to connect all main platforms linux pc and mac). I did a little bit of digging yesterday and XML sounds like something that i should look into.

Do you have and comments or thoughts oh wise linux gurus
:study:

i d really appreciate and comments

mpapet 06-24-2010 03:59 PM

TCP?
 
XML has lots of overhead and overkill for your application.

TCP is good as you don't need to send lots of information. Your phone app just has to wait for the mobile phone to ring too many times then send a packet to your presence server. From there, your presence server does all the work.

Lobinho 06-26-2010 10:15 AM

There are many many protocols you could use. I think that an easy way is to implement your own protocol and send it through TCP socket.
There are many "how to" teaching how to use sockets on java or c++ to do TCP communication. You will have to send and read your messages only, the sockets are ready for use.
In the future you could use the same protocol on RS-232, GPRS, zigbee or any other communication type.

Java is multi platform and you can run on some mobile devices.

http://java.sun.com/docs/books/tutor...ets/index.html

Hope it helps.
good luck on your project!

gottimw 06-27-2010 12:27 AM

thx for advice. I have another question. I was thinking about operational cases for my project and i came to conclusion that server would have to contact moblie first in some cases. (eg server sends updates of other device's states to mobile).
So this unusual for server to init communication.
The solution for this: devices poll server every x seconds for updates however this would increase power footprint for handheld devices, is there a way around it???

Sergei Steshenko 06-27-2010 01:20 AM

Quote:

Originally Posted by gottimw (Post 4016053)
thx for advice. I have another question. I was thinking about operational cases for my project and i came to conclusion that server would have to contact moblie first in some cases. (eg server sends updates of other device's states to mobile).
So this unusual for server to init communication.
The solution for this: devices poll server every x seconds for updates however this would increase power footprint for handheld devices, is there a way around it???

If you want to be practical, the first question is: who pays for air time ?

In some countries it's both sides, in some - just the caller.

gottimw 06-27-2010 11:53 PM

Quote:

Originally Posted by Sergei Steshenko (Post 4016071)
If you want to be practical, the first question is: who pays for air time ?

In some countries it's both sides, in some - just the caller.

FYI This is going to university project so this project probably will not see a daylight ;)

I was just curious. Device asking for an update seems the easies and logical solution, however if there is some other way to create two way communication.

Lobinho 07-01-2010 06:58 AM

Take a look at GPRS communication (you can use tcp sockets).
Your client and your server will be connected all time, and you will pay only when you transmit data through it.


All times are GMT -5. The time now is 03:54 AM.