  We study the online convex covering problem and online convex packing
problem. The (offline) convex covering problem is modeled by the following
convex program: $\min_{x \in R_+^n} f(x) \ \text{s.t}\ A x \ge 1$, where $f :
R_+^n \mapsto R_+$ is a monotone and convex cost function, and $A$ is an $m
\times n$ matrix with non-negative entries. Each row of the constraint matrix
$A$ corresponds to a covering constraint. In the online problem, each row of
$A$ comes online and the algorithm must maintain a feasible assignment $x$ and
may only increase $x$ over time. The (offline) convex packing problem is
modeled by the following convex program: $\max_{y\in R_+^m} \sum_{j = 1}^m y_j
- g(A^T y)$, where $g : R_+^n \mapsto R_+$ is a monotone and convex cost
function. It is the Fenchel dual program of convex covering when $g$ is the
convex conjugate of $f$. In the online problem, each variable $y_j$ arrives
online and the algorithm must decide the value of $y_j$ on its arrival.
  We propose simple online algorithms for both problems using the online primal
dual technique, and obtain nearly optimal competitive ratios for both problems
for the important special case of polynomial cost functions. For any convex
polynomial cost functions with non-negative coefficients and maximum degree
$\tau$, we introduce an $O(\tau \log n)^\tau$-competitive online convex
covering algorithm, and an $O(\tau)$-competitive online convex packing
algorithm, matching the known $\Omega(\tau \log n)^\tau$ and $\Omega(\tau)$
lower bounds respectively.
  There is a large family of online resource allocation problems that can be
modeled under this online convex covering and packing framework, including
online covering and packing problems (with linear objectives), online mixed
covering and packing, and online combinatorial auction. Our framework allows us
to study these problems using a unified approach.
