migrate samples to netty server