Middleware provides an integration framework for multiple and potentially - verse computing platforms. It allows developers to engineer distributed appli- tions more easily, providing abstractions and primitives to handle distribution and coordination. Middlewareisconstantlyfacingnewchallenges.Today’sadvancesincomp- ing, including development of pervasive applications, exacerbates the diversity problem, introducing variations not only in terms of performance, but also in terms of environments and device characteristics. Software engineers are the- fore challenged both in the area of the development of new and scalable m- dleware systems, where open, heterogeneous, component-based platforms should provide richer functionality and services, and in the area of application devel- ment, where tools to simplify the use of middleware solutions are necessary. Software Engineering and Middleware is the premier workshop for the - search and practice community of software engineering working in both areas to presentanddiscussnewideasinthis?eld.SEM2004wasthefourthinternational workshop on software engineering and middleware of the EDO/SEM workshop series. Previous workshops of this series were successfully held in 2002, 2000 and 1999. Most of the proceedings have been published by Springer in the Lecture Notes in Computer Science series.