Is it better to use a Database or a data structure for network stack?
        Posted  
        
            by 
                poly
            
        on Programmers
        
        See other posts from Programmers
        
            or by poly
        
        
        
        Published on 2012-03-26T00:44:16Z
        Indexed on 
            2012/03/26
            5:41 UTC
        
        
        Read the original article
        Hit count: 247
        
database
I've built a multi threaded messaging application in C and I'm currently using a MySQL Memory table to save the session ID, but I'm not sure whether this was a good decision or not.
It works like this, the application sends a message and saves the source session ID in the MySQL table. When the application gets the success response it will remove the session's ID from the MySQL table, or if it received an error response then it will keep the ID to be retried later.
I've built it this way so that I don't need to care about building a data structure by myself, and the Database provides flexibility when it comes to querying it.
Do you think this is appropriate or do I need to use something else? Please note that the application is expecting to handle a large number of transactions/sec.
© Programmers or respective owner