Questions tagged [capnproto]

Cap'n Proto is a zero-copy data interchange format described by a schema language not unlike Protobuf, and an associated capability-based RPC system.

Cap'n Proto is a zero-copy serialization format described by a schema language not unlike Protobuf and an associated capability-based RPC system.

99 questions
23
votes
1 answer

Protobuf vs Flatbuffers vs Cap'n proto which is faster?

I decided to figure out which of Protobuf, Flatbuffers and Cap'n proto would be the best/fastest serialization for my application. In my case sending some kind of byte/char array over a network (the reason I serialized to that format). So I made…
Rickard Johansson
  • 363
  • 1
  • 2
  • 7
14
votes
3 answers

Flatbuffers vs CBOR

Please help to suggest some merits and demerits of Flatbuffers and CBOR protocols. Both these binary formats claim to be good on their websites, but I am not able to make some good differences between the two. Flatbuffers: Advantage: Strict typing…
10
votes
3 answers

file transfer using gRPC

What is the standard way to use gRPC and protocol buffer to transfer file or images from one process to another? The file is from 1MB to 6MB. Basically I want to know how to implement sender / receiver code pairs for python, C++ and…
cpchung
  • 774
  • 3
  • 8
  • 23
9
votes
3 answers

FlatBuffers vs. Protobuf

My question is if FlatBuffers is much faster than Protobuf, why isn't it more widely used compared to Protobuf? It used to be an experimental thing but it seems to be mature enough now but isn't widely used yet. It seems people mostly use…
NEO
  • 2,145
  • 2
  • 26
  • 34
9
votes
1 answer

Stream while serializing with Cap'n'Proto

Consider a Cap'n'Proto schema like this: struct Document { header @0 : Header; records @1 :List(Record); // usually large number of records. footer @2 :Footer; } struct Header { numberOfRecords : UInt32; /* some fields */ }; struct Footer { /*…
maxschlepzig
  • 35,645
  • 14
  • 145
  • 182
7
votes
1 answer

Is there any RPC framework with signal functionality as in DBus?

We are currently looking for RPC frameworks and were unable to find any with signal functionality unfortunately however we need it. We looked at gRPC, Apache Thrift, Cap-n-Proto and found that no one of them provide such functionality out of the box…
VP.
  • 15,509
  • 17
  • 91
  • 161
6
votes
2 answers

Serializing a very large List of items into Azure blob storage using C#

I have a large list of objects that I need to store and retrieve later. The list will always be used as a unit and list items are not retrieved individually. The list contains about 7000 items totaling about 1GB, but could easily escalate to ten…
08Dc91wk
  • 4,254
  • 8
  • 34
  • 67
6
votes
1 answer

How to Send Cap'n Proto Message over ZMQ

The example way to send messages using Cap'n Proto needs a file descriptor to write to: ::capnp::writeMessageToFd(fd, message); But in ZMQ the message needs to be passed to a ZMQ function: zmq_send(requester, "Hello", 5,…
BAR
  • 15,909
  • 27
  • 97
  • 185
5
votes
0 answers

pycapnp: Reading and Writing a List without custom capnp file

I have read through the pycapnp quickstart and docs, and I see no mention for how to read and write basic list objects (like a list of floats). In particular, I am aware that if I write a custom type in a capnp file, then I can read an object of…
bremen_matt
  • 6,902
  • 7
  • 42
  • 90
4
votes
0 answers

How does Cap’n Proto handle sending data on the order of gigabytes?

I'm trying to build a client/server app based on the Cap’n Proto RPC in Rust. Looking at the calculator example code, the RPC wants to shove everything into a single round-trip call. That's awesome, but how will that behave when the data to send is…
Grzegorz Nosek
  • 464
  • 3
  • 9
4
votes
1 answer

Examples of using unique IDs in Cap'n Proto

Cap'n Proto documentation contains a single sentence on the rationale behind Unique ID: IDs exist to provide a relatively short yet unambiguous way to refer to a type or annotation from another context. I wasn't able to find any examples of this…
pavel
  • 122
  • 13
4
votes
1 answer

Cap'n Proto: Piecewise write large message to disk

I want to create a giant packed data array, and persist it on disk. I'm using writePackedMessageToFd(). However, since the input data is so large (50GB) I need to pieces of the message to disk to free up memory. Is this possible with the current…
benjist
  • 2,740
  • 3
  • 31
  • 58
3
votes
1 answer

Why do I get the error "expected type argument" when I annotate a type in a Rust function?

I am playing around with Rust's capnproto library. Because Rust can infer types in some situations, I can do things like this: let mut message = ::capnp::message::Builder::new_default(); Without having to know the type of message. If I want to pass…
JMzance
  • 1,704
  • 4
  • 30
  • 49
2
votes
2 answers

CapnProto - Request to other server in callback

I am a newbie of CapnProto. I want to request a function of server2 in the callback of server1. But I got exception like below. Please help me resolve it. Many thanks! * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS…
Toby
  • 21
  • 3
2
votes
1 answer

cpp files are not generated for capnp_generate_cpp()

I have temp.capnp file where my cmake file has find_package(CapnProto CONFIG REQUIRED) include_directories(${CAPNP_INCLUDE_DIRS}) add_definitions(${CAPNP_DEFINITIONS}) set(CAPNPC_SRC_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}" CACHE STRING ""…
debonair
  • 2,505
  • 4
  • 33
  • 73
1
2 3 4 5 6 7