On Aug 14, 2006, at 5:38 PM, Daniel Swarbrick wrote:

1) Will this extend to console commands (ie, command-line completion) or
dialplan instructions only?

In principle yes, but at this point I am not concerned about the CLI for two reasons:

1) the evaluation of user input on the console is not performance critical

CLI input evaluation only executes sporadically when a command is entered. On the other hand, dialplan execution workload increases with the number of applications, contexts, extensions, variables and the number of calls.

2) the CLI should be removed from the daemon anyway

It is just as illiterate and unprofessional to put an interactive CLI into a daemon as it is to use strcmp()'s all over the place. The CLI will need to be removed from the daemon and separated out into a client utility. At that point it will no longer be a server issue.


2) What is the hash algorithm being used,

// ------------------------------------------------------------------------ --
// function:  opbx_hash_string(string)
// ------------------------------------------------------------------------ --
//
// Returns the hash value of the null terminated C string 'string' using the // SDBM hash algorithm. The number of significant characters for which the


and is a 32 bit hash too small (ie, collision-risky)?

This is a very widely used hash algorithm, often used for hashing fairly large datasets, for example Berkeley DB uses it. It performs very well on both numeric and alpha-numeric strings and it is very fast. As for the likelihood of collisions, identifiers and keywords in configuration/programming languages require much less collision safety than a database engine. In fact many compilers use 16 bit hashes. Considering that this algorithm has proven itself in database applications, it is certainly more than suitable for the purpose of identifying and storing identifiers.

rgds
benjk

                
___________________________________________________________ Try the all-new Yahoo! Mail. "The New Version is radically easier to use" – The Wall Street Journal http://uk.docs.yahoo.com/nowyoucan.html
_______________________________________________
Openpbx-dev mailing list
[email protected]
http://lists.openpbx.org/mailman/listinfo/openpbx-dev

Reply via email to