Complex event processing with T-REX