Re: Compiling on AIX 5.3 using xlC 3.55 compiler
Hey Kenton, This is compilation without STL implementation . I am assuming that if hash_map does not exist , google protocol buffer emulates hash_map. I am pasting 3-4 instances of stack where protoc is in infinite loop #0 0xd1cfdc60 in _Node::_Right__Q2_3std5_TreeXTQ2_3std12_Tmap_traitsXTQ2_3std12basic_stringXTcTQ2_3std11char_traitsXTc_TQ2_3std9allocatorXTc__TQ3_6google8protobuf25FieldDescriptorProto_TypeTQ3_6google8protobuf4hashXTQ2_3std12basic_stringXTcTQ2_3std11char_traitsXTc_TQ2_3std9allocatorXTc___TQ2_3std9allocatorXTQ2_3std4pairXTCQ2_3std12basic_stringXTcTQ2_3std11char_traitsXTc_TQ2_3std9allocatorXTc__TQ3_6google8protobuf25FieldDescriptorProto_Type__SP0__FPQ3_3std9_Tree_nodXTQ2_3std12_Tmap_traitsXTQ2_3std12basic_stringXTcTQ2_3std11char_traitsXTc_TQ2_3std9allocatorXTc__TQ3_6google8protobuf25FieldDescriptorProto_TypeTQ3_6google8protobuf4hashXTQ2_3std12basic_stringXTcTQ2_3std11char_traitsXTc_TQ2_3std9allocatorXTc___TQ2_3std9allocatorXTQ2_3std4pairXTCQ2_3std12basic_stringXTcTQ2_3std11char_traitsXTc_TQ2_3std9allocatorXTc__TQ3_6google8protobuf25FieldDescriptorProto_Type__SP0 (_P=0xf04ca4e0) at /usr/vacpp/include/xtree:154 #1 0xd1d1bbdc in _Lbound__Q2_3std5_TreeXTQ2_3std12_Tmap_traitsXTQ2_3std12basic_stringXTcTQ2_3std11char_traitsXTc_TQ2_3std9allocatorXTc__TQ3_6google8protobuf25FieldDescriptorProto_TypeTQ3_6google8protobuf4hashXTQ2_3std12basic_stringXTcTQ2_3std11char_traitsXTc_TQ2_3std9allocatorXTc___TQ2_3std9allocatorXTQ2_3std4pairXTCQ2_3std12basic_stringXTcTQ2_3std11char_traitsXTc_TQ2_3std9allocatorXTc__TQ3_6google8protobuf25FieldDescriptorProto_Type__SP0__CFRCQ2_3std12basic_stringXTcTQ2_3std11char_traitsXTc_TQ2_3std9allocatorXTc__ (this=0xf04ca4e0, _...@0x2ffc) at /usr/vacpp/include/xtree.t:377 #2 0xd1d22878 in lower_bound__Q2_3std5_TreeXTQ2_3std12_Tmap_traitsXTQ2_3std12basic_stringXTcTQ2_3std11char_traitsXTc_TQ2_3std9allocatorXTc__TQ3_6google8protobuf25FieldDescriptorProto_TypeTQ3_6google8protobuf4hashXTQ2_3std12basic_stringXTcTQ2_3std11char_traitsXTc_TQ2_3std9allocatorXTc___TQ2_3std9allocatorXTQ2_3std4pairXTCQ2_3std12basic_stringXTcTQ2_3std11char_traitsXTc_TQ2_3std9allocatorXTc__TQ3_6google8protobuf25FieldDescriptorProto_Type__SP0__CFRCQ2_3std12basic_stringXTcTQ2_3std11char_traitsXTc_TQ2_3std9allocatorXTc__ (this=0xf04ca4e0, __classretu...@0x2ff21d70, _...@0x2ffc) at /usr/ vacpp/include/xtree:377 #3 0xd1d28f34 in find__Q2_3std5_TreeXTQ2_3std12_Tmap_traitsXTQ2_3std12basic_stringXTcTQ2_3std11char_traitsXTc_TQ2_3std9allocatorXTc__TQ3_6google8protobuf25FieldDescriptorProto_TypeTQ3_6google8protobuf4hashXTQ2_3std12basic_stringXTcTQ2_3std11char_traitsXTc_TQ2_3std9allocatorXTc___TQ2_3std9allocatorXTQ2_3std4pairXTCQ2_3std12basic_stringXTcTQ2_3std11char_traitsXTc_TQ2_3std9allocatorXTc__TQ3_6google8protobuf25FieldDescriptorProto_Type__SP0__CFRCQ2_3std12basic_stringXTcTQ2_3std11char_traitsXTc_TQ2_3std9allocatorXTc__ (this=0xf04ca4e0, __classretu...@0x2ff21dd0, _...@0x2ffc) at /usr/ vacpp/include/xtree:365 #4 0xd1d2fd34 in ParseType__Q4_6google8protobuf8compiler6ParserFPQ3_6google8protobuf25FieldDescriptorProto_TypePQ2_3std12basic_stringXTcTQ2_3std11char_traitsXTc_TQ2_3std9allocatorXTc__ (this=0x2ff22278, type=0x2ff21e24, type_name=0x2ff21e28) at google/protobuf/compiler/ parser.cc:1000 #5 0xd1d31438 in ParseMessageField__Q4_6google8protobuf8compiler6ParserFPQ3_6google8protobuf20FieldDescriptorProtoPQ3_6google8protobuf16RepeatedPtrFieldXTQ3_6google8protobuf15DescriptorProto_ ( this=0x2ff22278, field=0x2000f918, messages=0x2000f808) at google/ protobuf/compiler/parser.cc:443 #6 0xd1d30f50 in google::protobuf::compiler::Parser::ParseMessageStatement (this=0x2ff22278, message=0x2000f7a8) at google/protobuf/compiler/ parser.cc:428 #7 0xd1d310c4 in google::protobuf::compiler::Parser::ParseMessageBlock (this=0x2ff22278, message=0x2000f7a8) at google/protobuf/compiler/ parser.cc:402 #8 0xd1d30c80 in google::protobuf::compiler::Parser::ParseMessageDefinition (this=0x2ff22278, message=0x2000f7a8) at google/protobuf/compiler/ parser.cc:389 #9 0xd1d30e28 in google::protobuf::compiler::Parser::ParseMessageStatement (this=0x2ff22278, message=0x2000f668) at google/protobuf/compiler/ parser.cc:417 #10 0xd1d310c4 in google::protobuf::compiler::Parser::ParseMessageBlock (this=0x2ff22278, message=0x2000f668) at google/protobuf/compiler/ parser.cc:402 #11 0xd1d30c80 in google::protobuf::compiler::Parser::ParseMessageDefinition (this=0x2ff22278, message=0x2000f668) at google/protobuf/compiler/ parser.cc:389 #12 0xd1d3250c in google::protobuf::compiler::Parser::ParseTopLevelStatement (this=0x2ff22278, file=0x2ff22320) at google/protobuf/compiler/ parser.cc:362 #13 0xd1d32c80 in google::protobuf::compiler::Parser::Parse (this=0x2ff22278, input=0x2ff8, file=0x2ff22320) at google/ protobuf/compiler/parser.cc:321 #14 0xd1d4965c in FindFileByName__Q4_6google8protobuf8compiler28SourceTreeDescriptorDatabaseFRCQ2_3std12basic_stringXTcTQ2_3std11char_traitsXTc_TQ2_3std9allocatorXTc (this=0x2ff2254
Re: Compiling on AIX 5.3 using xlC 3.55 compiler
This looks like a problem with the STL implementation. Sorry, I don't know what to do about this. On Tue, Jun 30, 2009 at 5:32 PM, vikram wrote: > > My attempt to use default hash_map implementation in source leads to > infinite loop. So I tried to links source with STLport 4.6.1 version > for AIX. > For XLC i provided tempinc option to create default directory for > template instantiation. But I am not able to compile it. > "/net/bld9-ibm/XYZ01/build/tools/Development/STLport/AIX/STLport-4.6.1/ > stlport/stl/_alloc.h", > > line 60.12: 1540-0836 (S) The #include file is not found. > "/net/bld9-ibm/XYZ01/build/tools/Development/STLport/AIX/STLport-4.6.1/ > stlport/stl/_alloc.h", > > line 64.11: 1540-0836 (S) The #include file is not > found. > "/net/bld9-ibm/XYZ01/build/tools/Development/STLport/AIX/STLport-4.6.1/ > stlport/stl/_alloc.h", > > line 68.11: 1540-0836 (S) The #include file is not > found. > "/net/bld9-ibm/XYZ01/build/tools/Development/STLport/AIX/STLport-4.6.1/ > stlport/stl/_function_ba > > se.h", line 34.10: 1540-0836 (S) The #include file is > not found. > "/net/bld9-ibm/XYZ01/build/tools/Development/STLport/AIX/STLport-4.6.1/ > stlport/stl/_iterator_ba > > se.h", line 44.11: 1540-0836 (S) The #include file > is not found. > "/net/bld9-ibm/XYZ01/build/tools/Development/STLport/AIX/STLport-4.6.1/ > stlport/stl/_iterator_ba > > se.h", line 152.12: 1540-0836 (S) The #include file _ptrs_specialize.h> is not found. > "/net/bld9-ibm/XYZ01/build/tools/Development/STLport/AIX/STLport-4.6.1/ > stlport/stl/_string.h", > > line 31.12: 1540-0836 (S) The #include file is not > found. > "/net/bld9-ibm/XYZ01/build/tools/Development/STLport/AIX/STLport-4.6.1/ > stlport/stl/_string.h", > > line 38.11: 1540-0836 (S) The #include file is > not found. > "/net/bld9-ibm/XYZ01/build/tools/Development/STLport/AIX/STLport-4.6.1/ > stlport/stl/_string.h", > > line 40.11: 1540-0836 (S) The #include file is not > found. > "/net/bld9-ibm/XYZ01/build/tools/Development/STLport/AIX/STLport-4.6.1/ > stlport/stl/_string.h", > > line 44.11: 1540-0836 (S) The #include file is not > found. > "/net/bld9-ibm/XYZ01/build/tools/Development/STLport/AIX/STLport-4.6.1/ > stlport/stl/_string.h", > > line 1490.12: 1540-0836 (S) The #include file is not > found. > "/net/bld9-ibm/XYZ01/build/tools/Development/STLport/AIX/STLport-4.6.1/ > stlport/stl/_string.h", > > line 1493.11: 1540-0836 (S) The #include file is > not found. > "/net/bld9-ibm/XYZ01/build/tools/Development/STLport/AIX/STLport-4.6.1/ > stlport/stl/_string.h", > > line 1494.11: 1540-0836 (S) The #include file is > not found. > "/net/bld9-ibm/XYZ01/build/tools/Development/STLport/AIX/STLport-4.6.1/ > stlport/stl/_tree.h", > > line 54.12: 1540-0836 (S) The #include file is not > found. > "/net/bld9-ibm/XYZ01/build/tools/Development/STLport/AIX/STLport-4.6.1/ > stlport/stl/_tree.h", > > line 58.12: 1540-0836 (S) The #include file is not > found. > "/net/bld9-ibm/XYZ01/build/tools/Development/STLport/AIX/STLport-4.6.1/ > stlport/stl/_tree.h", > > line 62.12: 1540-0836 (S) The #include file is not > found. > "/net/bld9-ibm/XYZ01/build/tools/Development/STLport/AIX/STLport-4.6.1/ > stlport/stl/_tree.h", > > line 66.12: 1540-0836 (S) The #include file is not > found. > "/net/bld9-ibm/XYZ01/build/tools/Development/STLport/AIX/STLport-4.6.1/ > stlport/stl/_tree.h", > > line 70.12: 1540-0836 (S) The #include file is > not found. > "/net/bld9-ibm/XYZ01/build/tools/Development/STLport/AIX/STLport-4.6.1/ > stlport/stl/_tree.h", > > line 591.12: 1540-0836 (S) The #include file is not > found. > "/net/bld9-ibm/XYZ01/build/tools/Development/STLport/AIX/STLport-4.6.1/ > stlport/stl/char_traits. > > h", line 46.11: 1540-0836 (S) The #include file is > not found. > "/net/bld9-ibm/XYZ01/build/tools/Development/STLport/AIX/STLport-4.6.1/ > stlport/stl/char_traits. > > h", line 50.12: 1540-0836 (S) The #include file is not > found. > "/work/vpatil/protobuf-2.1.0/src/./google/protobuf/descriptor.h", line > 59.10: 1540-0836 (S) The > > #include file is not found. > "/work/vpatil/protobuf-2.1.0/src/./google/protobuf/descriptor.pb.h", > line 8.10: 1540-0836 (S) > > The #include file is not found. > "/work/vpatil/protobuf-2.1.0/src/./google/protobuf/descriptor.pb.h", > line 11.2: 1540-0859 (S) > > #error directive: This file was generated by a newer version of protoc > which is. > "/work/vpatil/protobuf-2.1.0/src/./google/protobuf/descriptor.pb.h", > line 12.2: 1540-0859 (S) > > #error directive: incompatible with your Protocol Buffer headers. > Please update. > "/work/vpatil/protobuf-2.1.0/src/./google/protobuf/descriptor.pb.h", > line 13.2: 1540-0859 (S) > > #error directive: your headers.. > "/work/vpatil/protobuf-2.1.0/src/./google/protobuf/descriptor.pb.h", > line 21.10: 1540-0836 (S) > > The #include file is > not found. > "/work/vpatil/protobuf-2.1.0/src/./google/protobuf/descriptor.pb.h", > line 22.10: 1540-0836 (S) > > The #include file is not found. > "/work/vpa
Re: Re: complite ERROR
Thanks for you, I have fixed this error. best wishes! 2009-07-01 tony.caotong 发件人: Kenton Varda 发送时间: 2009-06-30 07:05:15 收件人: tong cao 抄送: Protocol Buffers 主题: Re: complite ERROR You need to include zero_copy_stream_impl.h for FileOutputStream. You also have an extra & in front of coded_stream which shouldn't be there, since coded_stream is already a pointer. On Mon, Jun 29, 2009 at 1:56 AM, tong cao wrote: When I chenge some codes from the example,I have had the following errors: My purpose is send data from socket. --- 3 #include 4 #include 5 using namespace google::protobuf::io; 6 7 #include 8 #include 9 #include 10 #include 11 #include 12 13 #include 14 #include 15 #include 16 #include "addressbook.pb.h" 17 using namespace std; .. 95 int sock = socket(AF_INET,SOCK_STREAM,0); 96 struct sockaddr_in add; 97 add.sin_family = AF_INET; 98 add.sin_addr.s_addr = inet_addr("127.0.0.1"); 99 add.sin_port = 9000; 100 bind(sock,(struct sockaddr*)&add,sizeof(add)); 101 ZeroCopyOutputStream* raw_output = new FileOutputStream (sock,-1); 102 CodedOutputStream* coded_output = new CodedOutputStream (raw_output); 103 104 //if (!address_book.SerializeToOstream(&output)) { 105 if (!address_book.SerializeToCodedStream(&coded_output)) { 106 cerr << "Failed to write address book." << endl; 107 return -1; 108 } . [r...@localhost examples]# make cpp c++ add_person.cc addressbook.pb.cc -lprotobuf -lpthread -o add_person_cpp add_person.cc: In function ‘int main(int, char**)’: add_person.cc:101: error: expected type-specifier before ‘FileOutputStream’ add_person.cc:101: error: cannot convert ‘int*’ to ‘google::protobuf::io::ZeroCopyOutputStream*’ in initialization add_person.cc:101: error: expected ‘,’ or ‘;’ before ‘FileOutputStream’ add_person.cc:105: error: no matching function for call to ‘tutorial::AddressBook::SerializeToCodedStream (google::protobuf::io::CodedOutputStream**)’ /usr/local/include/google/protobuf/message.h:313: note: candidates are: bool google::protobuf::Message::SerializeToCodedStream (google::protobuf::io::CodedOutputStream*) const make: *** [add_person_cpp] Error 1 Why I get this error ,how can i fix it? Thanks, --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Compiling on AIX 5.3 using xlC 3.55 compiler
My attempt to use default hash_map implementation in source leads to infinite loop. So I tried to links source with STLport 4.6.1 version for AIX. For XLC i provided tempinc option to create default directory for template instantiation. But I am not able to compile it. "/net/bld9-ibm/XYZ01/build/tools/Development/STLport/AIX/STLport-4.6.1/ stlport/stl/_alloc.h", line 60.12: 1540-0836 (S) The #include file is not found. "/net/bld9-ibm/XYZ01/build/tools/Development/STLport/AIX/STLport-4.6.1/ stlport/stl/_alloc.h", line 64.11: 1540-0836 (S) The #include file is not found. "/net/bld9-ibm/XYZ01/build/tools/Development/STLport/AIX/STLport-4.6.1/ stlport/stl/_alloc.h", line 68.11: 1540-0836 (S) The #include file is not found. "/net/bld9-ibm/XYZ01/build/tools/Development/STLport/AIX/STLport-4.6.1/ stlport/stl/_function_ba se.h", line 34.10: 1540-0836 (S) The #include file is not found. "/net/bld9-ibm/XYZ01/build/tools/Development/STLport/AIX/STLport-4.6.1/ stlport/stl/_iterator_ba se.h", line 44.11: 1540-0836 (S) The #include file is not found. "/net/bld9-ibm/XYZ01/build/tools/Development/STLport/AIX/STLport-4.6.1/ stlport/stl/_iterator_ba se.h", line 152.12: 1540-0836 (S) The #include file is not found. "/net/bld9-ibm/XYZ01/build/tools/Development/STLport/AIX/STLport-4.6.1/ stlport/stl/_string.h", line 31.12: 1540-0836 (S) The #include file is not found. "/net/bld9-ibm/XYZ01/build/tools/Development/STLport/AIX/STLport-4.6.1/ stlport/stl/_string.h", line 38.11: 1540-0836 (S) The #include file is not found. "/net/bld9-ibm/XYZ01/build/tools/Development/STLport/AIX/STLport-4.6.1/ stlport/stl/_string.h", line 40.11: 1540-0836 (S) The #include file is not found. "/net/bld9-ibm/XYZ01/build/tools/Development/STLport/AIX/STLport-4.6.1/ stlport/stl/_string.h", line 44.11: 1540-0836 (S) The #include file is not found. "/net/bld9-ibm/XYZ01/build/tools/Development/STLport/AIX/STLport-4.6.1/ stlport/stl/_string.h", line 1490.12: 1540-0836 (S) The #include file is not found. "/net/bld9-ibm/XYZ01/build/tools/Development/STLport/AIX/STLport-4.6.1/ stlport/stl/_string.h", line 1493.11: 1540-0836 (S) The #include file is not found. "/net/bld9-ibm/XYZ01/build/tools/Development/STLport/AIX/STLport-4.6.1/ stlport/stl/_string.h", line 1494.11: 1540-0836 (S) The #include file is not found. "/net/bld9-ibm/XYZ01/build/tools/Development/STLport/AIX/STLport-4.6.1/ stlport/stl/_tree.h", line 54.12: 1540-0836 (S) The #include file is not found. "/net/bld9-ibm/XYZ01/build/tools/Development/STLport/AIX/STLport-4.6.1/ stlport/stl/_tree.h", line 58.12: 1540-0836 (S) The #include file is not found. "/net/bld9-ibm/XYZ01/build/tools/Development/STLport/AIX/STLport-4.6.1/ stlport/stl/_tree.h", line 62.12: 1540-0836 (S) The #include file is not found. "/net/bld9-ibm/XYZ01/build/tools/Development/STLport/AIX/STLport-4.6.1/ stlport/stl/_tree.h", line 66.12: 1540-0836 (S) The #include file is not found. "/net/bld9-ibm/XYZ01/build/tools/Development/STLport/AIX/STLport-4.6.1/ stlport/stl/_tree.h", line 70.12: 1540-0836 (S) The #include file is not found. "/net/bld9-ibm/XYZ01/build/tools/Development/STLport/AIX/STLport-4.6.1/ stlport/stl/_tree.h", line 591.12: 1540-0836 (S) The #include file is not found. "/net/bld9-ibm/XYZ01/build/tools/Development/STLport/AIX/STLport-4.6.1/ stlport/stl/char_traits. h", line 46.11: 1540-0836 (S) The #include file is not found. "/net/bld9-ibm/XYZ01/build/tools/Development/STLport/AIX/STLport-4.6.1/ stlport/stl/char_traits. h", line 50.12: 1540-0836 (S) The #include file is not found. "/work/vpatil/protobuf-2.1.0/src/./google/protobuf/descriptor.h", line 59.10: 1540-0836 (S) The #include file is not found. "/work/vpatil/protobuf-2.1.0/src/./google/protobuf/descriptor.pb.h", line 8.10: 1540-0836 (S) The #include file is not found. "/work/vpatil/protobuf-2.1.0/src/./google/protobuf/descriptor.pb.h", line 11.2: 1540-0859 (S) #error directive: This file was generated by a newer version of protoc which is. "/work/vpatil/protobuf-2.1.0/src/./google/protobuf/descriptor.pb.h", line 12.2: 1540-0859 (S) #error directive: incompatible with your Protocol Buffer headers. Please update. "/work/vpatil/protobuf-2.1.0/src/./google/protobuf/descriptor.pb.h", line 13.2: 1540-0859 (S) #error directive: your headers.. "/work/vpatil/protobuf-2.1.0/src/./google/protobuf/descriptor.pb.h", line 21.10: 1540-0836 (S) The #include file is not found. "/work/vpatil/protobuf-2.1.0/src/./google/protobuf/descriptor.pb.h", line 22.10: 1540-0836 (S) The #include file is not found. "/work/vpatil/protobuf-2.1.0/src/./google/protobuf/descriptor.pb.h", line 23.10: 1540-0836 (S) The #include file is not found. "/work/vpatil/protobuf-2.1.0/src/./google/protobuf/extension_set.h", line 47.10: 1540-0836 (S) The #include file is not found. "/work/vpatil/protobuf-2.1.0/src/./google/protobuf/extension_set.h", line 48.10: 1540-0836 (S) The #include file is not found. "/work/vpatil/protobuf-2.1.0/src/./google/pro
Re: Service Factory?
On Tue, Jun 30, 2009 at 4:28 PM, rthompson.dtisoft@gmail.com < rthompson.dtisoft@gmail.com> wrote: > > I'm confused. Shouldn't I just create a class called > DynamicServiceStub and have it inherit from "class LIBPROTOBUF_EXPORT > Service"? > And then implement a method like "Service* DynamicServiceStub::New > (ServiceDescriptor*, RpcChannel* ) " ? Yes, that is what I was suggesting. > If I get this working, I'd like to pass it back to you guys to perhaps > use it in the next release. Honestly, I'm having some trouble thinking of use cases for this. How do you intend to use this class? Why not just call RpcChannel directly instead? > > > > On Jun 30, 2:08 pm, Kenton Varda wrote: > > Oh, you want something like DynamicMessage except for services? > > DynamicServiceStub, perhaps? There is no such thing included in the > > library, but it would be really trivial to write. All you need to do is > > implement the Service interface as a wrapper around the RpcChannel > > interface. Have GetRequestPrototype() and GetResponsePrototype() return > > DynamicMessages, and have CallMethod() just call the RpcChannel's > > CallMethod(). > > On Tue, Jun 30, 2009 at 2:03 PM, rthompson.dtisoft@gmail.com < > > > > > > > > rthompson.dtisoft@gmail.com> wrote: > > > > > Right, but I'm importing a .proto file at runtime using the Importer > > > class. This ultimately leaves me with a ServiceDescriptor. I'd like > > > to instantiate that Service from the ServiceDescriptor. > > > The python code has a ServiceStubBuilder class. Where is there a > > > ServiceStubBuilder in the C++ API? > > > > > On Jun 30, 1:33 pm, Kenton Varda wrote: > > > > Yes. In C++ the protocol compiler will generate a service interface > and > > > a > > > > stub implementation when given a .proto file containing a service > > > > definition. This is equivalent to what Python's service_reflection > > > module > > > > does. > > > > But this is not an RPC implementation. You still have to add your > own > > > > networking layer. > > > > > > On Tue, Jun 30, 2009 at 9:26 AM, rthompson.dtisoft@gmail.com < > > > > > > rthompson.dtisoft@gmail.com> wrote: > > > > > > > Is there a C++ equivalent to > > > > > > > > http://code.google.com/apis/protocolbuffers/docs/reference/python/goo. > > > .. > > > > > ? > > > > > > > which is used to create protocol service and service stub classes > from > > > > > ServiceDescriptor objects at runtime. > > > > > > > On Jun 29, 3:56 pm, Kenton Varda wrote: > > > > > > Protocol Buffers does not include an RPC implementation, only > > > abstract > > > > > > interfaces for one. ServiceDescriptor is useful for implementing > > > your > > > > > own > > > > > > RPC system on top of protocol buffers -- it allows you to define > your > > > > > > services directly in the .proto file even though protocol buffers > > > itself > > > > > > does not provide RPC. > > > > > > > > On Mon, Jun 29, 2009 at 10:15 AM, > rthompson.dtisoft@gmail.com < > > > > > > > > rthompson.dtisoft@gmail.com> wrote: > > > > > > > > > What can you do with a ServiceDescriptor? Is there a > > > > > > > DynamicServiceFactory similar to the DynamicMessageFactory > where > > > you > > > > > > > can instantiate a service when all you have is a > ServiceDescriptor, > > > or > > > > > > > some other equivalent way of doing it? > > > > > > > > > Thanks! > > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: where are the examples
You could look at one of the open source RPC implementations listed here: http://code.google.com/p/protobuf/wiki/ThirdPartyAddOns#RPC_Implementations Network communication is non-trivial. Trying to demonstrate it with an example would make for a very big example of which only a few lines of code would have anything to do with protocol buffers. Worse, the example would probably only be a naive implementation not suitable for real-world use, which could lead people down the wrong path. A non-naive implementation would be big enough to be its own project, which is far too much work to put into an example. We could provide an example that integrates protocol buffers with some existing RPC implementation, but there are so many to choose from, and we would not be demonstrating much that is not already demonstrated by that RPC system's own documentation. We'd just be taking their examples and adding calls to protobuf parsing and serialization at the ends. It doesn't seem worthwhile. And yes, many people use protocol buffers for disk storage rather than networking. On Tue, Jun 30, 2009 at 3:25 PM, JavaSrvcs wrote: > > I can't imagine any other use than using it to send data over the > network and use on the other end. > In fact is this not what it was invented for (communication). > > On 30 jun, 16:07, Kenton Varda wrote: > > There are tons of resources on the internet and in books explaining how > to > > do network programming in Java. Sorry, but this is really outside the > scope > > of protocol buffers. > > > > > > > > On Tue, Jun 30, 2009 at 2:46 PM, JavaSrvcs wrote: > > > > > Is there a full compilable example (in Java) on how to do this ? > > > What sort of service would I need to be running on a server to send > > > data (and have the server receive and convert the flat byte array into > > > a Java object). > > > > > On Jun 30, 2:32 pm, Kenton Varda wrote: > > > > Protocol Buffers provides a way to convert between flat byte arrays > and > > > > structured data. This is obviously useful for network communication, > but > > > > protocol buffers does not provide any explicit networking support. > It's > > > up > > > > to you to take the byte array generated by protocol buffers and send > it > > > over > > > > the network. > > > > > > On Tue, Jun 30, 2009 at 12:45 PM, JavaSrvcs > wrote: > > > > > > > I was led to believe that protocol buffers could be used for PC to > PC > > > > > communication, is there a way to do this, and if so, where can I > find > > > > > the examples? > > > > > > > The example I am looking at provided writes to a file.- Ocultar > texto de la cita - > > > > - Mostrar texto de la cita - > > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Service Factory?
I'm confused. Shouldn't I just create a class called DynamicServiceStub and have it inherit from "class LIBPROTOBUF_EXPORT Service"? And then implement a method like "Service* DynamicServiceStub::New (ServiceDescriptor*, RpcChannel* ) " ? I'm just doing this on the client side. If we did this on the server side, we'd have to implement the Rpc's at runtime...and that doesn't sound like a good idea. If I get this working, I'd like to pass it back to you guys to perhaps use it in the next release. On Jun 30, 2:08 pm, Kenton Varda wrote: > Oh, you want something like DynamicMessage except for services? > DynamicServiceStub, perhaps? There is no such thing included in the > library, but it would be really trivial to write. All you need to do is > implement the Service interface as a wrapper around the RpcChannel > interface. Have GetRequestPrototype() and GetResponsePrototype() return > DynamicMessages, and have CallMethod() just call the RpcChannel's > CallMethod(). > On Tue, Jun 30, 2009 at 2:03 PM, rthompson.dtisoft@gmail.com < > > > > rthompson.dtisoft@gmail.com> wrote: > > > Right, but I'm importing a .proto file at runtime using the Importer > > class. This ultimately leaves me with a ServiceDescriptor. I'd like > > to instantiate that Service from the ServiceDescriptor. > > The python code has a ServiceStubBuilder class. Where is there a > > ServiceStubBuilder in the C++ API? > > > On Jun 30, 1:33 pm, Kenton Varda wrote: > > > Yes. In C++ the protocol compiler will generate a service interface and > > a > > > stub implementation when given a .proto file containing a service > > > definition. This is equivalent to what Python's service_reflection > > module > > > does. > > > But this is not an RPC implementation. You still have to add your own > > > networking layer. > > > > On Tue, Jun 30, 2009 at 9:26 AM, rthompson.dtisoft@gmail.com < > > > > rthompson.dtisoft@gmail.com> wrote: > > > > > Is there a C++ equivalent to > > > > >http://code.google.com/apis/protocolbuffers/docs/reference/python/goo. > > .. > > > > ? > > > > > which is used to create protocol service and service stub classes from > > > > ServiceDescriptor objects at runtime. > > > > > On Jun 29, 3:56 pm, Kenton Varda wrote: > > > > > Protocol Buffers does not include an RPC implementation, only > > abstract > > > > > interfaces for one. ServiceDescriptor is useful for implementing > > your > > > > own > > > > > RPC system on top of protocol buffers -- it allows you to define your > > > > > services directly in the .proto file even though protocol buffers > > itself > > > > > does not provide RPC. > > > > > > On Mon, Jun 29, 2009 at 10:15 AM, rthompson.dtisoft@gmail.com < > > > > > > rthompson.dtisoft@gmail.com> wrote: > > > > > > > What can you do with a ServiceDescriptor? Is there a > > > > > > DynamicServiceFactory similar to the DynamicMessageFactory where > > you > > > > > > can instantiate a service when all you have is a ServiceDescriptor, > > or > > > > > > some other equivalent way of doing it? > > > > > > > Thanks! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: where are the examples
We use protobuf in Drizzle as a mechanism to serialize information into files on disk. We are also send some of the messages over the network - depending on what it is. If you need a transport mechanism, I suggest checking out setting up a gearman server (https://edge.launchpad.net/gearmand/+download) and then using the Java worker interface https://edge.launchpad.net/gearmanij to send protobuf messages around. (There are a bazillion different ways to do this, of course, this is just one we happen to be working with a lot ourselves and one which all of the pieces are available) Monty JavaSrvcs wrote: > I can't imagine any other use than using it to send data over the > network and use on the other end. > In fact is this not what it was invented for (communication). > > On 30 jun, 16:07, Kenton Varda wrote: >> There are tons of resources on the internet and in books explaining how to >> do network programming in Java. Sorry, but this is really outside the scope >> of protocol buffers. >> >> >> >> On Tue, Jun 30, 2009 at 2:46 PM, JavaSrvcs wrote: >> >>> Is there a full compilable example (in Java) on how to do this ? >>> What sort of service would I need to be running on a server to send >>> data (and have the server receive and convert the flat byte array into >>> a Java object). >>> On Jun 30, 2:32 pm, Kenton Varda wrote: Protocol Buffers provides a way to convert between flat byte arrays and structured data. This is obviously useful for network communication, but protocol buffers does not provide any explicit networking support. It's >>> up to you to take the byte array generated by protocol buffers and send it >>> over the network. On Tue, Jun 30, 2009 at 12:45 PM, JavaSrvcs wrote: > I was led to believe that protocol buffers could be used for PC to PC > communication, is there a way to do this, and if so, where can I find > the examples? > The example I am looking at provided writes to a file.- Ocultar texto de > la cita - >> - Mostrar texto de la cita - > > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: where are the examples
I can't imagine any other use than using it to send data over the network and use on the other end. In fact is this not what it was invented for (communication). On 30 jun, 16:07, Kenton Varda wrote: > There are tons of resources on the internet and in books explaining how to > do network programming in Java. Sorry, but this is really outside the scope > of protocol buffers. > > > > On Tue, Jun 30, 2009 at 2:46 PM, JavaSrvcs wrote: > > > Is there a full compilable example (in Java) on how to do this ? > > What sort of service would I need to be running on a server to send > > data (and have the server receive and convert the flat byte array into > > a Java object). > > > On Jun 30, 2:32 pm, Kenton Varda wrote: > > > Protocol Buffers provides a way to convert between flat byte arrays and > > > structured data. This is obviously useful for network communication, but > > > protocol buffers does not provide any explicit networking support. It's > > up > > > to you to take the byte array generated by protocol buffers and send it > > over > > > the network. > > > > On Tue, Jun 30, 2009 at 12:45 PM, JavaSrvcs wrote: > > > > > I was led to believe that protocol buffers could be used for PC to PC > > > > communication, is there a way to do this, and if so, where can I find > > > > the examples? > > > > > The example I am looking at provided writes to a file.- Ocultar texto > > > > de la cita - > > - Mostrar texto de la cita - --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: where are the examples
There are tons of resources on the internet and in books explaining how to do network programming in Java. Sorry, but this is really outside the scope of protocol buffers. On Tue, Jun 30, 2009 at 2:46 PM, JavaSrvcs wrote: > > Is there a full compilable example (in Java) on how to do this ? > What sort of service would I need to be running on a server to send > data (and have the server receive and convert the flat byte array into > a Java object). > > On Jun 30, 2:32 pm, Kenton Varda wrote: > > Protocol Buffers provides a way to convert between flat byte arrays and > > structured data. This is obviously useful for network communication, but > > protocol buffers does not provide any explicit networking support. It's > up > > to you to take the byte array generated by protocol buffers and send it > over > > the network. > > > > On Tue, Jun 30, 2009 at 12:45 PM, JavaSrvcs wrote: > > > > > I was led to believe that protocol buffers could be used for PC to PC > > > communication, is there a way to do this, and if so, where can I find > > > the examples? > > > > > The example I am looking at provided writes to a file. > > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: where are the examples
Is there a full compilable example (in Java) on how to do this ? What sort of service would I need to be running on a server to send data (and have the server receive and convert the flat byte array into a Java object). On Jun 30, 2:32 pm, Kenton Varda wrote: > Protocol Buffers provides a way to convert between flat byte arrays and > structured data. This is obviously useful for network communication, but > protocol buffers does not provide any explicit networking support. It's up > to you to take the byte array generated by protocol buffers and send it over > the network. > > On Tue, Jun 30, 2009 at 12:45 PM, JavaSrvcs wrote: > > > I was led to believe that protocol buffers could be used for PC to PC > > communication, is there a way to do this, and if so, where can I find > > the examples? > > > The example I am looking at provided writes to a file. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Service Factory?
Oh, you want something like DynamicMessage except for services? DynamicServiceStub, perhaps? There is no such thing included in the library, but it would be really trivial to write. All you need to do is implement the Service interface as a wrapper around the RpcChannel interface. Have GetRequestPrototype() and GetResponsePrototype() return DynamicMessages, and have CallMethod() just call the RpcChannel's CallMethod(). On Tue, Jun 30, 2009 at 2:03 PM, rthompson.dtisoft@gmail.com < rthompson.dtisoft@gmail.com> wrote: > > Right, but I'm importing a .proto file at runtime using the Importer > class. This ultimately leaves me with a ServiceDescriptor. I'd like > to instantiate that Service from the ServiceDescriptor. > The python code has a ServiceStubBuilder class. Where is there a > ServiceStubBuilder in the C++ API? > > > On Jun 30, 1:33 pm, Kenton Varda wrote: > > Yes. In C++ the protocol compiler will generate a service interface and > a > > stub implementation when given a .proto file containing a service > > definition. This is equivalent to what Python's service_reflection > module > > does. > > But this is not an RPC implementation. You still have to add your own > > networking layer. > > > > On Tue, Jun 30, 2009 at 9:26 AM, rthompson.dtisoft@gmail.com < > > > > > > > > rthompson.dtisoft@gmail.com> wrote: > > > > > Is there a C++ equivalent to > > > > >http://code.google.com/apis/protocolbuffers/docs/reference/python/goo. > .. > > > ? > > > > > which is used to create protocol service and service stub classes from > > > ServiceDescriptor objects at runtime. > > > > > On Jun 29, 3:56 pm, Kenton Varda wrote: > > > > Protocol Buffers does not include an RPC implementation, only > abstract > > > > interfaces for one. ServiceDescriptor is useful for implementing > your > > > own > > > > RPC system on top of protocol buffers -- it allows you to define your > > > > services directly in the .proto file even though protocol buffers > itself > > > > does not provide RPC. > > > > > > On Mon, Jun 29, 2009 at 10:15 AM, rthompson.dtisoft@gmail.com < > > > > > > rthompson.dtisoft@gmail.com> wrote: > > > > > > > What can you do with a ServiceDescriptor? Is there a > > > > > DynamicServiceFactory similar to the DynamicMessageFactory where > you > > > > > can instantiate a service when all you have is a ServiceDescriptor, > or > > > > > some other equivalent way of doing it? > > > > > > > Thanks! > > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Service Factory?
Right, but I'm importing a .proto file at runtime using the Importer class. This ultimately leaves me with a ServiceDescriptor. I'd like to instantiate that Service from the ServiceDescriptor. The python code has a ServiceStubBuilder class. Where is there a ServiceStubBuilder in the C++ API? On Jun 30, 1:33 pm, Kenton Varda wrote: > Yes. In C++ the protocol compiler will generate a service interface and a > stub implementation when given a .proto file containing a service > definition. This is equivalent to what Python's service_reflection module > does. > But this is not an RPC implementation. You still have to add your own > networking layer. > > On Tue, Jun 30, 2009 at 9:26 AM, rthompson.dtisoft@gmail.com < > > > > rthompson.dtisoft@gmail.com> wrote: > > > Is there a C++ equivalent to > > >http://code.google.com/apis/protocolbuffers/docs/reference/python/goo... > > ? > > > which is used to create protocol service and service stub classes from > > ServiceDescriptor objects at runtime. > > > On Jun 29, 3:56 pm, Kenton Varda wrote: > > > Protocol Buffers does not include an RPC implementation, only abstract > > > interfaces for one. ServiceDescriptor is useful for implementing your > > own > > > RPC system on top of protocol buffers -- it allows you to define your > > > services directly in the .proto file even though protocol buffers itself > > > does not provide RPC. > > > > On Mon, Jun 29, 2009 at 10:15 AM, rthompson.dtisoft@gmail.com < > > > > rthompson.dtisoft@gmail.com> wrote: > > > > > What can you do with a ServiceDescriptor? Is there a > > > > DynamicServiceFactory similar to the DynamicMessageFactory where you > > > > can instantiate a service when all you have is a ServiceDescriptor, or > > > > some other equivalent way of doing it? > > > > > Thanks! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Support for JDK 1.4?
No, it can't. It requires generics. Sorry. On Tue, Jun 30, 2009 at 7:32 AM, misha wrote: > > I was wondering if google protocl buffers can work with java 1.4 > > > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: CodedOuptputStream.PushLimit/PopLimit
Well, it's *supposed* to work as you say. But honestly, this code has not been tested with blocking streams, since that's not how we use it in Google. It's possible that there is a bug. But the code appears to be correct AFAICT. When CodedInputStream needs more data, it calls Refresh(), which looks like this: bool CodedInputStream::Refresh() { DCHECK_EQ(buffer_size_, 0); if (buffer_size_after_limit_ > 0 || overflow_bytes_ > 0 || total_bytes_read_ == current_limit_) { // ... return false; } // ... } In your case, total_bytes_read_ should be equal to current_limit_ -- both should be 17. Therefore, it *should* be returning false, not trying to read more. What are you seeing? If you can't figure it out, can you write a small demo program? Just make the demo program abort if CodedInputStream tries to read too much. Then I can debug it. On Tue, Jun 30, 2009 at 10:57 AM, Matthews wrote: > > I am writing a Java server and C++ client and trying to use Protocol > Buffers for encoding the socket communication. I have written the Java > server and tested it with a Java based client and all is well. > However, I am having some difficulty with the C++ portion. > > I've wrapped the socket code in my own CopyingInputStream and > CopyingOutputStream sub-classes and am using those with the > CopyingInputStreamAdaptor and CopyingOutputStreamAdapdtor classes. > These classes are further wrapped in CodedInputStream and > CodedOutputStream instances for reading/writing the serialized data. > > When I send messages I encode the message type and size as varints > then the message itself. When reading the server response in the C++ > code I read the message type and size then pass the size to > CodedInputStream.PushLimit(). My server response is very small, 17 > bytes so the initial read gets all the data (I verified that by > stepping through the code in the debugger). > > In this case the type and size are each encoded as 1 byte so that > leaves 15 bytes for the message. What I am finding is that even after > the call to PushLimit() with the value 15 the CodedInputStream is > trying to read more bytes. Again, stepping through the code in the > debugger I can see that the 15 bytes are already buffered. I've poured > through the C++ docs and the description of limits states that > PushLimit will prevent CodedInputStream from reading any additional > bytes. > > This is a problem as the socket is doing a blocking read so it is > waiting for bytes that will not be sent. > > Am I mis-understanding the behavior of PushLimit? > > Thanks, > Michael > > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: where are the examples
Protocol Buffers provides a way to convert between flat byte arrays and structured data. This is obviously useful for network communication, but protocol buffers does not provide any explicit networking support. It's up to you to take the byte array generated by protocol buffers and send it over the network. On Tue, Jun 30, 2009 at 12:45 PM, JavaSrvcs wrote: > > I was led to believe that protocol buffers could be used for PC to PC > communication, is there a way to do this, and if so, where can I find > the examples? > > The example I am looking at provided writes to a file. > > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Service Factory?
Yes. In C++ the protocol compiler will generate a service interface and a stub implementation when given a .proto file containing a service definition. This is equivalent to what Python's service_reflection module does. But this is not an RPC implementation. You still have to add your own networking layer. On Tue, Jun 30, 2009 at 9:26 AM, rthompson.dtisoft@gmail.com < rthompson.dtisoft@gmail.com> wrote: > > Is there a C++ equivalent to > > > http://code.google.com/apis/protocolbuffers/docs/reference/python/google.protobuf-module.html > ? > > which is used to create protocol service and service stub classes from > ServiceDescriptor objects at runtime. > > On Jun 29, 3:56 pm, Kenton Varda wrote: > > Protocol Buffers does not include an RPC implementation, only abstract > > interfaces for one. ServiceDescriptor is useful for implementing your > own > > RPC system on top of protocol buffers -- it allows you to define your > > services directly in the .proto file even though protocol buffers itself > > does not provide RPC. > > > > On Mon, Jun 29, 2009 at 10:15 AM, rthompson.dtisoft@gmail.com < > > > > > > > > rthompson.dtisoft@gmail.com> wrote: > > > > > What can you do with a ServiceDescriptor? Is there a > > > DynamicServiceFactory similar to the DynamicMessageFactory where you > > > can instantiate a service when all you have is a ServiceDescriptor, or > > > some other equivalent way of doing it? > > > > > Thanks! > > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
where are the examples
I was led to believe that protocol buffers could be used for PC to PC communication, is there a way to do this, and if so, where can I find the examples? The example I am looking at provided writes to a file. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Service Factory?
More specifically the service_reflection class. On Jun 30, 9:26 am, "rthompson.dtisoft@gmail.com" wrote: > Is there a C++ equivalent to > > http://code.google.com/apis/protocolbuffers/docs/reference/python/goo... > ? > > which is used to create protocol service and service stub classes from > ServiceDescriptor objects at runtime. > > On Jun 29, 3:56 pm, Kenton Varda wrote: > > > > > Protocol Buffers does not include an RPC implementation, only abstract > > interfaces for one. ServiceDescriptor is useful for implementing your own > > RPC system on top of protocol buffers -- it allows you to define your > > services directly in the .proto file even though protocol buffers itself > > does not provide RPC. > > > On Mon, Jun 29, 2009 at 10:15 AM, rthompson.dtisoft@gmail.com < > > > rthompson.dtisoft@gmail.com> wrote: > > > > What can you do with a ServiceDescriptor? Is there a > > > DynamicServiceFactory similar to the DynamicMessageFactory where you > > > can instantiate a service when all you have is a ServiceDescriptor, or > > > some other equivalent way of doing it? > > > > Thanks! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: CodedOuptputStream.PushLimit/PopLimit
The title should have been CodedInputStream.PushLimit/ PopLimitsightyping too fast. Thanks for your patience. Michael --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
CodedOuptputStream.PushLimit/PopLimit
I am writing a Java server and C++ client and trying to use Protocol Buffers for encoding the socket communication. I have written the Java server and tested it with a Java based client and all is well. However, I am having some difficulty with the C++ portion. I've wrapped the socket code in my own CopyingInputStream and CopyingOutputStream sub-classes and am using those with the CopyingInputStreamAdaptor and CopyingOutputStreamAdapdtor classes. These classes are further wrapped in CodedInputStream and CodedOutputStream instances for reading/writing the serialized data. When I send messages I encode the message type and size as varints then the message itself. When reading the server response in the C++ code I read the message type and size then pass the size to CodedInputStream.PushLimit(). My server response is very small, 17 bytes so the initial read gets all the data (I verified that by stepping through the code in the debugger). In this case the type and size are each encoded as 1 byte so that leaves 15 bytes for the message. What I am finding is that even after the call to PushLimit() with the value 15 the CodedInputStream is trying to read more bytes. Again, stepping through the code in the debugger I can see that the 15 bytes are already buffered. I've poured through the C++ docs and the description of limits states that PushLimit will prevent CodedInputStream from reading any additional bytes. This is a problem as the socket is doing a blocking read so it is waiting for bytes that will not be sent. Am I mis-understanding the behavior of PushLimit? Thanks, Michael --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Service Factory?
Is there a C++ equivalent to http://code.google.com/apis/protocolbuffers/docs/reference/python/google.protobuf-module.html ? which is used to create protocol service and service stub classes from ServiceDescriptor objects at runtime. On Jun 29, 3:56 pm, Kenton Varda wrote: > Protocol Buffers does not include an RPC implementation, only abstract > interfaces for one. ServiceDescriptor is useful for implementing your own > RPC system on top of protocol buffers -- it allows you to define your > services directly in the .proto file even though protocol buffers itself > does not provide RPC. > > On Mon, Jun 29, 2009 at 10:15 AM, rthompson.dtisoft@gmail.com < > > > > rthompson.dtisoft@gmail.com> wrote: > > > What can you do with a ServiceDescriptor? Is there a > > DynamicServiceFactory similar to the DynamicMessageFactory where you > > can instantiate a service when all you have is a ServiceDescriptor, or > > some other equivalent way of doing it? > > > Thanks! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Support for JDK 1.4?
I was wondering if google protocl buffers can work with java 1.4 --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---