Boost logo

Boost Users :

Subject: [Boost-users] Design query using Boost.
From: Rahul Mathur (srivmuk_at_[hidden])
Date: 2013-11-24 13:23:17


All,

I have a design sinerio. I have different struct (C structures) having
different data's but NO similarities between struct and each struct does
different operations. The struct for example are -

struct Apple {
int A;
char B;
long C;
double d;
..
..};

struct Orange {
char A;
int B;
unsigned int C;
long d;
..
};

and maybe few more.

Above few struct data members have dynamic data and other members have
fixed/hardcoded datas. The complete struct is send as a buffer to a remote
machine through native send()/read() API calls which has been successfully
implemented. Please note this data as tested were hard coded or completely
static but didn't had combination of dynamic/real and static data..

Now such operations (viz different or repeated) with ONE/MULTIPLE SET of
data could be many as 1000, I wish now to send complete operations to
remote machine, get a ACK from it and work on this struct data with
modification/cancellation/reject/etc operations.

One way could be to work with something similar -

struct Apple {
...
..};

vector <Apple> data;
data.insert (begin();end())

---
But, I have few questions -
1. I can have "std::map<string, vector>" and send this data as native
send(). Latter read/recv() with string. Am I correct as I would have
multiple operations?
2. I do wish to maintain synchronisation using Boost::lockfree mechanism
latter?
3. Any other techniques?
Thanks.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net