Server engine based on event-driven paradigm