Hi, I need advice about developing C++ program. I need to develop 2 application which must communicate via network using SSL encryption. The problem is in which format to exchange the data. I can use XML format to exchange data between the hosts but a lot traffic will be generated. What are the usual practices to exchange data between the hosts? Regards Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.centos.org/pipermail/centos/attachments/20101229/9c5d4d62/attachment-0001.html>
On 12/28/10 4:09 PM, derleader __ wrote:> Hi, > I need advice about developing C++ program. I need to develop 2 > application which must communicate via network using SSL encryption. > The problem is in which format to exchange the data. I can use XML > format to exchange data between the hosts but a lot traffic will be > generated. What are the usual practices to exchange data between the > hosts?rather offtopic for this list. but... XML is about the most inefficient format imaginable, typically exploding your data to many times its original size, especially if it has lots of small fields what format is the data in now that you're exchanging? I'd want to use something close to the native format of the data. if performance is important, you'll want to transmit the data in binary as close to its native format as possible. if its complex structured data such as is often expressed in XML, you could look at defining a binary interchange format with JSON or ASN.1, but I'd be more inclined to roll my own simple binary message format since its just between your own two programs.
Thank you for the reply. The data is not so much - CPU utilization, RAM utilization, List of installed software, list of users and so on. The information is not so much. What are the options for this task is there a C++ library that I can use to convert the data and then to transfer if via network? Regards Peter >> I need advice about developing C++ program. I need to develop 2 >> application which must communicate via network using SSL encryption. >> The problem is in which format to exchange the data. I can use XML >> format to exchange data between the hosts but a lot traffic will be >> generated. What are the usual practices to exchange data between the >> hosts? > >rather offtopic for this list. but... > >XML is about the most inefficient format imaginable, typically exploding >your data to many times its original size, especially if it has lots of >small fields > >what format is the data in now that you're exchanging? I'd want to use >something close to the native format of the data. if performance is >important, you'll want to transmit the data in binary as close to its >native format as possible. if its complex structured data such as is >often expressed in XML, you could look at defining a binary interchange >format with JSON or ASN.1, but I'd be more inclined to roll my own >simple binary message format since its just between your own two programs. > > > > >_______________________________________________ >CentOS mailing list >CentOS at centos.org >http://lists.centos.org/mailman/listinfo/centos > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.centos.org/pipermail/centos/attachments/20101229/a642e84d/attachment-0001.html>
At Wed, 29 Dec 2010 02:28:48 +0200 (EET) CentOS mailing list <centos at centos.org> wrote:> > > > Thank you for the reply. > > > The data is not so much - CPU utilization, RAM utilization, List of installed software, list of users and so on. The information is not so much. What are the options for this task is there a C++ library that I can use to convert the data and then to transfer if via network?You might really do better using a scripting language, such as Tcl, Perl, or Python. Doing socket-level I/O (with or without SSL) in C or C++ is a non-trivial process.> > Regards > Peter > > > >> I need advice about developing C++ program. I need to develop 2 > >> application which must communicate via network using SSL encryption. > >> The problem is in which format to exchange the data. I can use XML > >> format to exchange data between the hosts but a lot traffic will be > >> generated. What are the usual practices to exchange data between the > >> hosts? > > > >rather offtopic for this list. but... > > > >XML is about the most inefficient format imaginable, typically exploding > >your data to many times its original size, especially if it has lots of > >small fields > > > >what format is the data in now that you're exchanging? I'd want to use > >something close to the native format of the data. if performance is > >important, you'll want to transmit the data in binary as close to its > >native format as possible. if its complex structured data such as is > >often expressed in XML, you could look at defining a binary interchange > >format with JSON or ASN.1, but I'd be more inclined to roll my own > >simple binary message format since its just between your own two programs. > > > > > > > > > >_______________________________________________ > >CentOS mailing list > >CentOS at centos.org > >http://lists.centos.org/mailman/listinfo/centos > > > > MIME-Version: 1.0 > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos > >-- Robert Heller -- 978-544-6933 / heller at deepsoft.com Deepwoods Software -- http://www.deepsoft.com/ () ascii ribbon campaign -- against html e-mail /\ www.asciiribbon.org -- against proprietary attachments
On 12/28/10 6:28 PM, derleader __ wrote:> Thank you for the reply. > The data is not so much - CPU utilization, RAM utilization, List of installed > software, list of users and so on. The information is not so much. What are the > options for this task is there a C++ library that I can use to convert the data > and then to transfer if via network?Most of that is already available via snmp. Are you sure you need to re-invent it? -- Les Mikesell lesmikesell at gmail.com
cpolish at surewest.net
2010-Dec-29 16:07 UTC
[CentOS] Network communication between hosts
derleader __ wrote:> The data is not so much - CPU utilization, RAM utilization, List of > installed software, list of users and so on. The information is not > so much. What are the options for this task is there a C++ library > that I can use to convert the data and then to transfer if via > network?The information you want may already be available over the network via snmp. The canonical invocation from the client host goes something like: snmpwalk -v2c -c public serverhostname Once you've sorted through the output, you'll want to switch to more targeted requests using snmpget or suchlike, change the community string, consider whether or not to use snmpV3, etc. You can invoke these system utilities from C++. If snmpwalk is not installed on your system try installing net-snmp on the remote (server) host, net-snmp-utils and net-snmp-libs on the client host. -- Charles Polisher
Seemingly Similar Threads
- Collecting data
- Tripplite SNMPwebcard communication lost and established randomly
- Arch Linux and Tripp Lite web snmp card issues.
- Tripplite SNMPwebcard communication lost and established randomly
- Tripplite SNMPwebcard communication lost and established randomly