Hi all,


I'm new in Cap'NProto, I consider using it instead of ProtoBuf2 in a new 
project.

I have a C++ embedded app and I would like to create a web interface to 
configure it.

My plan is to describe the configuration structs in Cap'nProto then use the 
generated code on C++ and Javascript side.

A config scenario would be the following: 

   1. 
   
   web app asks for the actual config (Javascript)
   2. 
   
   native app serves the actual config - serialization/write (C++)
   3. web app displays the actual config after deserialization/read 
   (Javascript)
   4. user can modify the config in the web app - HOW? (Javascript)
   5. web app sends back the new config - serialization/write (Javascript)
   6. native app uses the new config after deserialization/read (C++) 
   7. native app can modify the config - HOW? (C++)

4 and 7 are the tricky parts, because as far as I understand the API I can 
only deserialize a reader that is read only, however I would like to modify 
and re-serialize it later. In ProtoBuf2 it would be straightforward, but I 
do not see any barrier in Cap'NProto protocol that prevents this kind of 
operations. (non-presented fields are zeroed, so there is place to store 
the modified data).


My questions are the followings:

   - Is the described scenario the best approach to do what I want or I 
   should do something totally different?
   - Can I deserialize/read into a builder? Or somehow transform a reader 
   into a builder (without copying)
   - Should I use the generated C++ / Javascript structs as a direct source 
   of configuration (actual code <-> Cap'nProto structs) or I should introduce 
   "native" structs to interact with (actual code <-> "native" structs 
   <->(serialize/deserialize) Cap'nProto structs)

Thanks: Adam

-- 
You received this message because you are subscribed to the Google Groups 
"Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to capnproto+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/capnproto.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/capnproto/6b9633ad-1f97-4e7d-bd9c-03a483aaf859%40googlegroups.com.

Reply via email to