eZ Community » Forums » General » When is there a need to use eZ...
expandshrink

When is there a need to use eZ Asynchronous Publishing?

When is there a need to use eZ Asynchronous Publishing?

Thursday 04 December 2014 9:50:56 am - 3 replies

Hi! I am new in ez publish. Recently I read about eZ Asynchronous Publishing. I can't get an idea in which cases I need to use it.

Friday 05 December 2014 8:25:15 am

Asynchronous publishing is only needed if you need to publish a lot of content concurrently. I would imagine most use cases do not need this to worry about this.

Details in the specifications:

https://github.com/ezsystems/ezpu...ions/4.5/asynchronous_publishing.txt

Modified on Friday 05 December 2014 8:28:25 am by Jani Tarvainen

Friday 05 December 2014 10:47:23 pm

Quote from Jani Tarvainen :

Asynchronous publishing is only needed if you need to publish a lot of content concurrently. I would imagine most use cases do not need this to worry about this.

Details in the specifications:

https://github.com/ezsystems/ezpu...ions/4.5/asynchronous_publishing.txt

ok, I got! If I understand you correct, for example if you have forums which is made on ezpublish, it's better to use this feature, right? Because, several users can publish posts simultaneously. What can happen when several users publish nodes at the same time without this feature?

Saturday 06 December 2014 9:56:45 am

hello there.

The main thing is indeed concurrency, more specifically at database level. Publishing is done in a big database transaction, during which quite a few rows are modified. Some of them are reffered to by many objects, like the tree one, but not limited to it.

When one of the transactions modifies a row, it keeps a lock on it until the transaction ends. Other publishing transactions that try to update the same rows will wait for the lock to be released. This wait is counted in tthe database's lock_wait_timeout, usually 30 or 60 seconds. Usually, publishing takes a couple seconds, and you don't notice it. If you stay locked for too long, the transaction fails and is rollbacked.

The problem is that (too) many things are done in the transaction, like copying images, indexing to the search engine, clearing caches, processing custom datatype data, etc... content classes can get very complex, objects can have multiple locations, some datatypes may use remote resources... languages also increase the number of queries quite a bit.

Worse: there is a vicious circle here: the more transactions there are simultaneously, the longer it takes for each query to run, making locks last longer.

With an asynchronous publishing operation, we get one main thing: control. Parallelism can be increased or lowered (it could even be made dynamic) depending on the complexity of the repository. The result is actually quicker publishing, since we can make sure the database always runs optimally.

User experience ends up being better, with constant publishing times and better feedback.

Does this clarify the situation ?

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from