Created by: jacquesqiao
as comment of @reyoung, split this pr into two. one for pserver and one for swig. 1, PserverUtil #1051 2, swig api. TBD