Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Micha Somers 134 posts 597 karma points
    Apr 26, 2016 @ 09:50
    Micha Somers
    0

    ContentService and concurrency with Umbraco v7.x

    What are the Umbraco (7.4.3) guidelines for saving content using ContentService

    ( eg. with statements like: services.ContentService.Save(content); )

    especially with regard to concurrency?

    What does the framework already take care of and what kind of actions/conflicts are supposed to be handled by the developer?

  • Ryan 24 posts 106 karma points
    Apr 26, 2016 @ 10:15
    Ryan
    0

    From the first line of the documentation for ContentService:

    The ContentService acts as a "gateway" to Umbraco data for operations which are related to Content.

    Based on this description and educated assumptions of the methods involved and a quick scan of which tables are in my umbraco database (I haven't dived into the code for this part), I would say that the service is almost directly if not directly a data service which interfaces with the database.

    That means concurrency is largely dependent upon a combination of your web server (ie. IIS) and your database engine. For the popular database engines supported by Umbraco you can just assume they do a good job with concurrency out of the box, and IIS does okay but can be tweaked (for example by increasing the number of simultaneous requests per CPU core past the default of 12).

  • Micha Somers 134 posts 597 karma points
    Apr 26, 2016 @ 11:12
    Micha Somers
    0

    Thanks Ryan,

    With that in mind, that part of concurrency may hopefully be covered very well.

    But what are the guidelines/possibilities when it comes to conflict handling?

    Is there something in the Umbraco framework available to prevent a ContentService.Save action from simply overwriting any changes made by others meanwhile or even to detect that a change has happened by someone else? Is there something from a development point of view available to handle conflict resolution?

Please Sign in or register to post replies

Write your reply to:

Draft