socketio and some data access stuff