I'm building a commenting mechanism into an application that allows a programmer/plugin author to implement comment threads in a simple manner.
The way I wanted to do this is by using a unique identifier for the comment threads, which took the hard work away from the developer by using a unique key for the thread, where you can place code like this anywhere in the application.
let's say the programmer wanted to add comments to an image upload plugin he calls "my images". In the code he can then call something like:
insertCommentThread('myimages:340');
another developer might have a more complicated thing and he wants to add comments to a wiki entry:
insertCommentThread('wiki-entry-page-name-it-could-be-long');
So the developer can call the threads any name they like.
I'm a bit worried about the speed of things if the length of the keys will become long, so I'd like to store the keys in some other format.
So my question is...
Is there a way to store a string key in some encoded way so that it becomes smaller and faster to lookup?
(I could hash the strings, but then readability of the database gets lost...)
btw. I'm using MySQL