I know dbmail is your baby. I greatly appreciate your great mind for creating. This server is a cornerstone for a lot of great things.
Working on functions for storing and sorting mail right now. I figure if we have 2 keys per user with all the message ids in them with a common separator,then it will be easy to retrieve unread and read mail then it will be easy to retreive them from the cache. ie: keyname: dbmuread_10 {prefix,keyname,_user_idnr} 1234:1235:1236:12347 {msg_id:msg_id:msg_id} etc keyname: dbmread_10 {prefix,keyname,_user_idnr} 1220:1221:1222:1223 {msg_id:msg_id:msg_id} etc first count the delimitors add 1 then pass that to the explode function explode(string,:,size) we can "explode" like in php by the deliminator, and then fetch the stored messages. ie: dbmmsg_10 {prefix,keyname,_user_idnr} message data here Now we can keep track of all the messages, if one of the keys are not founf dbmuread_10 or dbmread_10 then we just have to make another mysql call and feth the messages to restore. I figure keep track of 100-200 messages in each key and that would cover everything. Then the mysql server would be used for archival storage. We don't need to worry about deleting messages or keys, memcache does that for us. the least used keys get tossed away once memory is full.so the users that don't check their mail, or don't access the system are not cached only the high demand users are cached for access. right now the way the key retrieval is done and storage is like this: If we need to retrieve a key a worker thread is started and we block the function with the thread join, when the thread is done we check the buffer struct and return the values and free the buffer struct. If we need to store a value a worker thread is created and we do not wait for it to compete we continue on with the rest of the flow of the daemon process. If the same keys are requested again and have not completed storing at that point we might have 1 or 2 extra stores, but I really don't think that is too much of a problem right now. A few extra connections vs a signal event buffer that polls a huge queue? I think its more of a give or take you eat up nearly the same resources between the 2. and resetting the key doesn't affect the key. I found that setting a key multiple times is the same as updating it from working with this so far.
_______________________________________________ Dbmail-dev mailing list Dbmail-dev@dbmail.org http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev