Re: Compiler for the Android Protocol Buffers implementation?

2009-07-26 Thread Kenton Varda
That implementation was written completely independently of the protocol
buffers team at google, and is not maintained by us.  I've heard that it is
buggy, and it doesn't support many of the newer language features, though
since I've never used it myself or looked at the code I'm not sure if that's
true.  In any case, as far as I know they have not released the compiler
publicly -- but the Android people would know more about this than I would.

Hopefully the "lite" mode in upcoming protobuf version 2.2.0 (which I hope
to get out within the next couple weeks) will provide a better solution for
Android developers.  It no longer triggers this Dalvik VM bug, and is
generally much better suited to mobile platforms, while still providing
mostly the same API.

On Sat, Jul 25, 2009 at 5:52 AM, Michael Elsdörfer wrote:

>
> Due to a Dalvik VM bug, you can apparently run into deadlocks when
> using Protocol Buffers on Android (http://groups.google.com/group/
> android-developers/browse_thread/thread/c7b68765a02f74df
> ).
>
> A member of the Android team suggested (http://groups.google.com/group/
> android-developers/msg/978cd88517a5fc25)
> that one should possibly use
> a different Java implementation that Android also uses internally :
>
>
> http://android.git.kernel.org/?p=platform/external/protobuf.git;a=tree;f=src/com/google/common/io/protocol;h=44814a7cc40a99cf6a866e219793976de8f283a7;hb=HEAD
>
> However, it looks like the code that is generated by the official
> compiler isn't compatible with that implementation. Does a compatible
> compiler exist somewhere (in the open)?
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en
-~--~~~~--~~--~--~---



ANN: new Python protobuf implementation

2009-07-26 Thread David Wilson

I'm hacking on a protobuf encoder as part of a library to make
handling typed, structured data simpler, cleaner, and less error-
prone.

The project is still being designed (it's really just an experiment),
although has reached the point where it can convert protobuf's own
descriptor.proto (after conversion to a FileDescriptorSet via protoc -
o) into the target in-memory representation, and dump the resulting
tree to JSON.

It already has some features to differentiate it from the official
distribution:

 * The same structure definition method is used to serialize JSON too
(and eventually XML).
 * Natural interface, e.g. simply assign a new list of messages over
an old one, rather than slice assignment like the official
distribution.
 * Use types other than list for sequences, e.g. array.array('L'),
set, , etc.
 * Lighter weight runtime (61ms startup vs. 208ms for official
distribution on my MacBook)
 * Hopefully better perf, as it builds some structures to speed up
encoding/decoding. I've got more tricks to boost speed, but not ready
to start adding complexity yet.

Things it doesn't do yet:

 * Enums (you can just treat them as integers)
 * Preserve unrecognized data between load/dump roundtrips (planned)
 * Read .proto files (a FileDescriptorSet -> .py conversion tool is
about 50% done)
 * Generate .proto files based on its native representation (planned)
 * Completely defined type system. Native types are based on
protobuf's types, but going to add sme more, and perhaps tweak the
collections support into something more generic that can handle
arbitrary mapping types too.
 * Docs are incoherent pile of concatenated notes.

The PB support is in addition to the main goal for the library, so
certain features are omitted entirely, such as extensions,
configurable int packing, etc.

Feel free to  have a tinker, I'd especially like feedback on the
interface, and general performance:

http://code.google.com/p/py-datakit

See tests/encoding_testlib createKind & createEntity, and
pb_encoding.Encoding.encode() / decode().


David
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en
-~--~~~~--~~--~--~---