lifecycle: introduce lifecycle support in the protocol stack
lifecycle: added an example
lifecycle: updated all examples