We are getting ready to integrate Parsoid with RESTBase. This task tracks our progress and what's left to do.
Generally, we need a way to communicate multiple mime entities both in POST requests to Parsoid, and in responses from Parsoid back to RESTBase. We could use RFC 2387 or RFC 2388, but this seems to be a bit cumbersome especially for the response part. Instead, we can just use a simple JSON encoding with a structure that's otherwise basically identical to MIME.
The downside of using JSON is possibly efficiency (quite a bit more escaping going on, especially for HTML-in-JSON). However, we could address that later by optionally using a binary encoding like msgpack without changing the message structure itself.
Another option to consider would be to flatten the structure by using names like original.html. This would make it easy to encode the same message as multipart/related.
Implementation notes
- Parsoid: Slightly simpler format done & deployed. Needs to be updated to indicate the mime types as documented above.
- RESTBase: Prototype implementation.
- should pass to Parsoid:
- previous revision's HTML + data-parsoid OnEdit
- current revision's HTML + data-parsoid OnDependencyChange
- should pass to Parsoid:
- Parsoid WIP implementation: https://gerrit.wikimedia.org/r/#/c/165685/
- RESTBase to be done