#537 Bundling exception for py4j
Closed: Fixed None Opened 8 years ago by gil.

Hi
I would like to request permission to bundle forked code from MiGBase64 [1] in py4j package [2].

py4j contains a file Base64.java forked from migbase64 (not available in Fedora). This file is included in py4j source repository and maintained as part of the project. Since the file was forked, py4j upstream implemented a few features, removed some cruft and reformatted source.

[1] http://migbase64.cvs.sourceforge.net/viewvc/migbase64/migbase64/src/util/Base64.java?revision=1.2&content-type=text%2Fplain

[2] https://bugzilla.redhat.com/show_bug.cgi?id=1215762


Hmm, I do not think any more that bundling of MiGBase64 is a good idea. We should remove that file and patch the source to use the Java 8 (as now default in F21 and further) embedded logic with java.util.Base64 that also seems to have better performance. If there's no Java 8, it is possible to use the javax.xml.bind.DatatypeConverter class from Java 6 upwards.

For Java 7 and general backwards compatibility (as default in Fedora 20, EPEL7), we can switch to either java-base64 or base64coder, both are packaged in Fedora.

As Base64 is a standard codec, that should not mean any problem to use another library, and as the complete py4j project is licensed as BSD, there are no issues with patching the source.

More information about bad MiGBase64 vs. good Java 8 can be found here:
http://java-performance.info/base64-encoding-and-decoding-performance/

Login to comment on this ticket.

Metadata