Yes I was thinking of it in a GUI context. There is a third option you have not considered: communicating over a bi-directional socket using a custom wire protocol. In practice that still amounts to designing an API but implementation-wise that should be much easier. -- O.L.