-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docs Updating!
- Loading branch information
Showing
11 changed files
with
462 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Architecture | ||
|
||
![img](./image/architecture.png) | ||
|
||
Key Components and Features: | ||
|
||
- [ ] **HTTP / RPC Server**: PIP Server, providing API for PDP to get data usage information. | ||
- [ ] **Analyzer**: Analyze data usage information and generate data usage behavior. | ||
- [x] **CLI**: CLI for administrator to manage duetector. | ||
- [x] **BccMonitor**: Monitor data usage behavior in kernel space. Use BCC to implement. | ||
- [ ] **PollingMonitor**: A general monitor for custom command. Polling the output of command. | ||
- [x] **TracerManager**: Manage tracers, support plugin. | ||
- [x] **OpenTracer**: A `bcc` tracer, trace `open` syscall. | ||
- [ ] ... | ||
- [x] **FilterManager**: Manage filters, support plugin. | ||
- [x] **DefaultFilter**: Filtering some meaningless information | ||
- [ ] ... | ||
- [x] **CollectorManager**: Manage collectors, support plugin. | ||
- [x] **DBCollector**: Collect filted trackings and store them into database. | ||
- [ ] ... | ||
|
||
# Data Flow | ||
|
||
![img](./image/dataflow.png) | ||
|
||
Current data flow implementation: | ||
|
||
1. Register **Tracer's** `callback` to host, and start **Monitor**. | ||
2. Once **Monitor's** `poll` is called, it will trigger **Tracer's** `callback` | ||
3. **Tracer's** `callback` will call **Filter** to filter the data. | ||
4. **Filter's** `filter` will call **Collector's** `emit` to collect the data. | ||
|
||
The following are not yet realized and may be subject to change. | ||
|
||
- [ ] **Collector** will get data from **Collector**. | ||
- [ ] **HTTP / RPC Server** will get data from **Collector**. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
<mxfile host="65bd71144e"> | ||
<diagram id="71-AI3Yj6Bn5oummquvE" name="第 1 页"> | ||
<mxGraphModel dx="658" dy="1562" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0"> | ||
<root> | ||
<mxCell id="0"/> | ||
<mxCell id="1" parent="0"/> | ||
<mxCell id="54" value="" style="edgeStyle=none;html=1;" parent="1" source="52" target="14" edge="1"> | ||
<mxGeometry relative="1" as="geometry"/> | ||
</mxCell> | ||
<mxCell id="31" value="" style="rounded=0;whiteSpace=wrap;html=1;dashed=1;" parent="1" vertex="1"> | ||
<mxGeometry x="285" y="470" width="100" height="310" as="geometry"/> | ||
</mxCell> | ||
<mxCell id="14" value="HTTP / RPC Service" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;dashed=1;" parent="1" vertex="1"> | ||
<mxGeometry x="280" y="230" width="420" height="60" as="geometry"/> | ||
</mxCell> | ||
<mxCell id="18" value="BccMonitor" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1"> | ||
<mxGeometry x="280" y="310" width="170" height="60" as="geometry"/> | ||
</mxCell> | ||
<mxCell id="20" value="TracerManager" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;" parent="1" vertex="1"> | ||
<mxGeometry x="280" y="390" width="110" height="60" as="geometry"/> | ||
</mxCell> | ||
<mxCell id="25" value="PollingMonitor" style="rounded=0;whiteSpace=wrap;html=1;dashed=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1"> | ||
<mxGeometry x="460" y="310" width="170" height="60" as="geometry"/> | ||
</mxCell> | ||
<mxCell id="26" value="FilterManager" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;" parent="1" vertex="1"> | ||
<mxGeometry x="400" y="390" width="110" height="60" as="geometry"/> | ||
</mxCell> | ||
<mxCell id="27" value="CollectorManager" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;" parent="1" vertex="1"> | ||
<mxGeometry x="520" y="390" width="110" height="60" as="geometry"/> | ||
</mxCell> | ||
<mxCell id="28" value="OpenTracer" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;" parent="1" vertex="1"> | ||
<mxGeometry x="290" y="480" width="90" height="60" as="geometry"/> | ||
</mxCell> | ||
<mxCell id="37" value="" style="rounded=0;whiteSpace=wrap;html=1;dashed=1;" parent="1" vertex="1"> | ||
<mxGeometry x="405" y="470" width="100" height="310" as="geometry"/> | ||
</mxCell> | ||
<mxCell id="38" value="DefaultFilter" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;" parent="1" vertex="1"> | ||
<mxGeometry x="410" y="480" width="90" height="60" as="geometry"/> | ||
</mxCell> | ||
<mxCell id="39" value="GlobFilter" style="rounded=0;whiteSpace=wrap;html=1;dashed=1;fillColor=#e1d5e7;strokeColor=#9673a6;" parent="1" vertex="1"> | ||
<mxGeometry x="410" y="560" width="90" height="60" as="geometry"/> | ||
</mxCell> | ||
<mxCell id="40" value="RegFilter" style="rounded=0;whiteSpace=wrap;html=1;dashed=1;fillColor=#e1d5e7;strokeColor=#9673a6;" parent="1" vertex="1"> | ||
<mxGeometry x="410" y="640" width="90" height="60" as="geometry"/> | ||
</mxCell> | ||
<mxCell id="41" value="ExecTracer" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;" parent="1" vertex="1"> | ||
<mxGeometry x="290" y="560" width="90" height="60" as="geometry"/> | ||
</mxCell> | ||
<mxCell id="43" value="" style="endArrow=none;dashed=1;html=1;dashPattern=1 3;strokeWidth=2;entryX=0.45;entryY=0.613;entryDx=0;entryDy=0;entryPerimeter=0;exitX=0.45;exitY=0.871;exitDx=0;exitDy=0;exitPerimeter=0;" parent="1" source="31" target="31" edge="1"> | ||
<mxGeometry width="50" height="50" relative="1" as="geometry"> | ||
<mxPoint x="380" y="510" as="sourcePoint"/> | ||
<mxPoint x="430" y="460" as="targetPoint"/> | ||
</mxGeometry> | ||
</mxCell> | ||
<mxCell id="44" value="" style="rounded=0;whiteSpace=wrap;html=1;dashed=1;" parent="1" vertex="1"> | ||
<mxGeometry x="524" y="470" width="100" height="310" as="geometry"/> | ||
</mxCell> | ||
<mxCell id="45" value="DBCollector" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;" parent="1" vertex="1"> | ||
<mxGeometry x="529" y="480" width="90" height="60" as="geometry"/> | ||
</mxCell> | ||
<mxCell id="48" value="MongoCollector" style="rounded=0;whiteSpace=wrap;html=1;dashed=1;fillColor=#e1d5e7;strokeColor=#9673a6;" parent="1" vertex="1"> | ||
<mxGeometry x="529" y="550" width="90" height="60" as="geometry"/> | ||
</mxCell> | ||
<mxCell id="50" value="CLI" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="1" vertex="1"> | ||
<mxGeometry x="140" y="310" width="120" height="60" as="geometry"/> | ||
</mxCell> | ||
<mxCell id="53" value="" style="edgeStyle=none;html=1;" parent="1" source="51" target="50" edge="1"> | ||
<mxGeometry relative="1" as="geometry"/> | ||
</mxCell> | ||
<mxCell id="51" value="Admin" style="shape=umlActor;verticalLabelPosition=bottom;verticalAlign=top;html=1;outlineConnect=0;" parent="1" vertex="1"> | ||
<mxGeometry x="40" y="310" width="30" height="60" as="geometry"/> | ||
</mxCell> | ||
<mxCell id="52" value="PEP" style="shape=umlActor;verticalLabelPosition=bottom;verticalAlign=top;html=1;outlineConnect=0;" parent="1" vertex="1"> | ||
<mxGeometry x="475" y="90" width="30" height="60" as="geometry"/> | ||
</mxCell> | ||
<mxCell id="56" value="bcc" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;fontColor=#333333;" parent="1" vertex="1"> | ||
<mxGeometry x="285" y="340" width="45" height="25" as="geometry"/> | ||
</mxCell> | ||
<mxCell id="58" value="Analyzer" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;dashed=1;" vertex="1" parent="1"> | ||
<mxGeometry x="640" y="310" width="60" height="140" as="geometry"/> | ||
</mxCell> | ||
</root> | ||
</mxGraphModel> | ||
</diagram> | ||
</mxfile> |
Oops, something went wrong.