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@centos.org http://lists.centos.org/mailman/listinfo/centos
At Wed, 29 Dec 2010 02:28:48 +0200 (EET) CentOS mailing list centos@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@centos.org http://lists.centos.org/mailman/listinfo/centos
MIME-Version: 1.0
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
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?
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.