2016-04-22

Note to self #3

Task:
  • Measure network throughput of <your favorite dipshit 3rd party app>
  • Report traffic over granularity periods
  • C99, _GNU_SOURCE
Actions taken:
  • Using libpcap in main thread to capture packets (also filtering, etc)
  • Piping info into another thread (simple pthread usage) that does the math
Problem encountered:
  1. When emitting all the info I read from the pipe to stdout, the average packet count is 2700..3000 packet/s
  2. When only the per GP statistics, the packet capture drops to 3-11 packet/s
Extensive head scratching intensifies.

[few days had passed]

Turned out, if I print all the info, of course it captures more tcp traffic, as I'm over an SSH connection! I'm generating that traffic!!!111one

/me idiot

Don't do Java, kids. It's bad for your brains.

2016-04-06

XML: Can I use it as a database?

A question popped up, that can (and should) we store slightly structured data in XML? For example: results of measurements that do not have any structure except timestamps and named columns.

Well, my opinion matches with this book's ideology:
XML is not a database. It was never meant to be a database. It is never going to be a database. Relational databases are proven technology with more than 20 years of implementation experience. They are solid, stable, useful products. They are not going away. XML is a very useful technology for moving data between different databases or between databases and other programs. However, it is not itself a database. Don't use it like one.

The important point here that you must grasp is, that XML is an encoding. It is a data exchange format, not a data storage format.