added sweet socket api stuff
added apiobject system to provide both the db and socket objects