Johannes Hoff by Johannes Hoff in Blog

Post tags: automation dragonfly scope testing

This post is licensed under a Creative Commons Attribution 3.0 Unported license.

Scope Protocol release: how the fat lady sings

Today we are happy to release the specification for the Scope protocol. This is the protocol used for communication between the Opera browser and Opera Dragonfly. It is also used here at Opera for automated testing.

Since the release of Opera Dragonfly, we have tried to keep the project open source. The source and its documentation is available under BSD licence, but it is difficult to expand it or create something different without the protocol specification. This release wants to rectify that.

The documentation is more or less as we have used it internally to communicate inside the team, which means that some documentation is missing simply because everyone on the team knew what it was about. If something is unclear, let us know in the comments.

One of the reasons we are releasing right now, is that other browser makers have started discussing how to do remote debugging. Since the very start we have focused specifically on this, so we want to share our experience and ideas with everyone else.

The specification is split into two parts. The current implementation, which we call Scope Transfer Protocol 0 (STP/0), is an XML based protocol. Our experience has been that this is too slow once you start transferring big data structures, like DOM trees. One of the advantages of the XML protocol was that it was easy to create a client for it in JavaScript using XMLHTTPRequests. It is also very easy to debug visually without the need for special tools to parse the data.

The next generation protocol, STP/1, is what we are currently working on. It is just a sign of things to come,but we will release it in a public build as soon as it is ready. There might be changes to the protocol before that time. The protocol continues to support XML, but we have added two more serializers: JSON and Protocol Buffers. The messages are the same in an abstract sense, but they can be rendered to different data structures. This means that we can keep our XML tools mostly unchanged, but switch over to Protocol Buffers for faster transmissions, or to JSON for the sweet spot between easy of use by JavaScript and low bandwidth usage.

Our next release will be a public build of Opera using STP/1, together with tools to help you get started with communication through STP/1.

Enjoy the read!