Magento code is organized into modules. One of the goals of the module is to provide namespaces. That is, modules allow one group of developers to write code without fear that their variables, objects, etc. Will be accidentally overturned by another group of developers.
Each Magento module can have its own session object. By providing each module with its own session object, Magento helps developers avoid name conflicts in the global PHP session variable. For example, the following code
Mage::getModel('core/session')->setData('foo',$someValue); Mage::getModel('customer/session')->setData('foo',$someOtherValue);
saves both values ββin the session, although they have the same key.
Regarding which session class you should choose - if you are writing your own module, you should create your own session class / model, thereby avoiding the above conflicts.
In practice, however, storing things on the kernel / session should not be a problem if you somehow summarize your variables.
Mage::getModel('core/session')->setData('my_namespace_foo',$someValue);
source share