Send geolocation to web service and update to other devices

Asked

Viewed 208 times

3

Well I couldn’t come up with a good title for the question.

But I am with the following problem, I am wanting to make an app like Easy Taxi, I will take the customer’s location and send to the 'franchisees''.

The question is, should I keep updating in the database every minute for example the location of the franchisee? There’d be another way to do it without saving it in a bank?

  • 1

    This is a matter of your choice and design. You only need to save it in the bank if you want to read this information from the bank. And the ideal update frequency you only encounter with experiments.

2 answers

1

Saving the data in the database will be an option if you want to use it for further analysis. But you can very well share this data to the customer without having to do some data persistence work, for example:

  • Store the current position of the franchisee in a list containing all current requests and according to the scheduled frequency this position of the franchisee is updated in the list. This same list will be used to capture the current position of the franchisee and send to the customer.

About sending the client geolocation to the franchisees, after being available on the server for distribution among the franchisees, you can use some shipping standards such as:

0

I think it’s a matter of architecture. You could use an integration Pattern called Publish/subscribe.

Using a messaging system, for example JMS, you could use a topic.

The client system "publishes" the location in the created topic. This information is received by all "subscribed systems" in this topic.

Browser other questions tagged

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