A new 3-ary non-associative algebra, which is called a semi-associative $3$-algebra, is introduced, and the double modules and double extensions by cocycles are provided. Every semi-associative $3$-algebra $(A, { , , })$ has an adjacent 3-Lie algebra $(A, [ , , ]_c)$. From a semi-associative $3$-algebra $(A, {, , })$, a double module $(phi, psi, M)$ and a cocycle $theta$, a semi-direct product semi-associative $3$-algebra $Altimes_{phipsi} M $ and a double extension $(Adot+A^*, { , , }_{theta})$ are constructed, and structures are studied.