Re: Python module
Markus Hoenicka <[email protected]> Mon, 02 Feb 2009 12:16:41 +0100
| Newsgroups | gmane.text.refdb.general |
|---|---|
| Message-ID | <[email protected]> |
Quoting Torsten Bronger <[email protected]>: > However, the first step is a standalone module talking with refdbd. > Is it better to communicate via TCP or better to call refdbc? TCP > seems more elegant, however, I haven't any experience with low-level > networking. > There are basically two considerations: speed and simplicity. If you expect lots of accesses, a native implementation of the protocol is likely to be faster, as you don't have to create a new process for each RefDB command called. On the other hand, the client/server protocol may be cumbersome to implement and to maintain. The interfaces of the command line clients are less likely to change, and they are usually simple to call from scripting languages. > What's the better source of inspiration? The Ruby or the Perl > module? > There is also a (not-so-obvious) PHP library to steal from. See "phpweb/includes/refdblib.inc.php" in the RefDB sources. This is another straightforward example of a library which just calls the C clients. Either way, I'll be happy to help if there are questions regarding the client/server protocol or the C client interface. regards, Markus -- Markus Hoenicka [email protected] (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword