Compressed protobufs?

2008-10-21 Thread GDR
I noticed the protocol buffers store strings in their uncompressed form. Is there any provision to produce and consume protobufs in compressed form? This would be specially helpful if a lot of fields were repeated strings. --~--~-~--~~~---~--~~ You received this

Data structures using protocol buffers

2008-10-21 Thread GDR
Hi, I'm wondering how would one go about implementing self-referential data structures? As an exercise, I tried to implement a PB version of the adjacency list representation of a graph. I'm having a hard time getting it work. Any suggestions? Thanks! --- graph.proto --- package graph;

Re: Data structures using protocol buffers

2008-10-22 Thread GDR
UndirectedGraphNode {    required string id = 0;    repeated UndirectedGraphNodeReference neighbors; } message UndirectedGraph {    repeated UndirectedGraphNode nodes; } -- Jeremy Leader [EMAIL PROTECTED] GDR wrote: Hi, I'm wondering how would one go about implementing self-referential data

Re: Data structures using protocol buffers

2008-10-22 Thread GDR
; } On Oct 22, 2:14 pm, Jeremy Leader [EMAIL PROTECTED] wrote: I was assuming all the properties of a node (weight, label, color, whatever) would be in UndirectedGraphNode; UndirectedGraphNodeReference would only have the id and nothing else. -- Jeremy Leader [EMAIL PROTECTED] GDR wrote: Thanks

Re: Data structures using protocol buffers

2008-10-22 Thread GDR
weight = 2; repeated UndirectedGraphNodeReference neighbors = 2; } message UndirectedGraph { repeated UndirectedGraphNode nodes = 1; } On Oct 22, 2:36 pm, GDR [EMAIL PROTECTED] wrote: That does solve the duplicate information problem but it makes updates to node attributes (like weight

Re: Data structures using protocol buffers

2008-10-23 Thread GDR
to their neighbors, and you'd probably need a map from node id to node object reference, which you'd use during deserialization. -- Jeremy Leader [EMAIL PROTECTED] GDR wrote: my bad. The code snippet should be as follows: for(UndirectedGraphNode node : UndirectedGraph.getNodesList

Re: Data structures using protocol buffers

2008-10-24 Thread GDR
, given that you can't actually store the entire graph in memory, let alone a protobuf message?  What graph operations are you looking to parallelize? -dave On Oct 23, 12:12 am, GDR [EMAIL PROTECTED] wrote: Thanks. I am trying to use protocol buffers with a map reduce framework to work