We are B2C Platform having about 2 millions of requests a day. The User can login and we want to show them products coming from Salesforce which applies to him. Depending on which products he already bought and products he actively has, we want to dynamically show him additional products he can buy. The list of products which should be shown, must be implemented similar to car configurator: meaning he can buy one product if he bought another or he can buy one if he spent already amount x of money. Also the prices may vary depending on choice he makes. So it requires implementation of custom logic. The question is, what would be the best place to locate the service implementing this logic and providing the product list with prices for the user. We see following options:
- Implementation in APEX and use of APEX Controller (REST Endpoint). Our web application would call the endpoint as normal web service. Here we are considered if the performance will be stable and whether it REST Controllers are designed for that.
- Implementation of webservice on Heroku using Heroku Connect. Here we are considered, if it really works easily as described
- Implementation of the service on our infrastructure and syncing products and prices via REST API or Notifications API or Streaming API. Disadvantage of this solution is that we have to take care about synchronisation of products and prices.
What way would you prefer and why?