I'm new to web development and am managing to complete a site in pyramid but I want to have some kind of messages service and not sure where to start.
I want something like Quora or stackoverflow where alerts from the sites are send to the user(and maybe they can message each other). What do I need to do this? Is there a library or tutorial that can help me understand all thats involved or do I simply create a data model for messages and query the database for this? I want a way to allow users to track activity of other users and communicate with each other and I do not want to recreate email.
Is there a proper easy way to do this that could work with pyramid?
Update: I found a few resources and I think I get a idea. It would be great to learn if there's a more generally accepted way of doing it but I'm thinking I can just create this structure and query it for new messages every x seconds:
CREATE TABLE `messages` (
`message_id` int(11) NOT NULL auto_increment,
`from_user` varchar(65) character set latin1 collate latin1_general_ci NOT NULL,
`to_user` varchar(65) character set latin1 collate latin1_general_ci NOT NULL,
`message_title` varchar(65) NOT NULL,
`message_contents` longtext NOT NULL,
`message_read` int(11) NOT NULL default '0',
PRIMARY KEY (`message_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=21;