Skip to content

Commit 62151ab

Browse files
committed
[WIP] TSP description, vision and guidelines
My interpretation of the TSP. A tentative description of what it is, what it aims to accomplish and the use cases it aims to solve. Some initial guidelines to follow when extending the TSP to accomodate new use cases.
1 parent fa3a7d9 commit 62151ab

File tree

1 file changed

+94
-5
lines changed

1 file changed

+94
-5
lines changed

README.md

Lines changed: 94 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,104 @@
11
# trace-server-protocol
22

3-
Specification of the Trace Server Protocol
4-
5-
This protocol is built to decouple the backend and frontend of trace analysers, allowing traces to reside and be analysed on the backend, and visual models to be exchanged with a variety of clients.
6-
7-
The protocol is meant to be RESTful, over HTTP.
3+
Specification of the Trace Server Protocol (TSP).
84

95
The specification is currently written in **OpenAPI 3.0** and can be pretty-visualized in the [github pages][tspGhPages].
106

117
**👋 Want to help?** Read our [contributor guide][contributing].
128

9+
## About, why and goals of the TSP:
10+
11+
Similarly to the philosophy behind the Language Server Protocol (LSP),
12+
the TSP is an open, HTTP-based protocol for use between *analytics or
13+
interactive visualization web applications* and *servers that provide
14+
trace analysis specific features* such as:
15+
16+
- generation of data that can interpeted as charts from trace analysis
17+
- selection, filtering and correlation of elements in charts using data
18+
contained in the traces
19+
- statistics calculation from data contained in the traces
20+
21+
The goal of the protocol is to allow trace analysis support to be
22+
implemented and distributed independently of any given analytics or
23+
interactive visualization web application.
24+
25+
## What the TSP is:
26+
27+
The TSP is a RESTful API on top of the HTTP protocol that enables to:
28+
29+
- analyze time series data (e.g. traces and logs);
30+
- return the result of the analysis in form of data that represents
31+
*charts* or *charts components*;
32+
- *navigate (or explore)* through the returned data;
33+
34+
Summarizing:
35+
36+
> the TSP is an API to explore data and navigate charts that has been
37+
> generated from the interpretation of time series data.
38+
39+
With the term *chart* we mean different type of visualizations such as
40+
XY charts, timegraph charts, tables, pie charts, etc.
41+
42+
With the term *chart components* we mean different elements that
43+
can be used to build or enrich charts such as arrows, annotations,
44+
bookmarks, etc.
45+
46+
With the terms *exploration and navigation* we mean interactions with
47+
the charts, such as:
48+
49+
- **filter** specific components of the charts. For example:
50+
- remove from the chart all components that do not match a condition;
51+
- return components of the chart that do match a condition;
52+
- **select** a subset of all data points of a chart. For example:
53+
- given a Timegraph chart, return only the data between a specific
54+
time interval
55+
- **select** specific components of the charts. For example:
56+
- when analyzing the trace of a SW execution, select only some
57+
components of the chart that represent specific SW functions;
58+
- when analyzing the trace of a SW execution, select only some
59+
components of the chart executed on specific CPUs;
60+
- given a Timegraph chart, automatically select areas of the chart
61+
where the components match a specific condition (**zoom-on-crash-area**)
62+
- **correlate** components between charts. For example:
63+
- given 2 charts generated by the analysis of the same time series data,
64+
it enables to correlate the chart components that represent the same
65+
information. For example, given a table containing the max length
66+
of an interval in a time chart, it enables to identify the corresponding
67+
interval in the time chart (**go-to-min/max**)
68+
- **correlate** chart components and their information. For example:
69+
- given a interval in a time chart, extrapolate all information related
70+
to that interval (e.g. **source location**)
71+
- **order** specific parts of the charts. For example:
72+
- return the **N longest** intervals of a timegraph chart;
73+
- **customize** charts and charts components. For example:
74+
- given a table containing statistics from analysis of all input data,
75+
generate a new table containing statistics from analysis of a
76+
subset of the input data;
77+
- given a time chart where intervals represent thread execution over
78+
time, and they are connected using arrows, generate a new time chart
79+
showing the longest path of connected intervals (e.g. **critical path**)
80+
81+
## Guidelines for the TSP implementation
82+
83+
The main resources (endpoints) of the API should be:
84+
85+
- **data sources** (e.g. time series data such as traces and logs). These
86+
are analyzed and used to create the data that can be retrieved;
87+
- **charts** (e.g. tables, XY charts), used to retrieve data representing
88+
a chart;
89+
- **chart components** (e.g. annotations, styles), used to retrieve data
90+
representing specific information for a chart;
91+
92+
The *exploration and navigation* should be achieved by:
93+
94+
- parameters in the HTTP message body data. These parameters should be:
95+
- **data source related**. For example, considering that data sources
96+
have a strong relation to time, a classic parameter can be "time"
97+
related (e.g. *requested_timerange*);
98+
- **chart related**. For example, when "talking" to a resource representing
99+
an XY chart, a parameter can be related to "XY dimensions" (e.g.
100+
*requested_Y_elements*);
101+
13102
## Current version
14103

15104
The current version of the specification is currently implemented and supported in the [Trace Compass trace-server][tcServer] (reference implementation) and what is currently supported by the [tsp-typescript-client][tspClient].

0 commit comments

Comments
 (0)