created DAO for db access that emits events to faye and rest services