I want to implement a location based service ,In that service the mobile users will send their location co-ordinates to db in 10 seconds 6 hours per day (around 25 devices for a client,we have multiple clients). We have a windows dedicated server we are planning to build our web-service in SOA architecture ,We have giving dedicated db for each client,What is the best approach for this scenario.
3 Answers
Create a WCF service that Sends and recieve JSON data, I had a similar requirement to yours. and i built one using this link http://www.codeproject.com/Articles/167159/How-to-create-a-JSON-WCF-RESTful-Service-in-sec. and it works well. though we did not send location every 10s. insteaad the location was stored locally and then dumped to server at regular intervals say an hour and the local db was cleared
Edit: how to receive json data can be found here How to accept JSON in a WCF DataService?

- 1
- 1

- 2,815
- 2
- 28
- 47
-
WCF might be an overkill assuming they will use http protocol to send data back and forth. if that assumptio ln is correct then web api is recommended way to go: https://msdn.microsoft.com/en-us/library/jj823172(v=vs.110).aspx – dee zg Apr 21 '16 at 06:26
-
You maybe right. I implemneted wcf because it was easy and quick to implement. – Sujit.Warrier Apr 21 '16 at 06:28
Not sure which aspect of a solution you are asking about but i can share our experience from similar project.
We have android/iphone applications that observe users gps locations and then report them to web app we did through ASP Web Api. Web Api is, of course, connected to db which aside from storing locations is also used for users management. In our case db is not partitioned to be single tenant but its a multi tenant instead. In your case, you should handle finding out correct db for given user in your web app.
Bear in mind that heavy gps sensor usage will drain your battery. Useful read on that topic is here: http://developer.android.com/guide/topics/location/strategies.html

- 13,793
- 10
- 42
- 82
Just another case study for your consideration. I have implemented similar scenario using Heroku in combination with golang and PostgreSQL. I have collected location in 2 category one is single pinpoint location and other one is in path mode. As you have said you are planning to use multiple db which can avoided by introducing userId of something to identify source/client.
Edit: 2
Collection of coordinates was to keep track on how device moved and where it was at particular time.

- 1,006
- 11
- 28
-
-
Well it is like a collection of a coordinated to track how device moved from point A to B. I also have several intermediate points to make it more accurate, it will also be shown to enduser on how device moved. – Mandar Apr 21 '16 at 06:56
-
so if i understand correctly, its an array of points that all have relation to some 'session' (which might be a tripId or whatever) + date/time ? – dee zg Apr 21 '16 at 06:59
-
@deezg Yes, you are right :) + i also collect some sensor data in combination with it. – Mandar Apr 21 '16 at 07:09
-
yes yes, then its clear. i was afraid that i missed some new type like locationPath so wanted to double check:). thanks for clarification! – dee zg Apr 21 '16 at 07:12
-
I am planning to user RoadAPI(I dont know how old it is) but it looks good. – Mandar Apr 21 '16 at 07:21
-
you should be good to go with roadApi(). only thing to think about is the limit of 100 points per route. – dee zg Apr 21 '16 at 07:40