add realtime notice by socket.io, and enhanced, refactoring...