Javascript-hello everyone, what technologies do I need to use to build a software similar to Didi taxi?

Source: Internet
Author: User
To create such a project, similar to Didi Taxi, Meituan crowdsourcing is actually a local delivery: there are new take-out orders, pushed to the delivery staff near the order in real time, after receiving the list, the delivery personnel deliver the order. It looks simple, but for my web development, I don't know where to start ,...

We need to make such a project, similar to Didi Taxi, and the masses

In fact, it is local delivery: there is a new take-out order, which is pushed to the delivery staff near the order in real time. after receiving the order, the delivery staff delivers the order.

It looks simple, but for meWeb developmentI don't know where to start. The first thing I think of is:

Delivery staff's mobile phoneAPPAnd serverWebSocketDirect connection: uploads the geographical longitude and latitude to the server in real time. the server uses the memory database to save the location (redis/mongodb), And then periodically and cyclically check new orders, and constantly calculate whether there are distribution personnel near the new orders. If yes, it will be pushed to the corresponding distribution personnel.

The idea is simple, but there are several problems:

  1. How can a delivery personnel transmit the obtained location to the server in real time? every few seconds?ajaxI want to useWebSocketStable, distribution staff are always running around on the bus.

  2. Does the server use memory data to store the location information of the delivery personnel,redisSupportedGeographic Location IndexHow can I check the distribution personnel near the order.

  3. Will this generate a large amount of data,Memory databaseCan it be implemented?

I don't know what knowledge is needed here. I guess there should be these technologies:
1:nosql, Memory database
2: Real-time communication, multi-process, multi-thread, and concurrency
3:Queue,Timer program,CLI, Background resident service
4: Spatial index, spatial computing, and geographic location index computing
5:Socket programming,Socket communication, Socket push,H5 Socket
6: APP development, but I useweb H5OfSocketCan you do this? the delivery staff may not have to use it.APPAs longWebSocketStability is enough,ajax)

I hope the experienced experts will give me some advice and don't tell me to give up. I may not know the knowledge involved, but I may wish to say that I will learn it one by one. at least I know what knowledge is needed in this article.

Supplemental matching diagram (hummingbird crowdsourcing/da delivery ):

Thank you! ^_^

Reply content:

We need to make such a project, similar to Didi Taxi, and the masses

In fact, it is local delivery: there is a new take-out order, which is pushed to the delivery staff near the order in real time. after receiving the order, the delivery staff delivers the order.

It looks simple, but for meWeb developmentI don't know where to start. The first thing I think of is:

Delivery staff's mobile phoneAPPAnd serverWebSocketDirect connection: uploads the geographical longitude and latitude to the server in real time. the server uses the memory database to save the location (redis/mongodb), And then periodically and cyclically check new orders, and constantly calculate whether there are distribution personnel near the new orders. If yes, it will be pushed to the corresponding distribution personnel.

The idea is simple, but there are several problems:

  1. How can a delivery personnel transmit the obtained location to the server in real time? every few seconds?ajaxI want to useWebSocketStable, distribution staff are always running around on the bus.

  2. Does the server use memory data to store the location information of the delivery personnel,redisSupportedGeographic Location IndexHow can I check the distribution personnel near the order.

  3. Will this generate a large amount of data,Memory databaseCan it be implemented?

I don't know what knowledge is needed here. I guess there should be these technologies:
1:nosql, Memory database
2: Real-time communication, multi-process, multi-thread, and concurrency
3:Queue,Timer program,CLI, Background resident service
4: Spatial index, spatial computing, and geographic location index computing
5:Socket programming,Socket communication, Socket push,H5 Socket
6: APP development, but I useweb H5OfSocketCan you do this? the delivery staff may not have to use it.APPAs longWebSocketStability is enough,ajax)

I hope the experienced experts will give me some advice and don't tell me to give up. I may not know the knowledge involved, but I may wish to say that I will learn it one by one. at least I know what knowledge is needed in this article.

Supplemental matching diagram (hummingbird crowdsourcing/da delivery ):

Thank you! ^_^

First, thank you for your answers.
This type of project involves servers and clients.
Client
If the client uses H5, we recommend that you use socket. io instead of websocket. The former has many solutions and can be reconnected without being disconnected. There are not many front-end Logics. they are nothing more than regularly obtaining coordinates and then moving people on the map at the service end.
Server

  1. Web server

  2. Socket. io server
    The web server language is not limited, please note that the WEB server should not use complex computing, the web server is only responsible for displaying database data

There are many background programs, such as message queues and location computing, which need to be placed in the background.

Implementation is actually not complicated.
First, establish a persistent connection (any network technology, any network framework, as long as a persistent connection can be established ), when an order comes in, the server pushes a message to inform the client to send the geographic location (obtained based on the map api ), then, the server compares the geographical location of the customer who placed the order (you can compare it yourself. if the map provides APIs, you can use the api to compare it) and pick out the most recent batch of people, then dispatch orders (common programming logic ).

Then, in Phase I, the order tracking function (that is, the personnel's track data can be not saved) can be implemented later, and order tracking must be implemented, the location information needs to be sent every few seconds (the location information can be cached or persisted here to check whether future analysis is required. redis can be used for caching, and everything can be used ), then the server updates the location information.

The technology used can be selected. Currently, location information and location comparison are basically obtained by calling the Map api. to understand the principle, you can study the technology after completing the project.

The logic is simple, and the technology used in the first phase is not complicated. Big Data is usually used for filtering. if it is too complicated, it becomes overly-designed.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.