refactoring

use map-reduce model.
use separator of platform dependent.
use asynchronous message receivers.