Preventing write-coalescing with write-behind

Dear all,
I am very interested in the write-behind feature but I would like to disable the write-coalescing optimization to see each.
Is there any way to do this ?
I feel the fact that CacheStore.storeAll(Map entries) works on cache-key/cache-value makes this impossible to have several cache-value for the same key :-( Not coalescing the consecutive changes on a given entry would require to have a method like CacheStore.storeAll(List<Change>) with Change holding the modification (insert/update/delete), the key and the value.
Thanks,
Cyrille
Cyrille Le Clerc
[email protected]
http://blog.xebia.fr

Thanks for the feedback Robert,
I implemented this "batch processing without coalescing" thanks a "command queue" colocated with my data.
Sample : perform async processing on each modification without coalescence of MyEntity identified by MyEntityKey store in "my-entity-cache".
In my agent/entry-processor, I simultaneously modify my data "MyEntity" and put an entry MyEntityCommand (stored in "my-entity-command-cache"), MyEntityCommand holds enough information to do my async processing. This processing is done asynchronously by MyEntityCommandcacheStore.
MyEntityCommand is associated with a key MyEntityCommandKey which is composed of MyIdentityKey+sequence-number, MyEntityCommandKey has a KeyAssociation with MyEntityKey to ensure colocation.
Benefits :
* There is no coalescence because MyEntityCommandKey contains a unique sequence number.
* The overweight of this "command queue" is limited because the command object only contains that limited piece of data I need for my async processing (foreign key on the entity + few things) and the queue is self purging thanks to a <expiry-delay> on "my-entity-command-cache".
Here is a configuration extract
<distributed-scheme>
  <scheme-name>entity-partitionned</scheme-name>
  <service-name>EntityDistributedCache</service-name>
  <serializer>
  </serializer>
  <backing-map-scheme>
    <local-scheme>
      <scheme-ref>unlimited-backing-map</scheme-ref>
    </local-scheme>
  </backing-map-scheme>
  <thread-count>10</thread-count>
  <autostart>true</autostart>
</distributed-scheme>
<distributed-scheme>
  <scheme-name>entity-command-partitionned</scheme-name>
  <service-name>EntityDistributedCache</service-name>
  <serializer>
  </serializer>
  <backing-map-scheme>
    <read-write-backing-map-scheme>
      <cachestore-scheme>
        <class-scheme>
          <class-name>... EntityCommandStore</class-name>
        </class-scheme>
      </cachestore-scheme>
      <internal-cache-scheme>
        <local-scheme>
          <expiry-delay>30s</expiry-delay>
        </local-scheme>
      </internal-cache-scheme>
      <write-delay>10s</write-delay>
      <write-batch-factor>0.5</write-batch-factor>
    </read-write-backing-map-scheme>
  </backing-map-scheme>
  <thread-count>10</thread-count>
  <autostart>true</autostart>
</distributed-scheme>
{code}
Please note that I had to play with <write-batch-factor> to increase the batching factor (ie the number of entries in each CacheStore.store()/storeAll() invocation). Under very high write load, <write-batch-factor> default value of 0 gave me an average of 1.2 entry per CacheStore.store()/storeAll() invocation. My first try of a 0.5 <write-batch-factor> largely increased this average to probably hundreds (my stats are done on an underlying layer, I don't have the exact average).
Cyrille
Cyrille Le Clerc
[email protected]
http://blog.xebia.fr                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • Can a db slowdown with write-behind cause a slowdown in cache operations?

    If we have a coherence cluster, and one cache configured with write-behind is having trouble writing to the db (ie, it's slow), and we keep adding objects to the cache that exceed the ability of the db to consume them; will flow-control kick in and cause the writes to the cache to block/slow-down? Ie, the classic producer-consumer problem, where we are adding objects to the cache, faster than the cachestore can consume them.
    What happens in this case? Will flow-control kick in and block writes to the cache? Will an internal buffer just keep growing? Are there any knobs to tweak this behavior (eg, in the case of spikes, where temporarily the producer is producing faster than the consumer can consume for a brief period of time, but then things go back to normal)?

    user9222505 wrote:
    I believe we discovered that the same thread pool is used for all requests to the cache, including gets, puts and calls into the cachestore. So if the writes are slow within the cachestore, then it uses up all of the threads and slows everything down.Hi,
    This is not really correct.
    If a cache in a service is configured to use write-behind then a separate thread for that service is started, which deals with write-behind store and storeAll operations.
    The remove operations need to be handled synchronously to avoid corruption of the data-set in the scenario of reading a entry from the cache immediately after removing it (if it were not synchronously deleted from the backing storage, then reading it back could give an incorrect non-null value). Therefore remove operations are handled synchronously on the service / worker thread, and not delayed on the write-behind thread.
    Gets are also synchronously handled, so they again are served on the service / worker thread.
    So if the puts are slow and wait too much, that may delay other puts but should not contend with other threads. If the puts are computation intensive, then obviously they hinder other threads because of consumption of the same CPU resource, and not simply because they execute.
    Best regards,
    Robert

  • How in Illustrator I write text with transparent background ?

    How in Illustrator I write text with transparent background ?

    that is correct. You open it in AI and you have an option to use area text, you first take the text tool and drag to make a text frame, which wors like it does in a layout program. Or you click the text tool any where on the canvas and just start typing if you want to make another line you either hit the return (enter) key or for  soft return use shift/return (enter).
    The default is a transparent background.
    All art i Illustrator is on a transparent background unless you add an object behind other objects that has a fill color.

  • Error message when finalizing...file already open with write protection

    I just created my first movie in i Movie. It's about 9 minutes long. When I tried to finalize it it worked for a couple of hours and then came up with a message "unable to prepare project for publishing because an error occurred (file already open with write protection)". What does this mean? I thought I had closed all the files I was using. There was no error number. I tried it 3 times and got the same message. Any thoughts would be greatly appreciated.

    AppleMan, I just checked that and it looks like Time Machine isn't open. I checked it by going to finder>applications>R click on time machine. It gave me the option to "open" which makes me think it's already closed. Is there somewhere else I need to be looking?
    I made another movie that was just a couple of clips and it finalized fine. On that movie, I had some MTS clips and I converted them to mp4's so iMovie could read them.
    In the one that didn't work I did clip one of the movies before I imported it into iMovie. It saved as a .mov instead of a .mp4. Would that make a difference? I checked all of the files and none of them are listed as locked, so I really don't get the "write protected" aspect of this error.

  • I'm trying to share to Media Browser a 20 minute still slide show with music and text. I have tried several times to save at 1080 HD, but just before it's finished, a message box pops up saying "File already open with write permission."  What's this mean?

    I'm trying to finalize/share to Media Browser a 20 minute still slide show with music and text. I'd like to finalize it 1080 hd and have tried several times, but just before it's finished, a message box pops up saying it can't be done because "File already open with with write permission."  What does this mean?  All files are closed; this iMovie project is the only thing open.  Does it mean one of the song files from iTunes? And should I just settle for saving it as a "large" file, which is what I'm trying right now?
    Thanks,
    Jamie

    Hi
    Error -49 opWrErr  File already open with write permission
    Trash the preference files while application is NOT Running.
    from Karsten Schlüter
    Some users notice on exporting larger projects from within iMovie that this operation is aborted with an 'error -49'
    This issue occours only on MacOs machines using 10.7x
    try switching-off the Local Mobile Backup
    in Terminal copy/paste
    sudo tmutil disablelocal
    Re-launch Mac
    See also this post
    https://discussions.apple.com/thread/4434104?tstart=0
    Yours Bengt W

  • How to show a data in Higher fonts with write statement

    Hi.
    how to show a data in Higher fonts with write statement
    I want to show a statement in large fonts with write statement.How can I do that.
    write : 'Company Address'.
    Regards
    Mave

    Mave,
      I would precribe you to use the FORMAT options available with the WRITE Statement.
    Because this allows us to differentitate between the HEADIngs and the LINEs in the report.
    Here u go dear:
      http://help.sap.com/saphelp_47x200/helpdata/en/9f/db9e7135c111d1829f0000e829fbfe/frameset.htm
    Thanks
    Kam

  • In iMovie I am getting this message...Unable to prepare project for publishing. The project could not be prepared for publishing because an error occurred.m file already open with write permission.

    In iMovie I am getting this message...Unable to prepare project for publishing.  The project could not be prepared for publishing because an error occurred. File already open with write permission. 
    How do I resolve this?

    Hi
    Most often it helps by - Turning Off the TimeMachine application - during work in iMovie.
    Yours Bengt W

  • Why am I getting this message suddenly, when I've done dozens and dozens of projects without trouble at all: The project could not be prepared for publishing because an error occurred. (OpWrErr: file already open with with write permission)

    Why am I suddenly getting this message after I've been using iMovie for a few years now and have never had any such issue before:  The project could not be prepared for publishing because an error occurred. (OpWrErr: file already open with with write permission)

    Two things
    I meant search THIS FORUM
    Error minus49 not same as ERROR 49
    Yours Bengt W

  • Unable to prepare project for publishing the project could not be prepared for publishing because an error occurred. (file already open with write permission)

    Get this message when I try to publish my iMovie project.  "unable to prepare project for publishing the project could not be prepared for publishing because an error occurred. (file already open with write permission)"

    See the discussion here:
    https://discussions.apple.com/message/16784714#16784714

  • Unable to prepare project for publishing The project could not be prepared for publishing because an error occurred. (File already open with with write permission)

    When I click on finalize project or when I tried to share on Vimeo iMovie goes through this ten hour operation and the, somethime while I'm away from the computer, I get this error message.  UNABLE TO PREPARE PROJECT FOR PUBLISHING.  The project could not be prepared for publishing because an error occurred. (File already open with with write permission).
    This has happened to me before and I can't nail down the particulars of when this happens.  I will say I've never been able to Finalize A Project (not even sure what than means) but I have been able to publish short films to YouTube.  This current film is a little over an hour and I picked the HD Format.  Could the size have something to do with it?

    See the discussion here:
    https://discussions.apple.com/message/16784714#16784714

  • I HAVE COMPLETED SEVERAL IMOVIES AND FINALIZED JUST FINE.  NOW I GET THE FOLLOWING MESSAGE FROM MY LATEST PROJECT.  "The project could not be prepared for publishing because an error occurred.  (File already open with write permission)"!  What is going on

    I HAVE COMPLETED SEVERAL IMOVIES AND FINALIZED JUST FINE.  NOW I GET THE FOLLOWING MESSAGE FROM MY LATEST PROJECT.  "The project could not be prepared for publishing because an error occurred.  (File already open with write permission)"!  What is going on?

    Hi
    Error -49 opWrErr  File already open with write permission
    Trash the preference files while application is NOT Running.
    Easiest way to find out if this is the problem is by:
    • Create a new User-Account
    • Log out of Your old one and into this
    • Re-try iMovie
    If it now works OK - then 99.9% the problem is iMovie pref. file that needs to be trashed.
    from Karsten Schlüter
    Some users notice on exporting larger projects from within iMovie that this operation is aborted with an 'error -49'
    This issue occurs only on MacOs machines using 10.7x
    try switching-off the Local Mobile Backup
    in Terminal copy/paste
    sudo tmutil disablelocal
    Re-launch Mac
    Yours Bengt W

  • After attempting to process my movie, I get the following message. "The project could not be prepared for publishing because an error occurred. (OpWrErr: file already open with with write permission). Any ideas what I'm doing wrong?

    After attempting to process my movie, I get the following message. "The project could not be prepared for publishing because an error occurred. (OpWrErr: file already open with with write permission). Any ideas what I'm doing wrong?

    Hi
    Error -49 opWrErr  File already open with write permission
    Trash the preference files while application is NOT Running.
    from Karsten Schlüter
    Some users notice on exporting larger projects from within iMovie that this operation is aborted with an 'error -49'
    This issue occours only on MacOs machines using 10.7x
    try switching-off the Local Mobile Backup
    in Terminal copy/paste
    sudo tmutil disablelocal
    Re-launch Mac
    Yours Bengt W

  • In Imovie 2011-Trying to image capture my project but it comes up after 10 hours- The project could not be prepared for publishing because an error occurred. File already open with write permission. Hopefully someone can help me.

    In Imovie 2011- Trying to image capture my project but it come up after 10 hours of rendering- The project could no be prepared for publishing because an error occured. File already open with write permission. Please Help!

    oh and ive tried publishing to almost everything. straight to idvd, to media browser, i tried both hd qualities and also the large quality. no luck with any of those

  • Why am I getting the message "project could not be prepared because an error occurred. (File already open with write permission)" when trying to share my imovie to media browser?

    Why am I getting the message "Project could not be prepared because an error occurred. (File already open with write permission.) when trying to
    share to the media browser?   I have done this many times before and never got this message.  This is very frustrating.  Can anyone help me?

    Hi
    Error -49 opWrErr  File already open with write permission
    Trash the preference files while application is NOT Running.
    Easiest way to find out if this is the problem is by:
    • Create a new User-Account
    • Log out of Your old one and into this
    • Re-try iMovie
    If it now works OK - then 99.9% the problem is iMovie pref. file that needs to be trashed.
    from Karsten Schlüter
    Some users notice on exporting larger projects from within iMovie that this operation is aborted with an 'error -49'
    This issue occurs only on MacOs machines using 10.7x
    try switching-off the Local Mobile Backup
    in Terminal copy/paste
    sudo tmutil disablelocal
    Re-launch Mac
    Yours Bengt W

  • I try to export my Imovie and I always get the error code"Unable to prepare project for publishing...File already open with write permission"  it even does it when I am just trying to export to my external hard drive to save the file

    I try to export my Imovie and I always get the error code"Unable to prepare project for publishing...File already open with write permission"  it even does it when I am just trying to export to my external hard drive to save the file

    Thanks!!! I had same error (with -49) and the mac had an external hard drive attached.. and it was doing a backup.  Stopped, disconnected and the project exported!

Maybe you are looking for

  • 1.66GHZ Mac Mini DVI to HDMI worse than VGA??

    I recently hooked up my Mac Mini to my new Samsung Series 7 55" LED TV and was disappointed to find that I can't get a better picture from my DVI to HDMI than the regular DVI to VGA what am I missing? When I plugged in the HDMI I put the display sett

  • A problem with a timer event sometimes not working

    Guys... I have this problem: I have a child added to the stage eacg 5 seconds and if this child still on the stage after another 5 seconds, you go to the next frame... My problem is that sometimes it does not work, meaning that you can have this chil

  • How to set encoding in Apex Listener

    I have a problem conversion characters when using Apex listener The problem occurs in two different configurations: 1. APEX Listener 2.0 running on GlassFish Server Open Source Edition 4.0 Oracle Database 11g Release 11.2.0.3.0 (NLS_LANGUAGE: AMERICA

  • How can I downgrade my firefox to an earlier version? (such as 2.0)

    How can I re-download firefox 2.0? I need it for a certain site. == I looked for firefox downloads, but all I got were links to 3.6....

  • Project Documentation Format

    Hi SAPians, We are a bunch of SAP trainees, and have recently completed a corporate training as a final year project. We need to prepare documentation, report and presentation for project completion and degree. we have all the screen shots, theory ex