Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Side by Side Diff: runtime/vm/service/service.md

Issue 1270603003: Bump the VM service protocol version to 2.0. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/service.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Dart VM Service Protocol 1.0 (Draft 1) 1 # Dart VM Service Protocol 2.0
2 2
3 > Please post feedback to the [observatory-discuss group][discuss-list] 3 > Please post feedback to the [observatory-discuss group][discuss-list]
4 4
5 This document describes _draft 1_ of _version 1.0_ of the Dart VM 5 This document describes of _version 2.0_ of the Dart VM Service Protocol. This
6 Service Protocol. This protocol is used to communicate with a running 6 protocol is used to communicate with a running Dart Virtual Machine.
7 Dart Virtual Machine.
8 7
9 To use the Service Protocol, start the VM with the *--observe* flag. 8 To use the Service Protocol, start the VM with the *--observe* flag.
10 The VM will start a webserver which services protocol requests via WebSocket. 9 The VM will start a webserver which services protocol requests via WebSocket.
11 It is possible to make HTTP (non-WebSocket) requests, 10 It is possible to make HTTP (non-WebSocket) requests,
12 but this does not allow access to VM _events_ and is not documented 11 but this does not allow access to VM _events_ and is not documented
13 here. 12 here.
14 13
15 The Service Protocol uses [JSON-RPC 2.0][]. 14 The Service Protocol uses [JSON-RPC 2.0][].
16 15
17 [JSON-RPC 2.0]: http://www.jsonrpc.org/specification 16 [JSON-RPC 2.0]: http://www.jsonrpc.org/specification
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 _id_ property to pair it with the corresponding request. If the RPC 102 _id_ property to pair it with the corresponding request. If the RPC
104 was successful, the _result_ property provides the result. 103 was successful, the _result_ property provides the result.
105 104
106 Here is an example response for our [getVersion](#getversion) request above: 105 Here is an example response for our [getVersion](#getversion) request above:
107 106
108 ``` 107 ```
109 { 108 {
110 "jsonrpc": "2.0", 109 "jsonrpc": "2.0",
111 "result": { 110 "result": {
112 "type": "Version", 111 "type": "Version",
113 "major": 1, 112 "major": 2,
114 "minor": 0 113 "minor": 0
115 } 114 }
116 "id": "1" 115 "id": "1"
117 } 116 }
118 ``` 117 ```
119 118
120 Parameters for RPC requests are always provided as _named_ parameters. 119 Parameters for RPC requests are always provided as _named_ parameters.
121 The JSON-RPC spec provides for _positional_ parameters as well, but they 120 The JSON-RPC spec provides for _positional_ parameters as well, but they
122 are not supported by the Dart VM. 121 are not supported by the Dart VM.
123 122
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 292
294 ## Versioning 293 ## Versioning
295 294
296 The [getVersion](#getversion) RPC can be used to find the version of the protoco l 295 The [getVersion](#getversion) RPC can be used to find the version of the protoco l
297 returned by a VM. The _Version_ response has a major and a minor 296 returned by a VM. The _Version_ response has a major and a minor
298 version number: 297 version number:
299 298
300 ``` 299 ```
301 "result": { 300 "result": {
302 "type": "Version", 301 "type": "Version",
303 "major": 1, 302 "major": 2,
304 "minor": 0 303 "minor": 0
305 } 304 }
306 ``` 305 ```
307 306
308 The major version number is incremented when the protocol is changed 307 The major version number is incremented when the protocol is changed
309 in a potentially _incompatible_ way. An example of an incompatible 308 in a potentially _incompatible_ way. An example of an incompatible
310 change is removing a non-optional property from a result. 309 change is removing a non-optional property from a result.
311 310
312 The minor version number is incremented when the protocol is changed 311 The minor version number is incremented when the protocol is changed
313 in a _backwards compatible_ way. An example of a backwards compatible 312 in a _backwards compatible_ way. An example of a backwards compatible
(...skipping 1678 matching lines...) Expand 10 before | Expand all | Expand 10 after
1992 ``` 1991 ```
1993 1992
1994 ## Revision History 1993 ## Revision History
1995 1994
1996 version | comments 1995 version | comments
1997 ------- | -------- 1996 ------- | --------
1998 1.0 draft 1 | initial revision 1997 1.0 draft 1 | initial revision
1999 1998
2000 1999
2001 [discuss-list]: https://groups.google.com/a/dartlang.org/forum/#!forum/observato ry-discuss 2000 [discuss-list]: https://groups.google.com/a/dartlang.org/forum/#!forum/observato ry-discuss
OLDNEW
« no previous file with comments | « runtime/vm/service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698