Hi Keith, Do you now that you don't really need to do any calculation to encode binary? You can simply apply string() to it to get a hex encoded string. But I agree that sending binary as binary makes more sense...
Kind regards, Geert > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of > Keith L. Breinholt > Sent: donderdag 1 april 2010 16:39 > To: General Mark Logic Developer Discussion > Subject: RE: [MarkLogic Dev General] Image cropping and > binary manipulation > > It's not the sending so much as the fact that > xdmp:http-post() and xdmp:http-put() won't allow you to send > binary objects. So you have to hex encode the binary first > and then decode it at the other end. > > We did several shots at this and on a 32-bit machine it was > taking close to 9 minutes to encode a 1MB file. Now I assume > that performance will be better on a 64-bit machine but even > if we cut the time in a quarter that's in the neighborhood of > 2 minutes for something that should only take several seconds > at most to send and receive. > > I've put a request for enhancement to MarkLogic because there > really isn't a good reason not to support sending binary objects. > > In the meantime we're writing the file to an NFS mount and > having an external process do the manipulations and write it > back to a drop directory. Takes less than a minute in worst > case scenario and it doesn't tie up a MarkLogic server or its > resources. > > Keith L. Breinholt > [email protected] > > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of > Geert Josten > Sent: Wednesday, March 31, 2010 11:45 PM > To: General Mark Logic Developer Discussion > Subject: RE: [MarkLogic Dev General] Image cropping and > binary manipulation > > Hi Keith, > > Have you actually measured the performance of sending > binaries back and forth to MLJAM? And did you compare with > plain HTTP attachment submission (or some other method)? I'd > be interested in knowing timing differences.. > > Kind regards, > Geert > > > > > > drs. G.P.H. (Geert) Josten > Consultant > > > Daidalos BV > Hoekeindsehof 1-4 > 2665 JZ Bleiswijk > > T +31 (0)10 850 1200 > F +31 (0)10 850 1199 > > mailto:[email protected] > http://www.daidalos.nl/ > > KvK 27164984 > > P Please consider the environment before printing this mail. > De informatie - verzonden in of met dit e-mailbericht - is > afkomstig van Daidalos BV en is uitsluitend bestemd voor de > geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, > verzoeken wij u het te verwijderen. Aan dit bericht kunnen > geen rechten worden ontleend. > > > > > Good suggestion Gert. Unfortunately the performance for the > > encode/decode of the binary makes MLJAM a nonstarter. > > > > I appreciate the suggestion though. > > > > Keith L. Breinholt > > [email protected] > > _______________________________________________ > General mailing list > [email protected] > http://xqzone.com/mailman/listinfo/general > > > NOTICE: This email message is for the sole use of the > intended recipient(s) and may contain confidential and > privileged information. Any unauthorized review, use, > disclosure or distribution is prohibited. If you are not the > intended recipient, please contact the sender by reply email > and destroy all copies of the original message. > > > _______________________________________________ > General mailing list > [email protected] > http://xqzone.com/mailman/listinfo/general > _______________________________________________ General mailing list [email protected] http://xqzone.com/mailman/listinfo/general
