# Definition of gluing of dg categories

I am reading the paper by Kuznetsov and Lunts, Categorical resolutions of irrational singularities, and I’m struggling with a few things. The definition of gluing of DG-categories $$\mathcal{D}_1$$ and $$\mathcal{D}_2$$ along a bimodule $$\phi \in \mathcal{D}_2^{op} \otimes \mathcal{D}_1$$ is the following: they say that an element of such a category is a triple $$(M_1, M_2, \mu)$$, with $$M_i \in \mathcal{D}_i$$ and $$\mu \in \phi(M_2,M_1)$$ a closed element of degree zero and then they define the morphisms of degree $$k$$ between two such triples to be
$$Hom^k(M_1,N_1) \oplus Hom^k(M_2,N_2) \oplus \phi^{k-1}(N_2,M_1).$$
My questions are related to this definition:

1) Can we change the definition of the morphisms and instead of $$\phi^{k-1}(N_2,M_1)$$ put $$\phi^{k-1}(M_2,N_1)$$ (eventually changing the definition of the differentials and the composition law)?

2) The differential is defined in the obvious way in the first two components, while in the third is defined as
$$-d(f_{21}) – f_2 \circ \mu + \nu \circ f_1$$
where the map we are considering is $$(f_1,f_2,f_{21})$$ and the objects are $$(M_1,M_2,\mu)$$, $$(N_1,N_2,\nu)$$. I don’t understand what’s the meaning of the last two pieces, how should I intend the compisition?

EDIT: I understood the answer to question 2, my mistake was that I wasn’t taking into account that we were talking about right modules. Still, I’d like to know the answer to question 1.

This gluing can be viewed as a dg-category of “generalized morphisms”. If you take $$\mathcal D_1 = \mathcal D_2 = \mathcal D$$ and $$N$$ to be the diagonal bimodule, then what you get is the dg-category of morphisms described for example by Drinfeld in Dg-quotients of dg-categories. The point is that closed degree $$0$$ morphisms in this gluing want to model “coherent commutative squares”, so that you’ll have some $$(u,v,h)$$ such that $$dh = m u – v n$$, if $$m$$ and $$n$$ are suitable objects of that gluing (forgetting “domains” and “codomains”. If you change your definition according to your rule, it seems to me that you have a morphism $$h$$ which goes in the “wrong direction” and cannot measure anymore the deviation of the square to being commutative.