  In the classical version of online bipartite matching, there is a given set
of offline vertices (aka agents) and another set of vertices (aka items) that
arrive online. When each item arrives, its incident edges -- the agents who
like the item -- are revealed and the algorithm must irrevocably match the item
to such agents. We initiate the study of class fairness in this setting, where
agents are partitioned into a set of classes and the matching is required to be
fair with respect to the classes. We adopt popular fairness notions from the
fair division literature such as envy-freeness (up to one item),
proportionality, and maximin share fairness to our setting. Our class versions
of these notions demand that all classes, regardless of their sizes, receive a
fair treatment. We study deterministic and randomized algorithms for matching
indivisible items (leading to integral matchings) and for matching divisible
items (leading to fractional matchings). We design and analyze three novel
algorithms. For matching indivisible items, we propose an
adaptive-priority-based algorithm, MATCH-AND-SHIFT, prove that it achieves
1/2-approximation of both class envy-freeness up to one item and class maximin
share fairness, and show that each guarantee is tight. For matching divisible
items, we design a water-filling-based algorithm, EQUAL-FILLING, that achieves
(1-1/e)-approximation of class envy-freeness and class proportionality; we
prove (1-1/e) to be tight for class proportionality and establish a 3/4 upper
bound on class envy-freeness. Finally, we build upon EQUAL-FILLING to design a
randomized algorithm for matching indivisible items, EQAUL-FILLING-OCS, which
achieves 0.593-approximation of class proportionality. The algorithm and its
analysis crucially leverage the recently introduced technique of online
correlated selection (OCS) [Fahrbach et al., 2020].
