  We study three classes of continuous time Markov processes (inclusion
process, exclusion process, independent walkers) and a family of interacting
diffusions (Brownian energy process). For each model we define a boundary
driven process which is obtained by placing the system in contact with proper
reservoirs, working at different particles densities or different temperatures.
We show that all the models are exactly solvable by duality, using a dual
process with absorbing boundaries. The solution does also apply to the
so-called thermalization limit in which particles or energy is instantaneously
redistributed among sites. The results shows that duality is a versatile tool
for analyzing stochastic models of transport, while the analysis in the
literature has been so far limited to particular instances. Long-range
correlations naturally emerge as a result of the interaction of dual particles
at the microscopic level and the explicit computations of covariances match, in
the scaling limit, the predictions of the macroscopic fluctuation theory.
