-
Notifications
You must be signed in to change notification settings - Fork 1
/
scoring_dfd.tex
52 lines (46 loc) · 2.19 KB
/
scoring_dfd.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
% Data flow diagram
% Template adapted from http://www.texample.net/tikz/examples/data-flow-diagram/ by David Fokkema
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows,shapes}
% Custom, should be provided in the same directory.
\usepackage{datastore}
% Disable page number for better SVG.
\pagenumbering{gobble}
\begin{document}
\begin{tikzpicture}[
font=\sffamily,
every matrix/.style={ampersand replacement=\&,column sep=2cm,row sep=2cm},
interface/.style={draw,thick,regular polygon,regular polygon sides=4,inner sep=0},
process/.style={draw,thick,rounded corners,inner sep=.3 cm},
datastore/.style={draw,thick,shape=datastore,inner sep=.3cm},
to/.style={->,>=stealth',shorten >=1pt,semithick,font=\sffamily\footnotesize},
every node/.style={align=center}]
% Position the nodes using a matrix layout
\matrix{
\& \node[interface] (consumer) {Consumer}; \\
\node[datastore] (cache) {Score cache};
\& \node[process] (api) {ORES API}; \\
\& \node[process] (celery) {Task queue};
\& \node[process] (precache) {Precaching \\ daemon}; \\
\node[datastore] (model) {Model};
\& \node[process] (score) {Calculate score};
\& \node[interface] (mediawiki) {MediaWiki \\ API}; \\
\& \node[process] (extract) {Extract features}; \\
};
\node [below=1cm, align=flush center] at (extract)
{\Large ORES: Scoring \\ \normalsize data flow diagram};
% Draw the arrows between the nodes and label them.
\draw[to] (api) -- (consumer);
\draw[to] (cache) -- node[midway, above] {cached result} (api);
\draw[to] (api) to[bend right=25] node[midway, left] {new task} (celery);
\draw[to] (celery) to[bend right=25] node[midway, right] {response \\ from task} (api);
\draw[to] (precache) -- node[midway, above] {new job} (celery);
\draw[to] (score) -- node[midway, right] {classification \\ score} (celery);
\draw[to] (score) -- (cache);
\draw[to] (model) -- (score);
\draw[to] (extract) -- node[midway, left] {features} (score);
\draw[to] (mediawiki) -- node[midway, right] {recent changes} (precache);
\draw[to] (mediawiki) -- node[midway, right] {revision content \\ revision metadata} (extract);
\end{tikzpicture}
\end{document}