Predictive Personalisation between different multi-tenancy sitecore websites - sitecore

We have different instances of websites some of them with up to 4 multisites each. They have their own XDB backend.
We have a requirement below:
Able to track the user between each sites. When user visits the dental site and comes to company main site then show the carousel
banner with dental Ads.
When user fills up the form or download certain PDF documents, increase the accumulated goals. e.g. if user visits dental site and
fills up form (worth 10 points) and goes to different site and
downloads pdf (worth 5 points). The total goal value accumulated
should be 15.
Should be able to view the exact same user profile details (on each instances).
I understand we could use Federated experience manager, but above all are sitecore instances.
Would you able to help us how above can be achieved?
e.g.
Do we need to share same xDB and analytics Databases for ALL INSTANCES?
Does all sites need to be on SINGLE instance to achieve above?
Is it possible to share goals, personas, segments setup between different instances?
Any other recommendations?
Finally how does sitecore works out the predictive personalization i.e. it reads the xDB or analytics or something else?
Thanks.

Do we need to share same xDB and analytics Databases for ALL
INSTANCES? Yes.
Does all sites need to be on SINGLE instance to achieve
above? All sites can exist on separate instances, not an issue here.
Is it possible to share goals, personas, segments setup
between different instances? Yes share the xDB among the instance, setup Database replication in CD and make sure machine key are same Please note that there lot of other things to be considered for coming to conclusion on this point.
More reference links:
http://digital-learnings.blogspot.in/2015/12/sitecore-multi-site-or-multi-instance.html
https://doc.sitecore.net/sitecore_experience_platform/developing/xdb_overview/scalability_options
http://www.nonlinearcreations.com/Digital/how-we-think/whitepapers/Whitepaper-Planning-your-Sitecore-xDB-infrastructure.aspx

Related

How to Create SharePoint Environment for group of companies with separate Active Directories

I have a requirement where my company CEO bought three more companies and now became 4 companies. Every company has its own Active Directory and they are on different locations within a city. How would I use different AD's for SharePoint? What kinda network do we need to bring so all companies can access SharePoint from there locations? etc
Got a requirement to implement SharePoint so all companies can work in collaborative manner and get alerts using email as well. Can anyone let me know what needs to be done in a proper sequence manner.
1?
2?
3?
I would really appreciate your help.

Microservices Architecture: Cross Service data sharing

