I've been trying to read KapustinKapustin–Witten -Witten Electric–Magnetic Duality And The Geometric Langlands Program recently, as someone whose mathematical interests are in the Langlands program. I have some physics background, but not including string theory. I'm looking to understand "branes", which play a big part in the paper, and so far, in this context, here is my understanding (please feel free to correct any misconceptions):
Kapustin-WittenKapustin–Witten formulate a TQFT with gauge group $G$ on a spacetime of the form $\Sigma\times C$, where $C$ is going to play the role of the curve of the geometric Langlands correspondence. $\Sigma$ is a Riemann surface with boundary $\partial\Sigma$, and we are going to look at an effective field theory on $\Sigma$ after compactification on $C$. The resulting fields on $\Sigma$ are going to have to satisfy the Hitchin equations, whose solutions are parametrized by the Hitchin moduli space $\mathcal{M}_{H}(G,C)$. The assignment of the value of the field on $\Sigma$ is going to described by maps from $\Sigma$ into $\mathcal{M}_{H}(G,C)$. I believe this is what physicists refer to as a "sigma model".
As a side remark, $\mathcal{M}_{H}(G,C)$ has many fascinating properties, for example it is hyperkahler, and related to both $\mathrm{Bun}_{G}(C)$$\operatorname{Bun}_{G}(C)$ and $\mathrm{Loc}_{G}(C)$$\operatorname{Loc}_{G}(C)$, and its mirror pair concerns the Langlands dual ${}^{L}G$ in place of $G$. This makes it of interest in the Langlands program.
But for some reason it is more than just what I described -— in fact, a brane in the B-model (or a B-brane) really consists of a coherent sheaf. Hence the appearance of the derived category of coherent sheaves in the formulation of homological mirror symmetry.
My first question is: Why are B-branes coherent sheaves? Apparently this is related to some sort of "boundary modification" (see 5.2 of Frenkel's survey hereGauge Theory and Langlands Duality), but I don't know what these are, and I would be happy to see an explanation or elaboration.
Morphisms of branes are actually pretty important in another way, as this is how Kapustin-WittenKapustin–Witten get from A-branes to D-modules on $\mathrm{Bun}_{G}(C)$$\operatorname{Bun}_{G}(C)$ (in terms of which the geometric Langlands correspondence is stated). This is constructed by means of a "canonical coisotropic A-brane" (which is $\mathcal{M}_{H}(G,C)$ itself considered as an A-brane) whose endomorphisms are supposed to give a sheaf differential operators after some sort of localization or sheafification process. Kapustin's notes hereLectures on Electric–Magnetic Duality and the Geometric Langlands Program say this is related to "insertion of vertex operators" (I don't really understand what this means). This also somehow looks reminiscent of Beilinson-Drinfeld'sBeilinson–Drinfeld's work producing D-modules (see 9.2 of hereFrenkel - Lectures on the Langlands Program and Conformal Field Theory) although as far as I know that makes no reference to branes.