Representations of quivers, their generalizations and invariants