We propose a formalism inspired by matrix models to compute open and closed
topological string amplitudes in the B-model on toric Calabi-Yau manifolds. We
find closed expressions for various open string amplitudes beyond the disk, and
in particular we write down the annulus amplitude in terms of theta functions
on a Riemann surface. We test these ideas on local curves and local surfaces,
providing in this way generating functionals for open Gromov-Witten invariants
in the spirit of mirror symmetry. In the case of local curves, we study the
open string sector near the critical point which leads to 2d gravity, and we
show that toric D-branes become FZZT branes in a double-scaling limit. We use
this connection to compute non-perturbative instanton effects due to D-branes
that control the large order behavior of topological string theory on these
backgroundsComment: 40 pages, 5 figures, v3: further clarifications and references adde