I've written an Object Cache in PHP.
http://code.google.com/p/php-object-cache/
However, it requires PHP Sockets support which is not available on a lot of PHP builds.
Coming to the conclusion that all hosting that support PHP should support C, I'm going to rewrite this in C.
The PHP source is here:
http://code.google.com/p/php-object-cache/source/browse/trunk/socket.class.php
Basically it is a socket deamon, that just persists any Object sent to it, in memory. The objects are serialized as JSON strings, but stored as PHP Objects in the deamon.
So my question is, in C, do I save these objects as C objects in the deamon? Or should I save them as JSON strings?
For JSON serialization, I'm thinking of using one of the C souce from here: http://www.json.org/
either:
http://oss.metaparadigm.com/json-c/
or
http://fara.cs.uni-potsdam.de/~jsg/json_parser/
These files are however *.c and *.h? How do I compile them and use them in my code?