0

I want to create a server through which i can track devices(mobile,vechile etc etc). How can i create a protocol that can accept commands from all type of devices.

Balwinder SIngh
  • 1,831
  • 2
  • 24
  • 28
  • 1
    This is a very generic question. Also this is not particularly a JAVA question. If its a design question it should be marked as that. I would recommend you to look at how JDBC is implemented and follow the pattern. Write an interface and for each device type write a protocol driver. And for each device type you have a record that identifies what device type it is on server end to use the correct driver. – Sid Malani Aug 29 '12 at 12:07

1 Answers1

1

The simplest solution is to support TCP or UDP requests assuming they support IP. I would suggest getting TCP to work first. I would send what you need to send in the simplest Text or Binary format you can come up with.

If they don't support IP I suggest creating a gateway which support the transport they support already and pass this to TCP so your server has a common transport and protocol to talk to.

Peter Lawrey
  • 525,659
  • 79
  • 751
  • 1,130
  • like mobiles and vehciles that i want to track dosn't supports IP.. so i need to create a gateway that can accept commands from that vehcile hardware tracking system... this is what u r suggesting? – Balwinder SIngh Aug 29 '12 at 12:14
  • Its hard to be more specific without any details of what transports your devices support, or what you are doing. – Peter Lawrey Aug 29 '12 at 12:17
  • suppose there is one mobile phone and one vechile...what i want to do is.. i will create a web application where i can display mobile tracking details and vehcile tracking details... – Balwinder SIngh Aug 29 '12 at 12:19
  • vehciles will have some tracking hardware taht will send commands through GPS.and my server need to accept this command and track the details – Balwinder SIngh Aug 29 '12 at 12:21
  • `send commands through GPS` you can't do that unless you have hacked the US military satellites which produce GPS signals. In which case, you are in the wrong job. ;) You need to know how these devices really work technically. – Peter Lawrey Aug 29 '12 at 12:26
  • lolzz :P i mean by GPS that tracking hardware will know the location and send this location to server via mobile network. – Balwinder SIngh Aug 29 '12 at 12:29
  • Ok, so how does it send via the mobile network? SMS? To an SMS Gateway which can talk IP? – Peter Lawrey Aug 29 '12 at 12:30
  • OK so you need your SMS Gateway to take SMS messages and pass them to your service. Does it have a TCP or UDP protocol/API it supports already? – Peter Lawrey Aug 29 '12 at 12:36
  • this is what i am seeking help for...how can i create such a application that will accept SMS from tracking device?? – Balwinder SIngh Aug 29 '12 at 12:42
  • I would use an existing SMS gateway application https://www.google.co.uk/search?q=java+sms+gateway There are plenty available so I wouldn't write one from scratch. – Peter Lawrey Aug 29 '12 at 12:46