Abstract: A customizable system and method for actively controlling and/or optimizing remote oil and/or gas production systems such as artificial-lifting systems runs within a desired or predefined envelope based on quantifiable and measurable parameters such as economical threshold, water cut, temperature, pressure, flow rate or vibration, failure model prediction, and the like. The execution of such optimizations or control is conducted with real-time diagnosis, thereby leading to the desired response or outcome.