TITLE: Moduli space of boundary maps with prescribed chain and homology groups?
QUESTION [16 upvotes]: Let $R$ be a reasonable ring (maybe I mean a PID, or $\mathbb{Z}$, and when sufficiently desperate, a field). Now consider fixed sequences $C_n$ and $H_n$ of $R$-modules, which are tame in every possible sense -- finite rank, zero for large enough $n$, etc. Here's the problem:

What is the set (space? category?) of all $R$-linear maps $d_n:C_n \to C_{n-1}$ so that $(C_\bullet,d_\bullet)$ forms a chain complex with homology groups $H_n$?

I've tried to figure things out in baby cases without much luck in terms of seeing the bigger picture. You can easily create situations where no $d_\bullet$s will suffice, but most fascinating are the cases where several different sequences of boundary operators will work!
A very general thing to do is fix a basis of all chain groups in sight and examine conditions that entries of various $d_\bullet$-representing matrices have to satisfy. Just requiring the $d_\bullet$s to produce a chain complex yields an algebraic variety generated by a system of multivariate quadratic equations (which sounds nightmarish). So unless forcing the homology to be prescribed by $H_n$s greatly simplifies things, I should not expect a very explicit answer. However, I'd like to know what the obstructions to getting such an answer might be.
In the cases of interest, all my $d_\bullet$s can be assumed to have an upper-triangular form as $R$-matrices, although I'd also be interested in a solution that ignores such structural constraints.
Update: Thanks to David Speyer's answer, which provides a wealth of information on the problem when $R$ is a field. I'm still seeking answers for more general choices of $R$.

REPLY [7 votes]: Over a field $k$, this is a special case of quiver loci. The general framework is that you are given a triangular array $(r_{ij})_{1 \leq i \leq j \leq n}$ of nonnegative integers. Consider a list of $n-1$ matrices $M_1$, $M_2$, …, $M_{n-1}$ of size $r_{ii} \times r_{(i+1)(i+1)}$. The quiver locus is the set where $\mathrm{rank}(M_i M_{i+1} \cdots M_{j-1}) \leq r_{ij}$. Your case is where $r_{ij}=0$ for $j-i \geq 2$. 
See Knutson, Miller and Shimozono, and the many citations therein.
To be a bit more explicit, if you want $\dim V_i = d_i$ and $\dim H_i(V_{\bullet})=h_i$, then take $r_{ii} = d_i$, compute $r_{i(i+1)}$ by solving the linear equations $r_{(i-1)i} + r_{i(i+1)} + h_i= d_i$, and put all other $r_{ij}=0$.