Extract serialization and storage functionality into plugin like serialization module to enable different serialization and storage methods like storing session data as redis hash or using msgpack.