Building Blocks of the Internet of Things: State of the Art and Beyond