tag:blogger.com,1999:blog-14260847.post2056570034579772438..comments2010-09-08T15:41:11.748-07:00Comments on Justin's Extreme Blog: Client Side Google Protocol Buffers & GWTJustin Merzhttp://www.blogger.com/profile/03379021390882823404noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-14260847.post-2722239503869740542009-11-02T13:25:50.108-08:002009-11-02T13:25:50.108-08:00Sure, but please, before you judge the code, reali...Sure, but please, before you judge the code, realize this was a test. Once I did not get the performance I needed, I stopped working on this code base, so it is a bit ugly. Here are the two files you need <a href="http://casil.ucdavis.edu/~jrmerz/gwtproto/ProtoToGwtObject.java" rel="nofollow">Main Class</a> and <a href="http://casil.ucdavis.edu/~jrmerz/gwtproto/Parser.functions" rel="nofollow">include functions</a> for js protobuffer parsing.Justin Merzhttps://www.blogger.com/profile/03379021390882823404noreply@blogger.comtag:blogger.com,1999:blog-14260847.post-13096942303042366202009-10-31T10:59:27.135-07:002009-10-31T10:59:27.135-07:00Any chance you're planning on releasing your c...Any chance you're planning on releasing your compiler for others to use? I'd love to be able to use Protobufs in my GWT frontend, but haven't had time to make such a thing myself.Mark Schmithttps://www.blogger.com/profile/15572358987609719042noreply@blogger.comtag:blogger.com,1999:blog-14260847.post-15320107339954419952009-09-29T08:57:31.800-07:002009-09-29T08:57:31.800-07:00Ahh, OK. So the interesting part is the .proto par...Ahh, OK. So the interesting part is the .proto parser, which creates your overlay types. No actual new parser for a protobuf object (at least in your final code), since Google's reference implementation works fine for emitting server-side JSON. Thanks.Kirby Fileshttps://www.blogger.com/profile/00199395026191149723noreply@blogger.comtag:blogger.com,1999:blog-14260847.post-494104424596571612009-09-29T08:39:54.178-07:002009-09-29T08:39:54.178-07:00So I would read this first. http://code.google.com...So I would read this first. <a href="http://code.google.com/p/google-web-toolkit/issues/detail?id=2649&q=protocol" rel="nofollow">http://code.google.com/p/google-web-toolkit/issues/detail?id=2649&q=protocol</a> ... Tell's you why GWT can't compile the standard ProtoBuf code. As for what I am now doing; basically I have java code that runs the (ProtoBuf) java code (generated from the .proto file) and creates <a href="http://googlewebtoolkit.blogspot.com/2008/08/getting-to-really-know-gwt-part-2.html" rel="nofollow">GWT overlay types</a>. Then I have a server library that reads serialized protocol buffers and spits out JSON (that is then wrapped by the overlay types on the client). I have a test gadget <a href="http://comet.cs.ucdavis.edu/wiki/index.php/CIMIS_Sensor_Gadget" rel="nofollow">here</a>. You can see the queries are snappy. The protobufs are being stored in an <a href="http://rbnb.creare.com/rbnb/" rel="nofollow">RBNB server</a> that is queried by a GWT servlet on tomcat, the protobufs are de-serialized, turned into json, then sent to the client.Justin Merzhttps://www.blogger.com/profile/03379021390882823404noreply@blogger.comtag:blogger.com,1999:blog-14260847.post-68888406454376551662009-09-29T08:10:56.141-07:002009-09-29T08:10:56.141-07:00Could you please explain a little more of your sol...Could you please explain a little more of your solution? Google already releases Java ProtoBuf code. Since you're only sending JSON to the client, the ProtoBuf code doesn't need to be altered to be GWT-compilable, right? So all that's needed is to use the provided ProtoBuf parser to decode the protobuf, and then emit JSON. Am I missing something?Kirby Fileshttps://www.blogger.com/profile/00199395026191149723noreply@blogger.comtag:blogger.com,1999:blog-14260847.post-74254414275227700442009-09-29T04:24:49.821-07:002009-09-29T04:24:49.821-07:00Opera ?Opera ?Prof. Beatriz Rodrigueshttps://www.blogger.com/profile/13092240058149949007noreply@blogger.com