Feature/improve with traffic design (#34)

* docs: update osrm with telenav traffic design

* docs: update osrm with traffic design
This commit is contained in:
Jay 2019-07-04 10:28:28 +08:00 committed by GitHub
parent cbd192c52e
commit 2b0db9f752
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 16 additions and 9 deletions

View File

@ -11,8 +11,8 @@ sequenceDiagram
J ->> U: Build done
U ->> K: Trigger deployment by Kubernetes
Loop e.g. every 5 minutes
K ->> K: Blue/Green deploy based on docker image
Loop e.g. every 20 minutes
K ->> K: Rolling update based on docker image
note over K: update traffic when container startup
end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 36 KiB

View File

@ -12,11 +12,17 @@ linkStyle 0 stroke:#FFF,stroke-width:0;
User["User"] -- request --> OSRM_ROUTED["osrm-routed"]
subgraph OSRM Containers
OSRM_ROUTED
OSRM_Traffic_Updater["OSRMTrafficUpdater"]
OSRM_Customize["osrm-customize"]
OSRM_ROUTED
style OSRM_Traffic_Updater fill:#acbfff,stroke-dasharray: 5, 5
style OSRM_Customize fill:#acbfff,stroke-dasharray: 5, 5
end
OSRM_Traffic_Updater -- RPC --> TrafficProxy["TrafficProxy"]
subgraph Traffic Containers
TrafficProxy

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

@ -15,8 +15,9 @@ style PrepareCompiledMapdata fill:#acbfff,stroke-dasharray: 5, 5
PrepareCompiledMapdata --> ConnectTrafficProxy["OSRMTrafficUpdate Connect TrafficProxy by RPC"]
subgraph OSRM Traffic Updater
ConnectTrafficProxy --> PullLatestTraffic["Pull latest traffic(from node, to node, speed) of full region"]
PullLatestTraffic --> WriteToCSV["Write to traffic.csv(as OSRM format)"]
ConnectTrafficProxy --> PullLatestTraffic["Pull latest traffic(+/-wayid, speed) of full region"]
PullLatestTraffic --> ConvertWayid2NodeIds["Convert wayid to nodeids, i.e. (from_nodeid, to_nodeid, speed)"]
ConvertWayid2NodeIds --> WriteToCSV["Write to traffic.csv(from_nodeid, to_nodeid, speed)"]
WriteToCSV --> ExitOSRMTrafficUpdater["Exit ExitOSRMTrafficUpdater"]
end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 90 KiB

View File

@ -1,17 +1,17 @@
# OSRM with Telenav Traffic Design (Draft)
# OSRM with Telenav Traffic Design
## Architecture
![osrm-with-telenav-traffic-architecture](./graph/osrm-with-telenav-traffic-architecture.mmd.png)
### OSRMTrafficUpdater
- as client
- as `RPC` client
- connect `TrafficProxy` by `RPC`
- convert contents from `RPC` protocol to `OSRM` required `csv` format, then write to file
### TrafficProxy
- as server
- as `RPC` server
- provide traffic contents by region
- contents include at least `from node, to node, speed`(both `from node` and `to node` are come from original mapdata)
- contents include at least `+/-wayid, speed`
## OSRM with Traffic Startup Flow
![osrm-with-traffic-startup-flow-chart](./graph/osrm-with-traffic-startup-flow-chart.mmd.png)