[protobuf] Re: Protobuf over HTTP
Thanks Marc, Just one more question. Can I use protobuf-net for RPC Services If Yes can these services be written and driven by WCF services, with WsHttpBinding or TCPBinding ??? Thanks again, On Nov 24, 9:50 pm, Marc Gravell marc.grav...@gmail.com wrote: That all depends on how ProtoBuf-Actionscript encodes the payload. I know nothing about that, so can't really comment. On 24 November 2010 19:28, mvbaffa mvba...@gmail.com wrote: pposed I could send information from Flex using ProtoBuf- Actionscript -- Regards, Marc -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to proto...@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: [protobuf] Re: Protobuf over HTTP
WCF can provide RPC, and protobuf-net can elbow it's way inside WCF *for some scenarios*. One option here is simply with some WCF configuration changes: http://marcgravell.blogspot.com/2009/11/controlling-wcf-protobuf-net-at.html It isn't specific to any particular binding - but works best for bindings that are happy with binary - my /preferred/ binding here is basicHttpBinding with MTOM enabled. But : any other RPC mechanism that allows binary transports should be usable in some way or another. At the simplest level, an HTTP post with a binary payload, or a simple socket server (if you are happy to wrap your own dispatcher on the end). Marc On 25 November 2010 10:01, mvbaffa mvba...@gmail.com wrote: Thanks Marc, Just one more question. Can I use protobuf-net for RPC Services If Yes can these services be written and driven by WCF services, with WsHttpBinding or TCPBinding ??? Thanks again, On Nov 24, 9:50 pm, Marc Gravell marc.grav...@gmail.com wrote: That all depends on how ProtoBuf-Actionscript encodes the payload. I know nothing about that, so can't really comment. On 24 November 2010 19:28, mvbaffa mvba...@gmail.com wrote: pposed I could send information from Flex using ProtoBuf- Actionscript -- Regards, Marc -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to proto...@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.comprotobuf%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/protobuf?hl=en. -- Regards, Marc -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to proto...@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.
[protobuf] Encoding/Decoding extension
Hi, I've done some experiment using protocol buffers extension but I kind of wondering if I am doing things the right way. For the encoding I've seen some explanation on the multi message encoding, and what I am doing seems ok. On the other hand I am kind of suspicious about my decoding routine. my .proto file is pretty straightforward message Message { extensions 5 to max; } message Dummy { optional float x = 1; optional float y = 2; } message Foo { optional int v = 1; } extend Message { optional Dummy dummy = 5; } extend Message { optional Foo foo = 50001; } My encoding code look like : int fd = open(argv[1], O_CREAT|O_RDONLY|O_WRONLY); google::protobuf::io::ZeroCopyOutputStream* raw_output = new google::protobuf::io::FileOutputStream(fd); google::protobuf::io::CodedOutputStream* coded_output = new google::protobuf::io::CodedOutputStream(raw_output); ns_message::Message message; ns_message::Dummy* dummy = message.MutableExtension(ns_message::dummy); dummy-set_x(5); int size = message.ByteSize(); coded_output-WriteVarint32(size); message.SerializeToCodedStream(coded_output); message.ClearExtension(ns_message::dummy); ns_message::Foo* zoom = message.MutableExtension(csi_message::zoom); [encoding the same way] For the decoding here is what I am doing: int fd = open(argv[1], O_RDONLY); google::protobuf::io::ZeroCopyInputStream* raw_input = new google::protobuf::io::FileInputStream(fd); google::protobuf::io::CodedInputStream* coded_input = new google::protobuf::io::CodedInputStream(raw_input); ns_message::Message message; google::protobuf::uint32 size; while ( coded_input-ReadVarint32(size) ) { int previous = coded_input-PushLimit(size); message.ParseFromCodedStream(coded_input); coded_input-PopLimit(previous); std::vectorconst google::protobuf::FieldDescriptor* fields; const google::protobuf::Reflection* reflection = message.GetReflection(); reflection-ListFields(message, fields); for (int i = 0; i fields.size(); ++i) { if (fields[i]-is_extension()) { getExtensionMessage(message, fields[i]); } } } getExtensionMessage doesn't do anything fancy for the moment if(field-name() == dummy) { csi_message::* Dummy = dummy.MutableExtension(ns_message::dummy); print(*dummy); } Thanks in advance for your comments. -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to proto...@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.
[protobuf] Re: Issue 239 in protobuf: Missing file
Updates: Status: Invalid Comment #1 on issue 239 by temporal: Missing file http://code.google.com/p/protobuf/issues/detail?id=239 Please do not use protobuf directly from SVN. Use the most recent release package. We are well aware that the code in SVN is broken. We will fix these problems before the next release. -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to proto...@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.