6

We have around 5 Publication Targets and want to delay Publishing by 10-15 minutes on two of those Targets. This is required because of caching; on a number of servers the content takes around 8 minutes to get populated fully on the site. In other Targets we have Facebook and Twitter and don't want to publish the link there before the content actually gets published on the live site.

Also I would like to know whether it's possible that a Component gets Published to a specific Target when that Component is Published successfully on another Target?

  • It would be better to ask two separate questions instead of combining them into one. – Quirijn Sep 30 '13 at 10:01
  • About the first question: this is a very unusual requirement. Can you elaborate a bit on the rationale behind this? – Quirijn Sep 30 '13 at 10:02
  • Due to the caching and n number of servers the content takes around 8 minutes to get populate fully on the site.In other targets we have FB and Twitter and don't want to publish the link there before the content actually gets published on the live site – mohit Sep 30 '13 at 11:09
9

The problem here is that because of your infrastructure, Tridion reports incorrectly that the page is published and deployed. I see two solutions:

  1. Create a custom storage extension which stores the page, waits until the page is fully deployed everywhere, and then sets the status to success. A very technical, risky solution: if the change is somehow not picked up, the deployment thread could stay inactive indefinitely.

  2. Tell your content managers they need to take a separate action to send the page to Twitter or Facebook, by publishing to the 'Twitter/Facebook' target.

The second approach is low-tech, gives your content managers a bit of extra work, but also gives them full control over which pages to communicate to the social media platforms, and when exactly to do this.

| improve this answer | |
  • +1 for the second scenario - creating a situation where editors should also be checking content exists and is presented correctly before 'posting' to Social Media sites. – Dylan .. Mark Saunders Oct 1 '13 at 17:19
4

From your given information about the first question, I gather that you are Publishing to multiple Publication Targets, probably through a single Target Type, or you have a single Publication Target with multiple Destinations.

This kind of setup works well when you require the content to arrive on all Destinations around the same time but more importantly in the same Transaction. Given your information this it not exactly what you are looking for, you seem to want the Deployment to be scheduled after each other.

As a solution I would suggest to separate the Destinations in their own Publication Target and give each its own Target Type. Next give the Content Editors only the right to Publish to one of those Target Types and not too the others (and instruct your Administrators, not to use those either). Then you can write a couple of Event Handlers that will subscribe to the SetPublishStateEventArgs of the items and then trigger Publishing to the next Target etc. This way your Publish Transactions will be (sort of) scheduled after each other automatically.

Now as for your second question: basically we are talking about the same thing. Subscribe to the SetPublishStateEventArgs of that item (Component) and when PublishTransaction.State == PublishTransactionState.Success add a new PublishTransaction for the same item to another Target.

The only downside of all this is that since you separate each Destination of the Publication Targets and assign them to separate Target Types, you will have some overhead of Rendering (the item is rendered for each Transaction separately). If that becomes a performance issue, then you should consider a Storage Extension as Quirijn mentions in his answer.

| improve this answer | |
  • very nice "rolling publish" approach :-) – Alvin Reyes Oct 1 '13 at 6:44
3

You could have event handler that would add n minute delay when saving publication targets to some particular target.

If you want to detect the publish time dynamically you can also do it with event handler, but now you will need SetPublishedTo event. It is triggered when publication transaction is complete (component get published). Inside the handler you can go and update publish time of dependant publish transactions, or just initiate another publish action.

| improve this answer | |
2

As I see it, your problem is that the long time taken to publish and deploy leads to the sites being out of sync for a time. Before you go down the road of customising your system, I would first take a good look at using Tridion's inbuilt features - specifically the separation of deployment phases.

In the "Publish settings" tab of the Publish dialog, you can specify "Phase 2: Place content on-line later." This allows you to specify enough time to completely render and transport your content before beginning deployment. In turn this can mean that your deployment times are relatively short compared to the 8 minutes you state.

You may also consider scaling out your publishing to provide a dedicated publishing server for the target which needs to be serviced more quickly than the others.

Also look at your content modelling - perhaps you can publish some content quicker by using dynamic component presentations.

Only once you have exhausted these possibilities does it make sense to think of customisation.

| improve this answer | |
1

With core service I tried to reschedule the publish transaction. It is not possible there to delay an already started publish transaction. With core service you have to delete the transactions for facebook and twitter and then reschedule for 8 mins later.

Firstly you can check if Tridion Event System also behaves as Core Service is doing in case to publish transaction.

If it is possible to reschedule the transaction there then all good. If no, then try to abort the publish transaction and reschedule new publish transaction. This check will have to done only for those those targets where you want to delay the publishing.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.