Best way to handle pessimistic locking after dequeueing

Dear all,
we have a simple single-consumer scenario where multiple worker
processes listen to one task queue. Every task is specific to exactly one business
object that is pessimistically locked (SELECT FOR UPDATE) as soon as
the AQ message has been fully parsed by a worker.
Obviously, this may lead to unnecessary waiting. For example, when
there are 5 successive messages belonging to the same business object,
having them dequeued by 5 worker processes in parallel will result
in 1 worker processing its task and 4 workers waiting.
To me, this seems to be a common use case. How is it "usually"
handled?
Best regards,
Michael

Hi Paul!
Thanks a lot for your answers that would completely solve
my problem if I had another setting :-) . I try to clarify
things by answering your questions (slightly reordered).
I have to apologize in advance that I take my description to the
next level of detail and hope not to deter you too much.
3. Why is this a single consumer Q when you have multiple business
areas hanging off it? It would seem an ideal candidate for having
a subscriber per business area and then subsequently a worker per subscriber.Instead of a multi-subscriber setting, we employ multiple
queues for different business areas and do some "queue routing"
in our middle-ware. We wanted the different areas to become as
detangled as possible (maybe that was unnecessary)
2. Why lock the database object before processing the message?
Cant you just rely on oracle's internal row locking mechanisms?
Do you lock the whole table? If so why? First of all, we only lock one row that designates the "coarse-grained lock".
I think you will understand this with the description below.
We have one component that orchestrates our workflows and updates the
states of our business objects. Let's assume, our basic "business object container"
was called 'stream'. Different streams are guaranteed to be independent (and hence may be
concurrently processed). So, a SELECT FOR UPDATE on a stream is enough
to pessimistically lock the whole business object.
Such a stream contains a complex graph of sub-objects. When the response
of, e.g. a 'youtube syncer' component, comes in, the state of many
objects in this graph may change (which we obviously want to do within a transaction).
E.g. when all children of a node become READY,
this node becomes READY which, in turn, may yield its
parent READY.
The problem with ordinary row-locking is now: responses for one stream tend to cluster,
i.e. sometimes there are 100 responses in the queue for one stream, and as state
updates often have large consequences for the whole state graph, blocking
(or NOWAIT exceptions) are the rule not the exception, resulting in performance that
is even worse than coarse-grained locking.
1. Why have multiple processes DQ'ing from this Q?
Is the message volume too great for one worker?Some tasks are long-running like transferring large files to remote hosts.
With workers running on different hosts and networks we have nice
load balancing.
Even the short-running jobs take often >1s CPU time and batch
jobs may generate several millions of AQ messages that we process
in a cluster.
Ok, if you reach this line, you certainly deserve my thankfulness :-)
Best regards,
Michael

