Request #1929

Drop Base64 encoding between drivers and core

Added by Simon Boulet about 8 years ago. Updated about 8 years ago.

Status:ClosedStart date:04/18/2013
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:Release 4.0
Pull request:

Description

I've been updating my driver to use the new VM_POLL feature for the IM driver to poll VMs. I noticed the output of the IM driver now needs to be Base64 encoded.

I'm curious to know if there are any particular reasons to use Base64? I could be wrong, but I don't see why Base64 encoding is needed. We don't exchange binary data between the drivers and the core (only XML), plus even if we did, it should be fine to exchange binary on std input/output.

Thanks

Simon

History

#1 Updated by Ruben S. Montero about 8 years ago

Hi Simon

The main reason is to simplify the parsing in the core. So we do not have to deal with blanks and the like. Probably driver -> core communication could be handled without base64. However the other way core -> driver is more problematic considering that some elements are directly used as commands arguments (and poses some security threats). So in our experience whenever you have to move XML around it is safer to encode it.

Cheers

#2 Updated by Ruben S. Montero about 8 years ago

Probably this need to be stated in the compatibility guide as we are breaking custom im's

#3 Updated by Simon Boulet about 8 years ago

Hi Ruben

I understand your point. Also it prevents multi-line XML from being returned by the driver (since the driver communication expect 1 result per line on stdin).

I haven't tested the actual overhead of encoding / decoding the base64, but for the moment I don't see this as a bottle neck on our platform. So I guess it's fine for now.

Thanks for your feedback.

#4 Updated by Ruben S. Montero about 8 years ago

  • Status changed from New to Closed

Ok closing..

Also available in: Atom PDF