[erlang-questions] data sharing is outside the semantics of Erlang, but it sure is useful

Jayson Vantuyl kagato@REDACTED
Wed Sep 16 18:43:18 CEST 2009


I think the comparison is "Statistical Data Compression" versus  
"Semantic Data Compression".

I don't really think that it's useful to classify data sharing as data  
compression.  Bottom line, there's an optimization (and a clearly  
important one) that Erlang isn't doing.  Exporting the term to binary  
and compressing it isn't particularly fruitful, I suspect.

In a (horrifying) XML example, I think it's the difference between:

<!-- Semantically Compressed -->
<order>
   <address id="home">
     123 Any St
     Any Town, AS USA
   </address>
   <shipto href="#home" />
   <billto href="#home" />
</order>

<!-- Semantically Uncompressed -->
<order>
   <shipto>
     123 Any St
     Any Town, AS USA
   </shipto>
   <billto>
     123 Any St
     Any Town, AS USA
   </billto>
</order>

The original poster wants to be able to build structures like the  
first.  It's possible within a single process, but there's a  
technicality in that sending the structure via a message expands it.

The second poster is suggesting that you just GZIP the latter.  While  
this would undoubtedly work, it's extremely clunky, probably not  
actually kinder on memory usage (due to generating lots of binaries),  
and doesn't really address the problem that an existing optimization  
could be generalized to work between processes.

On Sep 16, 2009, at 9:31 AM, James Hague wrote:

>> It seems that James is interested in data structure sharing IN THIS
>> PARTICULAR CASE because it gives him a kind of data compression.   
>> Again,
>> if that's the goal, why is ordinary data compression *not* the answer
>> here?
>
> Can you clarify what you mean by "ordinary data compression?"
>
> ________________________________________________________________
> erlang-questions mailing list. See http://www.erlang.org/faq.html
> erlang-questions (at) erlang.org
>



-- 
Jayson Vantuyl
kagato@REDACTED





More information about the erlang-questions mailing list