partly finsh judge service.

next is to write crawl and submit worker thread.