Skip to content

CP-51693: introduce feature flag to use JSONRPC for internal pool communication #6123

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 19, 2024

Conversation

edwintorok
Copy link
Contributor

XenCenter uses JSONRPC, and our SDK also prefers it.

Benchmarks have also shown that the OCaml implementation of xmlrpc is slower than jsonrpc.
In order of decreasing speed: CSexp > JsonRPC > Sexplib > XmlRPC

╭─────────────────────────┬───────────────────────────┬───────────────────────────┬───────────────────────────╮
│name                     │  major-allocated          │  minor-allocated          │  monotonic-clock          │
├─────────────────────────┼───────────────────────────┼───────────────────────────┼───────────────────────────┤
│  rpc/of_string/csexp    │          4190.9180 mjw/run│         10283.3264 mnw/run│          29749.2737 ns/run│
│  rpc/of_string/jsonrpc  │         16674.5459 mjw/run│          4635.7389 mnw/run│         170947.3848 ns/run│
│  rpc/of_string/sexplib  │         12146.0870 mjw/run│          9776.0204 mnw/run│         334001.4020 ns/run│
│  rpc/of_string/xmlrpc   │         13178.2650 mjw/run│        212605.8519 mnw/run│        1203750.1038 ns/run│
│  rpc/to_string/csexp    │          9367.3232 mjw/run│          4926.4732 mnw/run│          67864.9349 ns/run│
│  rpc/to_string/jsonrpc  │         20749.7349 mjw/run│          2884.7246 mnw/run│         170285.9229 ns/run│
│  rpc/to_string/sexplib  │         22109.0000 mjw/run│          4368.8197 mnw/run│         220765.0898 ns/run│
│  rpc/to_string/xmlrpc   │         15137.2038 mjw/run│           510.7853 mnw/run│         201271.8122 ns/run│

This PR just introduces a feature flag, but doesn't enable it yet (it can be enabled in xapi.conf, or by inheriting from this branch and flipping the boolean, which is what I've done to test it)

@psafont
Copy link
Member

psafont commented Nov 18, 2024

The first commit is empty, and should be dropped

…internal communication

Feature flag: use-xmlrpc

Signed-off-by: Edwin Török <edwin.torok@cloud.com>
@psafont psafont merged commit a8f9bc6 into xapi-project:feature/perf Nov 19, 2024
15 checks passed
@edwintorok
Copy link
Contributor Author

There are some bugfixes I'll need to make to ocaml-rpc. Apparently JSONRPC doesn't implement DateTime or Base64, and although you can create them, parsing it back fails, because they just show up as strings.
Should be easy enough to fix alongside the int32 fixes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants