Protocol buffers...

489 views
Skip to first unread message

Brett Morgan

unread,
Jul 7, 2008, 8:30:55 PM7/7/08
to google-a...@googlegroups.com
Just noticed that protocol buffers have been released. I am guessing this is the same protocol buffers that are in the AppEngine source base.

So I suppose the question is, is it possible to write a protocol buffer server that will interop with the AppEngine SDK?

--

Brett Morgan http://brett.morgan.googlepages.com/

David Symonds

unread,
Jul 7, 2008, 9:01:56 PM7/7/08
to google-a...@googlegroups.com
On Tue, Jul 8, 2008 at 10:30 AM, Brett Morgan <brett....@gmail.com> wrote:

> Just noticed that protocol buffers have been released. I am guessing this is
> the same protocol buffers that are in the AppEngine source base.
>
> So I suppose the question is, is it possible to write a protocol buffer
> server that will interop with the AppEngine SDK?

There's no protobuf "server"; it's just a way of
serialising/deserialising data. What thoughts did you have, exactly?


Dave.

Brett Morgan

unread,
Jul 7, 2008, 9:31:32 PM7/7/08
to google-a...@googlegroups.com


First thought. My understanding of the SDK code base is further off base than I thought. Time to do more reading.

My original thought was to have the SDK talking to an Erlang based back side that impersonates DataStore. 
 


Dave.


Sjors

unread,
Jul 8, 2008, 9:00:01 AM7/8/08
to Google App Engine
On Jul 8, 10:30 am, "Brett Morgan" <brett.mor...@gmail.com> wrote:
> Just noticed that protocol buffers have been released. I am guessing this is
> the same protocol buffers that are in the AppEngine source base.
>
> So I suppose the question is, is it possible to write a protocol buffer
> server that will interop with the AppEngine SDK?

Different question, but related: I would love to use these protocol
buffers in the Google App Engine. But when I try to import a _pb2.py
file, I get error:
<type 'exceptions.ImportError'>: No module named protobuf

I tried to copy protobuf-2.0.0beta/python/build/lib/google/ into my
app engine project, but that caused all sorts of name space problems
which I am not expert enough to deal with. So instead I copied
protobuf-2.0.0beta/python/build/lib/google/protobuf/ and removed the
"google." from the import statements. (Yes I know that is not
elegant).

This results in the following error:
File "/base/data/home/apps/osm-route-altitude-profile/1.17/protobuf/
internal/input_stream.py", line 60, in __init__
self._buffer = buffer(s)
RuntimeError: cannot create buffer objects in restricted execution
mode

So my guess is that we need to wait for the app engine team to either
white-list some stuff or drop in Protobuf.

Can't wait: it is extremely easy to use so far.

Sjors

mcsnolte

unread,
Jul 15, 2008, 5:42:59 PM7/15/08
to Google App Engine
Did you run the python setup?
/protobuf-2.0.0beta/python/README.txt
$ python setup.py test
$ python setup.py install

On Jul 8, 8:00 am, Sjors <provoostena...@gmail.com> wrote:
> On Jul 8, 10:30 am, "Brett Morgan" <brett.mor...@gmail.com> wrote:
>
> > Just noticed thatprotocolbuffershave been released. I am guessing this is
> > the sameprotocolbuffersthat are in the AppEngine source base.
>
> > So I suppose the question is, is it possible to write aprotocolbuffer
> > server that will interop with the AppEngine SDK?
>
> Different question, but related: I would love to use theseprotocolbuffersin the Google App Engine. But when I try to import a _pb2.py

Sjors Provoost

unread,
Jul 15, 2008, 9:11:03 PM7/15/08
to google-a...@googlegroups.com
I did. They work fine in my stand-alone python applications, but not
inside the SDK or online. That's why I assumed that they are using
some C code that is not yet white-listed.

Have you been able to successfully use protocol buffers in the SDK or
online? In that case, I'll keep looking.

Sjors

sectrean

unread,
Jul 21, 2008, 2:57:08 PM7/21/08
to Google App Engine
Any update on this? Did you get it working? I'm interested in using
Protocol Buffers with the App Engine as well.
> >> RuntimeError: cannot createbufferobjects in restricted execution
> >> mode
>
> >> So my guess is that we need to wait for the app engine team to either
> >> white-list some stuff or drop in Protobuf.
>
> >> Can't wait: it is extremely easy to use so far.
>
> >> Sjors- Hide quoted text -
>
> - Show quoted text -

Michael Angerman

unread,
Jul 25, 2008, 10:15:29 AM7/25/08
to google-a...@googlegroups.com
There is already a thread on this topic that I posted on
Jul 13 (go take a look at that) and then the response
from Brad Fitzpatrick to my post on Jul 16

From Brad's response it looks like Google would like
to release the protocol buffers -- they are just waiting
on moving to 2.0...

Brad kindly actually released the PB for the memcache service
and he said got "signoff" from the Google folks that it was OK
to do this...

So I am confident that this is on Google's TODO list to get all
of the PB's out there ASAP...

So I believe when the next release of AppEngine comes out PB's
might be in there -- if not -- sometime (hopefully) soon after that...

Once the PB's are part of the release it will greatly increase the flexibility
and usefulness of what an END USER can do when talking to the backend
datastore -- and also enable developers to roll their own back end datastore
on top of a persistent framework...

The OpenSourcing of Protocol Buffer's is a GIANT step forward and I believe
Google was motivated to do this after they saw GAE take off...  It was a natural
progression because GAE was one of the first products out there where PB was
being used -- so it made sense to go ahead and release the underlying technology...

Michael I Angerman
Albuquerque, New Mexico
http://www.zrato.com
Reply all
Reply to author
Forward
0 new messages