Abstract. Ubiquitous computing is a challenge for the design of middleware. The reasons are resource constraints, mobility, heterogeneity, etc., just to name a few. We argue that such middleware has to be tailored to the application scenario as well as to the target platform. Such tailormade middleware has to be built from minimal fine-grained components, and the system structure must be highly configurable, as we will explain. We propose to use the well-known mixin layer approach to build the flexible lightweight middleware envisioned. We show that the thoughtful use of mixin layers is promising in this specific domain and allows to deal with issues such as device heterogeneity and resource constraints. To do so, we present the design and implementation of a middleware and three configurations derived from it. Our evaluation criteria are the number of supported features and the memory footprint. The middleware configurations derived perform well in these respects.