Consider the following micro services for an online store project:
Users Service keeps account data about the store's users (including first name, last name, email address, etc')
Purchase Service keeps track of details about user's purchases.
Each service provides a UI for viewing and managing it's relevant entities.
The Purchase Service index page lists purchases. Each purchase item should have the following fields:
id, full name of purchasing user, purchased item title and price.
Furthermore, as part of the index page, I'd like to have a search box to let the store manager search purchases by purchasing user name.
It is not clear to me how to get back data which the Purchase Service does not hold - for example: a user's full name.
The problem gets worse when trying to do more complicated things like search purchases by purchasing user name.
I figured that I can obviously solve this by syncing users between the two services by broadcasting some sort of event on user creation (and saving only the relevant user properties on the Purchase Service end). That's far from ideal in my perspective. How do you deal with this when you have millions of users? would you create millions of records in each service which consumes users data?
Another obvious option is exposing an API at the Users Service end which brings back user details based on given ids. That means that every page load in the Purchase Service, I'll have to make a call to the Users Service in order to get the right user names. Not ideal, but I can live with it.
What about implementing a purchase search based on user name? Well I can always expose another API endpoint at the Users Service end which receives the query term, perform a text search over user names in the Users Service, and then return all user details which match the criteria. At the Purchase Service, map the relevant ids back to the right names and show them in the page. This approach is not ideal either.
Am I missing something? Is there another approach for implementing the above? Maybe the fact that I'm facing this issue is sort of a code smell? would love to hear other solutions.
This seems to be a very common and central question when moving into microservices. I wish there was a good answer for that :-)
About the suggested pattern already mentioned here, I would use the term Data Denormalization rather than Polyglot Persistence, as it doesn't necessarily needs to be in different persistence technologies. The point is that each service handles its own data. And yes, you have data duplication and you usually need some kind of event bus to share data across services.
There's another option, which is a sort of a take on the first - making the search itself as a separate service.
So in your example, you have the User service for managing users. The Purchases services manages purchases. Each handles its own data and only the data it needs (so, for instance, the Purchases service doesn't really need the user name, only the ID). And you have a third service - the Search Service - that consumes data produced by other services, and creates a search "view" from the combined data.
It's totally fine to keep appropriate data in different databases, it's called Polyglot Persistence. Yes, you would like to keep user data and data about purchases separately and use message queue for sync. Millions of users seems fine to me, it's scalability, not design issue ;-)
In case of search - you probably want to search more than just username, right? So, if you use message queue to update data between services you can also easily route this data to ElasticSearch, for example. And from ElasticSearch perspective it doesn't really matter what field to index - username or product title.
I usually use both approaches. Sometimes i have another service which is sitting on top on x other services and combines the data. I don't really like this approach because it is causing dependencies and coupling between services. So in general, within my last projects we tried to stick to polyglot persistence.
Also think about, if you need to have x sub http requests for combining data in some kind of middleware service, it will lead you to higher latency. We always try to cut down the amount of requests for one task and handle everything what is possible through asynchronous queues. ( especially data sync )
If you conceptualize modules as the owners and controllers of the data they work on, then your model must also communicate that data out of that module to others. In contrast, the modules in a manufacturing process have the access to change data without possessing and controlling it.
Microservices is an architecture for distributed processing, like most code, where modules pass the data around to work on it. From classic articles by Harvard Business Review and McKinsey on the subject of owning members of a supply chain, I identified complexities arising from this model and wrote an article teaching programmers what you need to know: http://www.powersemantics.com/p.html
Manufacturing is an architecture for integrated processing, where modules work on the data without passing it around from point to point. This can be accomplished by having modules configured to access the same memory, files or database tables. My architecture shows how to accomplish this on memory via reference properties.
When you consider "exposing an API at the Users Service end which brings back user details based on given ids", you need to be aware that creates what HBR calls "irreversible" complexity, which I've dubbed centralization complexity. Don't build A->B (distributed) systems, because you can't decentralize them later after failing to separate requirements. Requirements in production processes represent user instructions, and centralized modules only enable you to change the wrong users' processes. In other words, centralized modules don't document user groups or distinguish them from derived-product-users.

Nopcommerce registering new shops

In shopify if I create a new store I get my own admin panel. I am going through nopcommerce and it appears to me that a single installation is built for only one shop admin. So if I am running nopcommerce from my site I can not let users register and create new stores - I could run 1 store though?
Is this understanding correct or nopcommerce lets users register and create new shops?
I think you're misunderstanding nopCommerce. It's not a SaaS platform like Shopify, but a full on-site installation of an ecommerce application.
In recent versions, you can manage more than 1 store with the same installation, so that different domains point to different stores. However, in my opinion this is intended to have different shops under the same owner, so you don't have to set up another server/hosting plan for each shop you want to run.
When having multiple stores, you can assign products, categories and so to a specific store.
See more information at http://www.nopcommerce.com/featurelist.aspx
Quote from above:
With multi-store support you can launch several online stores using a single integrated system. You can create unique online stores for multiple brands, products, B2B, B2C, affiliates, co-branded stores and more. You can also quickly launch micro-stores for promotional campaigns. Best of all, every online store shares a single database.

Opencart: Master product list, multiple slave sites possible?

One of my B2B partners asked me a question today. I enjoyed the whooshing sound it made as it went over my head, since I've never even looked at a line of code from OpenCart. I suggested to him that I could post it here, where the experts live.
Check it out:
I am looking at opencart as a solution for a development project that we have and I wanted to know if anyone knows if it is possible to setup OpenCart as a master/slave configuration. All sites will be on the same server with different IPs and different domain names so I would be using the same core database for the master site and each slave/product site.
What I am looking for is a way to manage all the products from one login so we don't have multiple shops that need to be managed. Is there a way to group products so I could group them by brand so they are only shown on the site they are meant for? I just wanted to check with the community to see if anyone is familiar with this setup.
It is supported since OC 1.4.9 I guess - and it's called multistore.
You have one eshop, one administration, one database, one set of products, categories, etc.
You manage the data in the master administration and set which data is visible at what slave store. Each slave store has to be an alias domain/subdomain to the main master domain.
Result: it is possible and not so hard to achieve. You can then have different settings (localization, theme, product settings, order settings, ...) per slave store.
Further, it supports multi domains, multi languages and multi currencies. With regards to the answer. shadyyx has already posted. I am furthering with regards to the technical side.
web server loadbalanced via dns:
opencart webserver1
php, nginx, apc, memcache
multiple stores on this server. The files and content is cloned to two other servers and they clone and sync every 1 hour. They get hits for high traffic.
opencart webserver2 - slave, cloned of webserver1
opencart webserver3 - slave, cloned of webserver1
cdn1 - rackspace cloud files - images, css, javascript
cdn2 - rackspace cloud files - xml, html, videos
database loadbalanced:
database mysql master server 1
database mysql slave server 2
database mysql slave server 3
So you can see. Opencart is a good solution to go with. Handling multiple stores on the same servers and or different servers. Working together.

Where to get/extract relational data on administrative regions of the world?

I'm working on a web-application that operates on services. Every service is normally provided over some (possibly several distinct) geographical domain(s) like city, county, region, state, country or worldwide.
Typical tasks:
users will submit their location as lng,lat and I will need to find what are the services available for them
when users add new service they should be able to select the smallest geographical domain that covers service area, eg: US->California->SFBayArea.
I wonder what is the best db schema to represent hierarchical relations of geo domains and where to get the actual data for geographical domains?
I started with openstreetmap though it looks rather complex and it will take considerable time. So I decided to appeal for community wisdom :)
Thank you for sharing your wisdom!
Have a nice day!
--UPDATES: updated typical tasks
For all sorts of geography-related data (though not maps), try http://www.geonames.org/.