How to Extend Legacy Systems into the AI & IoT Era