Knowledge Sharing Protocol for Smart Spaces