with some 50 esp8266's and two RPi's I've build a small brewery automation where each sensor or actuator was a server with a microprocessor doing it's task(s) and communicated using MQTT for PUBSUB. One RPI was a PID-controller server and one a MQTT-broker and SQLite storage. Took some time to figure out but then worked flawless
If I had to build something bigger now I'd make sure every service uses multiple communication protocols, MQTT, webhooks, JSONRPC, Server Sent Events, http POST etc. For all storage, user credentials, log in, queues and what not I'd use SQLite. Then some in process bus to route the data to the actual service and the results back to the recipients.