The Javascript plugin duplicates the data structure definitions (PatchInfo, HunkInfo, RawDefinition, LocustChange, etc.) from the core Python library.
The fact that each plugin has to define its own data structures creates two kinds of issues:
Plugins can very easily go out of date in terms of their input and output interfaces
It is easy to make mistakes when defining a data structure that sits at a plugin boundary
Protobufs are a great way to give plugins a consistent interface to program against. We can define all of the core Locust data types as proto files and generate data structures for each language using protoc.
The Javascript plugin duplicates the data structure definitions (
PatchInfo
,HunkInfo
,RawDefinition
,LocustChange
, etc.) from the core Python library.The fact that each plugin has to define its own data structures creates two kinds of issues:
Protobufs are a great way to give plugins a consistent interface to program against. We can define all of the core Locust data types as proto files and generate data structures for each language using
protoc
.More documentation on protobuf: https://github.com/protocolbuffers/protobuf