In this paper we discuss a family of models of particle and energy diffusion on a one-dimensional lattice, related to those studied previously in [1], [2] and [3] in the context of KPZ universality class. We show that they may be mapped onto an integrable sl(2) Heisenberg spin chain whose Hamiltonian density in the bulk has been already studied in the AdS/CFT and the integrable system literature.Using the quantum inverse scattering method, we study various new aspects, in particular we identify boundary terms, modeling reservoirs in non-equilibrium statistical mechanics models, for which the spin chain (and thus also the stochastic process) continues to be integrable. We also show how the construction of a "dual model" of probability theory is possible and useful.The fluctuating hydrodynamics of our stochastic model corresponds to the semiclassical evolution of a string that derives from correlation functions of local gauge invariant operators of N = 4 super Yang-Mills theory (SYM), in imaginary-time. As any stochastic system, it has a supersymmetric completion that encodes for the thermal equilibrium theorems: we show that in this case it is equivalent to the sl(2|1) superstring that has been derived directly from N = 4 SYM.