Sitecore tips and tricks and community news !

Post Top Ad

Post Top Ad

Showing posts with label data. Show all posts
Showing posts with label data. Show all posts
7:30 PM

Big e-shop xCommerce architecture recomendation


In current days we are using e-commerce very often, even more then year before. What are our experiences with them? How many products they offer for us, how much properties those products have?

Usually that would be  clothes with some sizes, colors. But what if those products will be many and each will have more than 100 properties? How we should to build xCommerce architecture to deliver proper product and fulfill client expectations?


1. Context

Imagine that you have to deliver e-commerce solution based on xCommerce for client which:

  • Has multi-site solution (32 sites)
  • Has global market solution (32 markets)
  • Has around 45 000 products per each market
  • Each product has over 100 properties (parameters)
  • Solution has 24 languages

How we should to bit this topic, what is crucial in xCommerce approaching here? 

Answer is catalogs and indexing part.

I will skip here topic Azure or Solr, we decided to use SOLR.

But in terms of catalog and indexing. We should to ask what is the the main risk here?

Answer is amount of the data that we can unexpected create (or let xCommerce to create) and later push SOLR to index it. Here fun fact - indexing then can take e.g. 40 days :]


2. Issue

Why?

Firstly what is the default xCommerce shop creation approach?

To create each site with own catalog. In this scenario let's calculate

Well let's calculate:

45 000 products * 32 markets (catalogs) * 23 languages = (*o*) this is the numcber of entries which we will have in xCommerce and later they will be indexed (or tried to index at least) by SOLR.


3. Solution

So what we should do ? Is there any way to mitigate this issue?

Yes, we have to decide to change the default approach and use only 1 shared catalog for each site. It's possible. To obtain the results you only have to remember to:

  1. Assign catalog to main commerce catalogs node



  2. Do not assign any catalog to node under specific site catalog node


  3. Link you Commerce catalog setting in each site Settings node to shared catalog in main commerce catalog node (point 1)


  4. Change you custom queries to SOLR to check your sort of MarketId to filter proper products

Enjoy !

10:55 AM

Event Queue - Hidden Dangerous

Last time I was involved into project because of some strange issue. Guys had environments divided on CM and CD, there were a few of them, and on each was problem with propagating content.



Let's start with details, well, imagine situation when you change something using content editor on  CM server. Then publish that changes and go to CD server. Now you notice that there are no changes here. Strange, right? 
Ok, then imagine situation when things mentioned before happened, but sometimes,nobody knows why, it's working. Yeap, in some situation your changes, like new field values or new items, appear on CD. 
Nice? 
Than imagine situation when things mentioned before happened and additionally you have an access from CD to Sitecore dashboard. We assume some intern didn't know to cut off access from there. To clarify both CD and CM use the same set of databases. To check master database we are making some changes in Content Editor and save it, than without publish we go to CD, go to Sitecore dashboard and open Content Editor. What we see ? There is no our changes. What more? sometimes it works, like on Web database.

To summarize:
- we have separation on CM and CD
- both use the same DBs set
- sometimes we see changes on each DB

Strange ? Strange is an euphemism.



What we think firstly? Come on guys, there should be some other DB or some corrupted connection strings. Some other ideas, maybe some Load Balancer switch sometimes to other app version? Or maybe there is an issue with EventQueue, it's overloaded and doesn't refresh remote server so often as it should. Other ideas? 

After passing above points we also figure out a few more and our list after some time looked like:

  • checked DBs connections
  • checked LoadBalancer settings
  • checked overflow of EventQueue and PublishQueue
  • checked sites html definitions
  • checked AWS RDS with Sitecore vanilla
  • checked dynamic cache on IIS
  • checked cache server possibility before application servers

After went through whole list, everybody can feel disappointed. So, the best assumption was check data propagation one more time, hence we came back to EventQueue. As before, it wasn't blocked, overflowed or something, so looked nice. I got instance name from InstanceName column and check with machines and what discovered, both had the same name !

What it means ?
It means there was sort of race between servers during reading EventQueue. Who read first EventQueue, then it has the newest value, second server in reading saw it has been read already by itself (the same instance name) and didn't invoke any event to refresh.

It was probably occurred by devops server creation, who just clone previous server :)

To ad hoc fix I've setup InstanceName settings in config. for each application instance on servers.

I hope it will help someone, because sometimes so small things can be imperceptible.



Mystery solved !