I have never written translations before, if you have comments, please write to habraposhta.Today we are pleased to present the Scope protocol
specifications This protocol is used to connect Opera with the Dragonfly debugger. It is also used in Opera for
automated browser
testing .
From the very beginning, we tried to make Dragonfly an open source project. All
code and
documentation are available under the BSD license, but without the specification of the protocol, it was difficult for third-party developers to create something new, or modify an existing one. The purpose of this release is to eliminate this flaw.
')
The documentation is more or less similar to the one we used inside the team, and this means that something may be missed simply because everyone in the team knew how it worked. If you encounter such spaces, please let us know
in the comments (link to comments on the original article) .
One of the reasons why we are releasing specs right now is because other browser vendors have started thinking about remote debugging. From the very beginning, this was what we focused on in Dragonfly, so we want to share our experiences and ideas with the rest.
The specification is divided into two parts. The current implementation, called Scope Transfer Protocol 0 (STP / 0), is based on XML. We concluded that this option is very slow when you need to transfer a lot of data, for example DOM-trees. One of the advantages of the XML-based protocol was that it was easy to implement on the client side using XMLHTTPRequests. Also, it is easily perceived visually, without additional tools.
The next generation protocol, STP / 1, is what we are working on right now. For the most part, the implementation is not ready yet, but we will release it as soon as we can. Up to this point there may still be changes in it. The protocol will continue to support XML, but we have added 2 more data transfer methods:
JSON and
Protocol Buffers . The data in all three cases will be the same, they will simply be transferred in different structures. This means that we can, for the most part, not change existing utilities running on XML, and simply switch to Protocol Buffers for better performance, or JSON, which is a compromise between ease of use in JavaScript and low traffic.
Our next release will be a build of Opera supporting STP / 1, along with tools to help you get started using the STP / 1 protocol.
Enjoy
reading !