AEM 6.1 client context vs context hub | Community
Skip to main content
varshsr
January 19, 2016
Solved

AEM 6.1 client context vs context hub

  • January 19, 2016
  • 7 replies
  • 2840 views

Are there any difference between client context and  context hub ?

why do we need 2 java script framework for  personalization in AEM ?

in which scenario they should be used assuming client context is there for a long time ?

https://docs.adobe.com/docs/en/aem/6-1/develop/personalization/client-context.html

vs

https://docs.adobe.com/docs/en/aem/6-1/develop/personalization/contexthub.html

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by kautuk_sahni

Hi

Context hub is a replacement for client context it is better and more lightweight or ClientContext is basically the old version, ContextHub its replacement..

Client context had performance problems, it forces integration to wait on stores.init.js, ajax call, which slows stuff down a lot (esp site catalyst page-view calls). Context hub is a lot faster and fixes that.
Engineering team is avoiding changes to client context. Future is context hub.

In 6.1, the feature set of ClientContext was still higher than ContextHub, which itself relied on some ClientContext core functionalities to work.

With 6.2, we should have closed the gap, and we're currently working with Product Management to get the ClientContext deprecated in favor of the ContextHub.

I guess it would be a good idea to highlight some of the major architectural changes to clarify why ContextHub soon replaces ClientContextt:

  • ContextHub decouples the Kernel from the UI leading to a much lower footprint on publish 
  • ContextHub Stores can deal with complex hierarchical objects while ClientContext was limited to key-value pairs
  • The eventing model of ContextHub is a lot more sophisticated including the fact that eventing happens as soon as stores are available and not just after „all“ stores have been loaded
  • Loading behavior can be controlled on a fine grained level (sequence of loading & synchronous as well as asynchronous store loading)

All in all ContextHub is capable of every aspect ClientContext could deal with and is optimized in the most significant areas of clientcontext that turned out not to work perfect due to the architecture. 

IOW: go for ContextHub and create issues in case you find bugs or limitations that we are not aware of yet.

 

 

I hope this answers to you question.

Thanks and Regards

Kautuk Sahni

7 replies

Jitendra_S_Toma
January 19, 2016

Hi,

I had the same concern and unfortunately there isn't much information out there to explain it. 

Here is the post where @Kunal pointed out some information about it. http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manager.topic.html/forum__a7iq-hi_all_i_haveon.html

Jitendra

kautuk_sahni
Community Manager
kautuk_sahniCommunity ManagerAccepted solution
Community Manager
January 21, 2016

Hi

Context hub is a replacement for client context it is better and more lightweight or ClientContext is basically the old version, ContextHub its replacement..

Client context had performance problems, it forces integration to wait on stores.init.js, ajax call, which slows stuff down a lot (esp site catalyst page-view calls). Context hub is a lot faster and fixes that.
Engineering team is avoiding changes to client context. Future is context hub.

In 6.1, the feature set of ClientContext was still higher than ContextHub, which itself relied on some ClientContext core functionalities to work.

With 6.2, we should have closed the gap, and we're currently working with Product Management to get the ClientContext deprecated in favor of the ContextHub.

I guess it would be a good idea to highlight some of the major architectural changes to clarify why ContextHub soon replaces ClientContextt:

  • ContextHub decouples the Kernel from the UI leading to a much lower footprint on publish 
  • ContextHub Stores can deal with complex hierarchical objects while ClientContext was limited to key-value pairs
  • The eventing model of ContextHub is a lot more sophisticated including the fact that eventing happens as soon as stores are available and not just after „all“ stores have been loaded
  • Loading behavior can be controlled on a fine grained level (sequence of loading & synchronous as well as asynchronous store loading)

All in all ContextHub is capable of every aspect ClientContext could deal with and is optimized in the most significant areas of clientcontext that turned out not to work perfect due to the architecture. 

IOW: go for ContextHub and create issues in case you find bugs or limitations that we are not aware of yet.

 

 

I hope this answers to you question.

Thanks and Regards

Kautuk Sahni

Kautuk Sahni
Lokesh_Shivalingaiah
January 22, 2016

Thanks Kautuk !! This is explains in detail !

nehacms-0r3f0r
November 9, 2016

Hi kautuksahni ,

When I hit http://localhost:4502/content/geometrixx-outdoors/en.html in AEM 6.2, I still see call to stores.init.js but as in AEM 6.2 Context hub takes over Client Context, why call is still coming. Is there still dependency on client context in 6.2 as well.

 

Thanks,

Neha

nehacms-0r3f0r
November 10, 2016

Hi kautuksahni ,

When I hit http://localhost:4502/content/geometrixx-outdoors/en.html in AEM 6.2, I still see call to stores.init.js but as in AEM 6.2 Context hub takes over Client Context, why call is still coming. Is there still dependency on client context in 6.2 as well.

 

Thanks,

Neha

kautuk_sahni
Community Manager
Community Manager
November 10, 2016

nehacms wrote...

Hi kautuksahni ,

When I hit http://localhost:4502/content/geometrixx-outdoors/en.html in AEM 6.2, I still see call to stores.init.js but as in AEM 6.2 Context hub takes over Client Context, why call is still coming. Is there still dependency on client context in 6.2 as well.

 

Thanks,

Neha

 

I have asked internal team to have a look at this. 

~kautuk

Kautuk Sahni
kautuk_sahni
Community Manager
Community Manager
November 15, 2016

nehacms wrote...

Hi kautuksahni ,

When I hit http://localhost:4502/content/geometrixx-outdoors/en.html in AEM 6.2, I still see call to stores.init.js but as in AEM 6.2 Context hub takes over Client Context, why call is still coming. Is there still dependency on client context in 6.2 as well.

 

Thanks,

Neha

 

 It seems there might be a bug in geometrixx outdoors where it still includes the clientcontext. 

I would request you to please create a daycare issue for this.

~kautuk

Kautuk Sahni