Enhancement/1 sql queue

Close #1 

Using SplQueue for metrics