Hi protobuf owners and developers ,
To give the background we have extensively used the google protobuf
1) for messaging between processes (because its ability to serialize and
desiralize very efficiently)
2) as well as for datamodel within application. (as its reflection
capabilities and mapping files give us the ability to keep datamodel
pluggable to application to high extent).
For case 2 we iterate through the mapping (where we have source as queries
to database, target as generated proto objects and mapping of database
columns and probuf class member variables) and create maps of protobuf
objects which works as base datmodel (reference data) for our application.
Thus our datamodel initialization is plugged out of source code , so far so
Now we want to move this entire reference data into shared memory as we are
running multiple instances (80 of them :) ) of same application, and we
want to have the feature where this reference data can be updated in real
time (intraday , till now it was only initialized at start of the day and
no change was allowed intraday) if data changes in underlined database.
If the reference data is in shared memory one component can update the same
if something is updated in underlined database and all the application will
automatically get the updated data.
Keeping these bunch of maps in shared memory is an easy task for me (using
boost ipc shared memory segment manager) . But as map gets allocated into
shared memory, objects inside maps and there member variables should also
be allocated to the same shared memory. It it would be my own written
class as members of map the task was easy I would have used primitive data
types int , float , char array and in most complex case
boost:ipc:basic_string if required.
-> example is close to what i am trying to do)
*But in protobuf I do not find any way to represent strings as char array ,
and the only data type is string which gets generated as std::string. so I
am stuck here as due to this I am not able to allocate these member strings
on shared memory and thus the protbuf objects on shared memory. *
It would be great if you help me on this . My protobuf objects are pretty
simple few int, float and string members (fixed byte char array will also
suffice.). Thanks in advance.
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
To post to this group, send email to email@example.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.