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 development
I don't know where to start. The first thing I think of is:
Delivery staff's mobile phoneAPP
And serverWebSocket
Direct 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:
How can a delivery personnel transmit the obtained location to the server in real time? every few seconds?ajax
I want to useWebSocket
Stable, distribution staff are always running around on the bus.
Does the server use memory data to store the location information of the delivery personnel,redis
SupportedGeographic Location Index
How can I check the distribution personnel near the order.
Will this generate a large amount of data,Memory database
Can 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 H5
OfSocket
Can you do this? the delivery staff may not have to use it.APP
As longWebSocket
Stability 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 development
I don't know where to start. The first thing I think of is:
Delivery staff's mobile phoneAPP
And serverWebSocket
Direct 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:
How can a delivery personnel transmit the obtained location to the server in real time? every few seconds?ajax
I want to useWebSocket
Stable, distribution staff are always running around on the bus.
Does the server use memory data to store the location information of the delivery personnel,redis
SupportedGeographic Location Index
How can I check the distribution personnel near the order.
Will this generate a large amount of data,Memory database
Can 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 H5
OfSocket
Can you do this? the delivery staff may not have to use it.APP
As longWebSocket
Stability 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
Web server
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.