The problem of distributed storing and processing of streaming data in IoT systems is considered. A mathematical model and agent-based software architecture for distributed streaming data processing over heterogeneous computer network is offered. The software architecture determines the following features of IoT nodes software: structure of software components, models of interoperability, algorithms of resource management and also xml-based language which allows to descript distributed IoT applications. The offered architecture is implemented as a software framework ABSynth.