I have been working on an embedded linux system for about a year now that includes net-snmp for the Agent running on the device. I added net-snmp toward the beginning of the project life-cycle when I did not understand the protocol that well so I may have been using it in weird ways. I created a couple of custom MIB’s for product specific values and whenever a packet was sent to the device, I had the agent write to a shared memory those specific values, in effect, acting as a database for other small applications running on the device to read and write to and get the changed configuration values.
Now, I am looking to upgrade that shared memory to a small compact database as it is becoming a bit unruly and hard to maintain.
My question is: What database out there is best for a small embedded device that is highly tailored to SNMP?
Some Relaxations (things that are not really needed for the database):
The database does not need the full power of SQL as I am not performing complex queries, just simple set’s and get’s (and the other forms of get’s per the protocol) and trap’s per the SNMPv3 spec).
Further Requirements:
-
It needs the ability to handle custom MIB’s (i.e. handle custom tables and scalars) (all table definitions can be static, I am not really “defining/loading” the structures/tables/scalars in a dynamic fashion, but the actual rows (the actual data/number of rows) is dynamic).
-
It needs to properly return errors to the agent when row modifications are inconsistent.
-
I need it to be extremely small in size as it is in a small embedded device.
-
Additionally, we are planning to swap out net-snmp in the future as I have experienced many weird quirks with it (probably part to how I am using it and part of how the library is). So, the database needs to handle working with a generic snmp agent (it doesn’t need to work as a generic database though, just enough features to make snmpv3 work).
-
The database also needs an easy mechanism to propagate all of its value to low-level components of the device (again, it’s an embedded system). This can be as simple as notifying some small app that a change has occurred.
-
I also need the uptime to be reasonably quick. When the processor boots, and the OS starts the database up, I need it to load everything pretty quickly (it doesn’t need to be instantaneous but reasonable) and propagate the saved values out to the rest of the device. This is in hopes of maximizing availability in the event of a power event like a power cycle or some other power-based anomaly.
-
If an error occurs when the configuration data is propagated to a lower level piece of software, then the errors can be passed through the database back up to the agent so it can report the error.
-
I need some error detection and correction on the database as this device might exist in an environment with a non-negligible amount of radiation.
I know I am hoping for a lot, but if anyone knows of anything like this or at least some starting point, that would be great!
1