Similar Messages

  • (workflow question) - What is the best way to handle audio in a large Premiere project?

    Hey all,
    This might probably be suitable for any version of Premiere, but just in case, I use CS4 (Master Collection)
    I am wrestling in my brain about the best way to handle audio in my project to cut down on the time I am working on it.
    This project I just finished was a 10 minute video for a customer shot on miniDV (HVX-200) cut down from 3 hours of tape.
    I edited my whole project down to what looked good, and then I decided I needed to clean up all the Audio using Soundbooth, So I had to go in clip by clip, using the Edit in SoundBooth --> Render and Replace method on every clip. I couldn't find a way to batch edit any audio in Soundbooth.
    For every clip, I performed similar actions---
    1) both tracks of audio were recorded with 2 different microphones (2 mono tracks), so I needed only audio from 1 track - I used SB to cut and paste the good track over the other track.
    2) amplified the audio
    3) cleaned up the background noise with the noise filter
    I am sure there has to be a better workflow option than what I just did (going clip by clip), Can someone give me some advice on how best to handle audio in a situation like this?
    Should I have just rendered out new audio for the whole tape I was using, and then edit from that?
    Should I have rendered out the audio after I edited the clips into one long track and performed the actions I needed on it? or something entirely different? It was a very slow, tedious process.
    Thanks,
    Aza

    Hi, Aza.
    Given that my background is audio and I'm just coming into the brave new world of visual bits and bytes, I would second Hunt's recommendation regarding exporting the entire video's audio as one wav file, working on it, and then reimporting. I do this as one of the last stages, when I know I have the editing done, with an ear towards consistency from beginning to end.
    One of the benefits of this approach is that you can manage all audio in the same context. For example, if you want to normalize, compress or limit your audio, doing it a clip at a time will make it difficult for you to match levels consistently or find a compression setting that works smoothly across the board. It's likely that there will instead be subtle or obvious differences between each clip you worked on.
    When all your audio is in one file you can, for instance, look at the entire wave form, see that limiting to -6 db would trim off most of the unnecessary peaks, triim it down, and then normalize it all. You may still have to do some tweaking here and there, but it gets you much farther down the road, much more easily.Same goes for reverb, EQ or other effects where you want the same feel throughout the entire video.
    Hope this helps,
    Chris

  • Best way to handle all erros and get performance(OCI)?

    Hi there,
    Im using[b] Oracle Call Interface to execute batch file process. But I have got a problem.
    I set ExecuteBatch with the same number of commit time, i.e: 100, 1000 or just 10, for thats ok.
    ((OraclePreparedStatement)globalStmt).setExecuteBatch(commit);
    And I handle executeUpdate to catch all SQL Exceptions. I made some proposital files with invalid erros but when I handle "executeUpdate" it�s doesn�t get the corrent error line, and puts out another line that is corret.
    ((OraclePreparedStatement)globalStmt).executeUpdate();
    Check in the code I concluded that its always get the same sequence of commit number like the error line. For example, I have between line 1 - 50 a line error, this line is 31, but I set the commit time for 50, its show me that line errror is 50 wherever 31. But if I put setExecuteBatch with '1' so it can handle corret lines erros, but the system performance bring down. What is the best way to handle all erros and keep the perfronace?
    Sorry for my english, I am not native. Thanks all.

    So by doing this, everything will transfer and look exactly the way I have it on the old machine?
    That is correct, if your old machine is Intel based after using MA the new machine will look just like the old machine. Here is information from Apple on MA, I'd recommend looking it over.
    My recommendation is to answer NO when setting up the new machine when it asks "Are you moving from another Mac?" The reason being let you new machine get set up and run for a couple of hours to ensure it's fine. Then launch MA and follow the prompts, it's very easy and if you use a fast connection like FW it should go smoothly.
    Regards,
    Roger

  • Best way to handle calling the EP logon page

    I would like to be able to handle the following:
    1. Start EP in anonymous/guest mode (basically unauthenticated).
    2. Present an iview that allows a user to fill in some information but when he/she clicks on a button it would first check if the user is logged on and if not -- call up the EP logon page/self registrtion page.  After logging in/self-registrating, the iview would continue processing.
    What is the best way to handle this?
    Regards,
    Mel Calucin
    Bentley Systems, Inc.

    Hi,
    You have to download the com.sap.portal.logon standar "par" and modify the jsp file to simplify the logon page (maybe only input fields for user and password).
    then upload the new .par file to the portal and update the authschems.xml file to redirect the default method to the new ".par".
    You can insert an "enter" button in the home page that launh a pop up to a dummy page with property "default" authentication scheme. Automatically the Portal shows you in the little pop up the simplyfied login page to insert login data. The dummy page need to redirect the parent page to the portallauncher component and close itself.

  • Best way to handle source files

    Hi there,
    After some pretty general advise please.
    The company I work for looks after a lot of websites, and one
    of the
    headaches we have is the best way to handle source files. By
    source files I'm
    referring to Photoshop files, Flash .fla files and also other
    none Adobe
    files that relate to a site, not the .html, .asp, .aspx,
    .css, .js etc type
    files.
    Now I'm NOT after a version control system, just a simple way
    to store the
    source files in a location that is separate from the website
    but still to be
    able to have a smooth workflow between the Dreamweaver site
    and it's source
    files.
    At the moment, and I know this is unwise, we have a
    subdirectory within the
    site where we store the source files, and use WebDAV to
    transfer both site
    and source files to and from the server. But I really want to
    separate the
    site from source but still maintain a link between site and
    source...... if
    you see what I mean. I think the upshot is I would like to be
    able to open a
    site within Dreamweaver and instantly be able to access that
    sites source
    files if needed. This method needs to be shared across a
    small team spread
    round the UK.
    I looked at the Repository Subversion version control, but
    like I said I'm
    not after a source control system, plus it appeared to
    conflict with WebDAV
    and Contribute, that some of our clients use to maintain
    content on their
    sites. I also looked at Version Cue which looked promising,
    but can't see a
    clear workflow between Dreamweaver and Version Cue which
    separates site from
    source. I might be missing something.... part of my brain
    perhaps. :)
    Would be grateful for any advice please.
    Cheers,
    @ndyB

    Take a deep breath. Relax. All is fine.
    iDVD does not look at the size of your video file, it looks at the length. iDVD can accomodate up to 2 hours of movie
    iDVD gives you different options depending on the length of your movie. Although I won't agree with your friend about reducing the length of your movie to 15 minutes, if you could trim out a few minutes to get it under an hour that setting in iDVD (Best Performance though the new version may have renamed it) gives you the best quality. Still, any iDVD setting will give you good quality even at 64 minutes
    In FCE export as Quicktime Movie NOT any flavour of Quicktime Conversion. Select chapter markers if you have them. If everything is on one system unchecked the Make Movie Self Contained button. Drop the QT file into iDVD

  • Best way to handle Christmas music - Playlist or separate Library?

    Anyone have a suggestion about the "best" way to handle Christmas music?
    After reading the article below I'm tempted to create a new library for Christmas music... that way I can keep it on an external drive or even DVD.
    http://www.allthingsmarked.com/2006/09/13/howto-manage-multiple-libraries-in-itu nes-7/

    My solution to this is to add the tag "Xmas" to the "Grouping" field of each Christmas song.
    This little tag stays tucked away out of sight until Christmastime. Then, I create a new Smart Playlist where Grouping contains "Xmas." Voila.
    The Grouping field can be useful for non-genre distinctions you want to add to your music, likesay "live" or "remix" or "cover."

  • Best way of handling large amounts of data movement

    Hi
    I like to know what is the best way to handle data in the following scenario
    1. We have to create Medical and Rx claims Tables for 36 months of data about 150 million records each - First month (month 1, 2, 3, 4, .......34, 35, 36)
    2. We have to add the DELTA of month two to the 36 month baseline. But the application requirement is ONLY 36 months, even though the current size is 37 months.
    3 Similarly in the 3rd month we will have 38 months, 4th month will have 39 months.
    4. At the end of 4th month - how can I delete the First three months of data from Claim files without affecting the performance which is a 24X7 Online system.
    5. Is there a way to create Partitions of 3 months each and that can be deleted - Delete Partition number 1, If this is possible, then what kind of maintenance activity needs to be done after deleting partition.
    6. Is there any better way of doing the above scenario. What other options do I have.
    7 My goal is to eliminate the initial months data from system as the requirement is ONLY 36 months data.
    Thanks in advance for your suggestion
    sekhar

    Hi,
    You should use table partitioning to keep your data on monthly partitions. Serach on table partitioning for detailed examples.
    Regards

  • Best way to handle text files in OD10g

    We have a requirement to store reports in text format into a database field, to be able to view the reports, and to print them if desired using Forms 10g. What is the best way to handle this?
    - define the field in the database as clob or blob?
    - if CLOB is the choice, what tools to use to upload CLOBs to the database (since webutil transfer is for blob only)?
    - in Forms 10g, can one use the Forms data type LONG for CLOB?
    - can you do Forms search on clob and blob fields?
    - how can reports that are stored in fields be viewed without first downloading to the client workstation?
    - in Forms 10g, what is the best way to view text files residing in local PCs: "host notepad myFile"?
    Thanks much for your reply!
    gk

    Take a deep breath. Relax. All is fine.
    iDVD does not look at the size of your video file, it looks at the length. iDVD can accomodate up to 2 hours of movie
    iDVD gives you different options depending on the length of your movie. Although I won't agree with your friend about reducing the length of your movie to 15 minutes, if you could trim out a few minutes to get it under an hour that setting in iDVD (Best Performance though the new version may have renamed it) gives you the best quality. Still, any iDVD setting will give you good quality even at 64 minutes
    In FCE export as Quicktime Movie NOT any flavour of Quicktime Conversion. Select chapter markers if you have them. If everything is on one system unchecked the Make Movie Self Contained button. Drop the QT file into iDVD

  • Best way to handle multiple currencies

    I have a requirement that users should be able to report against an OLAP cube in a currency of their choice (from a list of about 20) and was wondering what the best way to handle this might be.
    One option would be to have a currency dimension containing the list of valid currencies and then to pre-calculate measures in each of the currencies and store them in the cube. However the downside of this is that the resultant cube would be 20 times larger than a cube in a single currency, take longer to maintain etc. I could of course partition the cube by currency to improve reporting performance since users would only report in one currency at a time.
    Another alternative would be to dynamically calculate the measures based on exchange rates - I guess this could either be done in the cube itself or as part of the reporting code. However since exchange rates are daily, this would obvioulsy prevent me from aggregating data up the time dimension (all measures are at the day level).
    Is there any standard way of doing this and what are the pro's and con's?
    Thanks,
    Chris

    Sorry - messed up - I should have posted this in the OLAP forum.....

  • Best way to handle when Production XI is in outrage/down

    Hi All,
    My production box is running smoothly now.If we want to go for any outrage and still we will be receiving many messages through internet from many partners.
    So we are expecting how to receive the messages when production XI is in outrage. My client is thinking of putting one more instance with the replica of Production box. So that when the main production is in outrage then immediately they can switch back to this replica version and they can process the messages untill the main one get ready.
    Now I am very much concern what are the implication will be if we go like this.
    1. which is the best way to handle XI box to maintain when the system is outrage/down?
    2. Is it a good idea of creating replica of production instance and maintaing this when the main one is in outrage?
    Kindly suggest what you guys are doing for your implementations.
    Thanks
    Seema

    >
    > 1. which is the best way to handle XI box to maintain when the system is outrage/down?(An act of extreme violence or viciousness)
    >
    XI Box - Outrage -Should be a robotic XI Box. Now I know that you are thinking what to do when cops come and handcuff it. -- Just kidding..
    Ok, here's the logic, you want to replace a piece of water pipe that gets water to your faucet. What do you do without the water leaking or disrupting the water supply... you either turn off the valve or add a temp pipe to keep the water flowing..
    So check into your sys landscape for Fail safe or High Availability, may be one of those can save you money and time.
    AB

  • Best way to handle medical collections?

    Hello all, My husband and I are new to the "rebuilding your credit" world.  We're coming back from a foreclosure and actively trying to rebuild.  I have 4 active collections for 3 creditors listed on my EQ/TU report - totally $399.  I can pay them in full right now but I don't want to call the creditors to pay them if its not going to be removed from my reports properly.  Some of these are old - 2011. I also have 3 collections "removed" from my TU/EQ report since March - will paying these affect what is listed on my reports?
    What is the best way to handle these accounts to ensure they are removed from my reports completely?    

    Contact each creditor and politely request a Pay for Deletion - agreement they will delete from your reports in exchange for full payment. Get this in writing. If that doesn't work (try a few times), pay it, then try the goodwill route -- write letters requesting early deletion of the entries from your reports. Even though negative items will fall off your report in 7 years (so the 2011 collection will fall off in 2018), you will still have to report that you have unpaid debt on future mortgage applications, etc. And on a manual review, paid collections look better than unpaid ones. I would not advise not paying them at all. 

  • Best way to handle large files in FCE HD and iDVD.

    Hi everyone,
    I have just finished working on a holiday movie that my octagenarian parents took. They presented me with about 100 minutes of raw footage that I have managed to edit down to 64 minutes. They have viewed the final version that I recorded back to tape for them. They now want to know if I can put it onto a DVD for them as well. Problem is the FCE HD file is 13Gb.
    So here is my question.
    What is the best way to handle this problem?
    I have spoken to a friend of mine who is a professional editor. She said reduce the movie duration down to about 15mins because it's probably too long and boring. (rather hurtful really) Anyway that is out of the question as far as my oldies are concerned.
    I have seen info on Toast 8 that mentions a "Fit to DVD" process that purports to "squash" 9Gb of movie to a 4.7Gb disk. I can't find if it will also put 13Gb onto a dual layer 8.5Gb disk.
    Do I have to split the movie into two parts and make two dual layer DVD's? If so I have to ask - How come "Titanic", 3hrs+ fits on one disk??
    Have I asked too many questions?

    Take a deep breath. Relax. All is fine.
    iDVD does not look at the size of your video file, it looks at the length. iDVD can accomodate up to 2 hours of movie
    iDVD gives you different options depending on the length of your movie. Although I won't agree with your friend about reducing the length of your movie to 15 minutes, if you could trim out a few minutes to get it under an hour that setting in iDVD (Best Performance though the new version may have renamed it) gives you the best quality. Still, any iDVD setting will give you good quality even at 64 minutes
    In FCE export as Quicktime Movie NOT any flavour of Quicktime Conversion. Select chapter markers if you have them. If everything is on one system unchecked the Make Movie Self Contained button. Drop the QT file into iDVD

  • Best way to handle time taking MIS queries!

    Dear all,
    Recently we have developed some MIS reports that execute large queries and process lot of data. These queries almost held the database and user's experience very slow speed.
    What is the best way to handle these heavy duty queries?
    Like having another server for MIS and then what is the best way to synchronize data on daily basis?
    OR
    Creating procedures that execute at night and populate MIS tables and reports using this formulated data?
    Any other better solution please?
    Thanks, Imran

    misterimran wrote:
    Dear all,
    Recently we have developed some MIS reports that execute large queries and process lot of data. These queries almost held the database and user's experience very slow speed.
    What is the best way to handle these heavy duty queries?
    Like having another server for MIS and then what is the best way to synchronize data on daily basis?Based on your requirement, Streams.
    Creating procedures that execute at night and populate MIS tables and reports using this formulated data?I would not recommend this for the maintenance part involved; and also, this is re-inventing the wheel.

  • Best Way to Handle Dynamic Initialization of x number of Objects?

    I want to be able to take a x value(integer) that I get from another part of my program and initialize x number of Objects. Best way to handle that?

    myObject[] myObjArray = new myObject[x];
    for (int i=0; i<x; i++) myObjArray[i] = new myObject("obj#"+i);

  • Best way to handle session timeout

    Hello All,
    oracle 11g, Apex ver 3.1.2
    I am bit confused about the sessoin handling mecahnism for the users .
    Which is the best way to handle session for the users is it programatically or by DBA admin level.
    What are the pros and cons going DBA Level and Programmatica level.
    Before hand I got to have some information on hand for justification.
    thanks/kumar

    Hi,
    I've done a great deal of work with mobile accounts in Snow Leopard and I'm now having a "play" with Lion. To be honest you have to sit down and think about why you need mobile accounts.
    If your user only uses one computer then your safer having a local account backed up by a network Time Machine, this avoids the many many woes that the Servers FileSyncAgent brings to the table.
    If your users are going to be accessing multiple computers on the network and leaving the network then a mobile account is good for providing a uniform user experience and access to files etc. However, your users will have to make a choice as to whether they want their iPhoto libraries on one Local machine (backed up by Time Machine) or whether they want their library to be hosted on the server and not part of the Mobile Home Sync schedule (adding ~/Pictures to the excluded items on the home sync settings).
    With the latter, users will be able to access their iPhoto libraries on any computer when they are within the network (as it's accessed from the users server home folder).
    With the first option the user would have their iPhoto library on one computer (say the laptop they used the most) but then would not be able to access it from other computers they log on to.
    iPhoto libraries are a pain, and I'm working hard to come up with a workaround. If your users moved over to using Apeture then you could include the aperture library as part of the home sync thanks to Deeport (http://deepport.net/archives/os-x-portable-home-directories-and-syncing-flaw-wit h-bundles/)
    He does suggest that the same would work with IPhoto libraries - but it doesn't for a number of mysterious reasons regarding how the OS recognizes thie iPhoto bundle (it does so differently compared to Apeture).
    Hope this helps...

Maybe you are looking for

  • Custom Authentication Using Groups

    I'm using Oracle Apex 4.1 on a hosted environment provided by a hosting company. I have access to two workspaces and two schemas. I'm building a database application that is similar to a ticketing system for an IT department. I want to be able to bui

  • Apple tv slow data rate

    HI Guys, i have a problem with one of my Apple TV. I currently have 2 Apple TV and one is having a slow data rate. I have Apple AirPort Time Capsule 2TB (latest gen) with most devices running on wireless connection and I checked the data rate (from t

  • Can't synchronise mails of iphone and macbook pro

    I receive my mails on my iphone and Macbook pro. If I download the mails on my iphone first and I open them, they will not be downloaded on my macbook pro. If I download them on my iphone but I don't open them they will downloaded on my ibook pro. Wh

  • Generic instance maker and class definition in separate files - problem

    file: genericinstantiator.java package testGenericInstantiator; public final class GenericInstantiator {      public <T> T makeInstance(Class<T> c) {           T instance = null;           try {                instance = c.newInstance();           }

  • Sub query results use in main query.

    I need to query a specific parameter in one table called parameter_id which will return a list of location id's.  Utilizing those i then need to query another table for the max(date_time) values in another table. Select LOCATION_ID FROM TABLE1 WHERE