On 11/11/08 8:38, Simon J Mudd wrote:
> [EMAIL PROTECTED] (RijilV) writes:
> 
>> On Fri, Nov 7, 2008 at 2:47 PM, Simon J Mudd <[EMAIL PROTECTED]> wrote:
> [snipped discussion]
> cfengine does EXACTLY the same thing but you can also copy over files
> which are large. So why can't puppet?

I you want the technical reason here it is:

Up to (and includingd) version 0.24, puppet uses XMLRPC over HTTP/SSL 
for its communications, including file serving.
XMLRPC is a remote procedure call protocol that marshalls/unmarshalls 
native types to XMLRPC types that are transferred in textual form.

That means a bunch of bytes (ie a byte string representing a file) is 
transferred as a text string with non-ASCII characters being escaped ala:
<string>AB%00CD%20...</string>

That means that each non 32-127 byte takes 3 bytes instead of one.
Your 40MB file was certainly transferred as a big 120MB string. That's 
why it's inefficient, and clearly not O(n).

The other inefficiency is that Puppet has to read the whole file in RAM 
to perform the escaping and XMLRPC transformation, because XMLRPC is not 
a "streaming" protocol.

Now, starting with the awaited and upcoming 0.25, Luke has moved puppet 
from XMLRPC to REST where binary blobs are transferred as binary blobs, 
so you won't have the marshalling penalty. I don't know for the 
streaming thing.

As others have already stated, Puppet wasn't designed to transfer files, 
it was designed as a configuration engine. The ability to transfer files 
comes "free" with the system, but is inefficient with large file (OK 
inefficient with files atm).

The good point is that puppet is still a young product, and is maturing 
days after days. Luke and the other developpers are pretty aware of the 
current issues and are worked on them :-)

Hope that helps,
-- 
Brice Figureau
Days of Wonder
http://www.daysofwonder.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to