Simple get vs entry processor for processsing 'get' requests

We're wondering about the best way to handle a simple get where we want to do some processing on the request:
1. we might want to authenticate/authorize a proxy as well as an 'implied' user sitting behind the proxy
2. we might need to look up the cache entry by modifying the key presented by the user: for example, changing capitalization
3. we might even have multiple aliases for the cache entry but only store it once to avoid data duplication-- in this case, we'd need to resolve an alias to another name entierly.
Would it be best to use an entry processor to do this (a 'GetProcessor') or is there a better way using simple 'get' in the basic api with some server-side logic to intercept the request and do the processing? If the latter, can you please explain how to do it?
And please point out any performance considerations if you can.
Thanks!
Edited by: Murali on Apr 25, 2011 2:51 PM

Hi Murali,
You would probably be better off using an Invocable and InvocationService for what you want to do. The main reason for this would be points 2 and 3 where you say you might want to modify the key or have aliases (I presume you mean aliases for keys).
If you use a get or an EntryProcessor these two requests would be routed to the storage member that owns the key of the get request or EntryProcessor invoke. If you then wanted to modify the key the get or EntryProcessor may now be on the wrong node as a different node may own the new key.
If your data access requests are all coming from client applications over Extend and not from within cluster members then you could intercept calls to the cache on the Extend Proxy and do your extra processing and key modification there. There are a couple of different ways of doing this depending on what version of Coherence you are using and whether this is restricted to a few caches or all caches. Coherence 3.6 and above make this easier as they introduce methods and configuration as part of the security API that would allow you to intercept calls an easily wrapper caches. It is still possible in 3.5 but a bit more work.
Probably the easiest way on an ExtendProxy is to create a wrapper class that can wrap the real cache and intecept the required methods. You can do this by extending WrapperNamedCache and overriding the methods you want to intercept, such as get(). Actually making Coherence use your wrapper instead of the real cache can be done a number of ways depending again on which version of Coherence you have.
Are all your data access requirements just gets or do you intend to use Filter queries? Obviously any query made againsta a cache where the Filter was targeted at the Key rather than the value would fail if the filter was using unmodified key values. You would also need to cope with getAll requests.
If you can expand a bit on where the requests for data will come from (i.e. are they all form Extend clients) and which version of Coherence you have then it would be possible to give a better answer as right now there are quite a few possibilities.
JK

Similar Messages

  • Spawning new entry processors from within an existing entry processor

    Is it possible / legal to spawn a new entry processor (to operate within a different cache) from within an existing entry processor.
    E.g we have a parent and a child cache, We will receive an update of the parent and start an entry processor to do this. Off the back of the parent update we will also need to update some child entries in another cache and need to start a new entry processor for the child entries. Is it legal to do this?

    Hi Ghanshyam,
    yes, in case of (a), you would be mixing different types in the same cache. There is nothing wrong with that from Coherence's point of view, as long as all code which is supposed to access such objects in their deserialized form is able to handle this situation.
    This means that you need to use special extractors for creating indexes, and you need to write your filters, entry processors and aggregators appropriately to take this into account. But that's all it means.
    The EntryProcessor on the child could be invoked, so long as there are more service
    threads configured. This allows retaining partition affinity. I don't think this is technically
    illegal.It is problematic, as invoking an entry-processor from another entry-processor in the same cache service can lead to deadlock/livelock situations. You won't find it out in a simple test as you get an exception or not.
    But even if it is technically not guarded against, firing a second entry-processor consumes an additional thread from the thread-pool. Now if you get to a situation when all (or at least more than half of the thread-pool size) of your entry-processors try to fire an additional entry-processor, and there are no more threads in the thread-pool, then some or all would be waiting for a thread to be available, and of course none would be available, because there are not enough single-thread entry-processors to leave to get a thread to everyone.
    However, none of them can back off as all are waiting for the fired entry-processor to complete. Poof, no processing is possible on your cache service.
    Another problematic situation which can arise if entry processors are fired from entry processors is that your entry-processors may deadlock on entries (entry processors executing on some entries and trying to execute on another entry on which another entry processor executes and also tries to execute on the first entry). In this case the entry-processors would wait on each other to execute.
    No code running in the cache server invoked by Coherence is supposed to access a cache service from code running in the threads of the same cache service, except for a couple of specifically named operations which only release resources but not consume additional new ones.
    Best regards,
    Robert

  • Updating a hierarchical data structure from an entry processor

    I have a tree-like data structure that I am attempting to update from an AbstractProcessor.
    Imagine that one value is a collection of child value keys, and I want to add a new child node in the tree. This requires updating the parent node (which contains the list of child nodes), and adding the child value which is a separate entry.
    I would rather not combine all bits of data into one value (which could make for a large serialized object), as sometimes I prefer to access (read-only) the child values directly. The child and the parent values live in the same partition in the partitioned cache, though, so get access should be local.
    However, I am attempting to call put() on the same cache to add a child value which is apparently disallowed. It makes sense that a blocking call is involved in this operation, as it needs to push out this data to the cluster member that has the backup value for the same operation, but is there a general problem with performing any kind of re-entrant work on Coherence caches from an entry processor for any value that is not the value you are processing? I get the assertion below.
    I am fine with the context blocking (preventing reads or writes on the parent node value) until the child completes, presuming that I handle deadlock prevention myself due to the order in which values are accessed.
    Is there any way to do this, either with entry processors or not? My code previously used lock, get and put to operate on the tree (which worked), but I am trying to convert this code to use entry processors to be more efficient.
    2008-12-05 16:05:34.450 (ERROR)[Coherence/Logger@9219882 3.4/405]: Assertion failed: poll() is a blocking call and cannot be called on the Service thread
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.poll(Grid.CDB:4)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.poll(Grid.CDB:11)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.put(DistributedCache.CDB:30)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.put(DistributedCache.CDB:1)
         at com.tangosol.util.ConverterCollections$ConverterCacheMap.put(ConverterCollections.java:2433)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$ViewMap.put(DistributedCache.CDB:1)
         at com.tangosol.coherence.component.util.SafeNamedCache.put(SafeNamedCache.CDB:1)
         at com.tangosol.net.cache.CachingMap.put(CachingMap.java:928)
         at com.tangosol.net.cache.CachingMap.put(CachingMap.java:887)
         at com.tangosol.net.cache.NearCache.put(NearCache.java:286)
         at com.conduit.server.properties.CLDistributedPropertiesManager$UpdatePropertiesProcessor.process(CLDistributedPropertiesManager.java:249)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$Storage.invoke(DistributedCache.CDB:20)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onInvokeRequest(DistributedCache.CDB:50)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$InvokeRequest.run(DistributedCache.CDB:1)
         at com.tangosol.coherence.component.net.message.requestMessage.DistributedCacheKeyRequest.onReceived(DistributedCacheKeyRequest.CDB:12)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onMessage(Grid.CDB:9)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:130)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onNotify(DistributedCache.CDB:3)
         at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:37)
         at java.lang.Thread.run(Thread.java:637)

    Hi,
    reentrant calls to the same Coherence service is very much recommended against.
    For more about it, please look at the following Wiki page:
    http://wiki.tangosol.com/display/COH34UG/Constraints+on+Re-entrant+Calls
    Best regards,
    Robert

  • Very strange, Entry Processor block the entire coherence node

    I have a client node(storage= false) client1 which continues do get from cache1, the code is below:
    for(int i=0;i<10000000;i++){
                System.out.println("get:"+ cache1.get(i));
    and have another client node(storage= false) client2 which invoke a Entry Processor. this Entry Processor is work on cache2(not cache1)
    cache2.invoke(keys,new MyEntryProcessor());
    the MyEntryProcessor code is as below:
    public Object process(Entry entry) {
            for(int i=0;i< 1000000;i++){
                entry.getKey();
                entry.getValue();
                System.out.println(i);
            return null;
    when client2 begin run,  client1 will be blocked, until client2's Entry Processor is finished.
    who can tell me why. it's very strange, because client1 and client2 are work on two different cache. and it's only do get

    If these two caches belong to same cache service, then their requests are handled by the same service thread.   Coherence only use single service thread per service per node.    So if the get() for cache1 and the entry processor for cache2 go to the same node, you will see that behavior if cache1 and cache2 belong to same cache service.
    Either turn on thread pool (if you want to use same cache service( or use different cache service.

  • Transactional entry processors?

    Does the new "full XA support" also makes it possible to roll back changes performed using entry processors or is it still only "put/putAll" operations that are possible to perform transactionally ?
    /Magnus

    That is very good news - we have for a long time wanted to use entry processors for "path" updates but previously not been able to use them with XA!!!!!
    /Magnus

  • We are trying to do a Quick payment from payment workbench and getting 'FRM-41830: List of values contains no entries' error for payment document column/field. Payment document setup looks good. Not sure what the issue is.

    We are trying to do a Quick payment from payment workbench and getting 'FRM-41830: List of values contains no entries' error for payment document column/field. Payment document setup looks good. Not sure what the issue is.

    Already gone through following three notes but didn't found resolution.
    APXPAWKB: FRM-41830 When Clicking on Payment Document LOV (Doc ID 1081305.1)
    R12: APXPAWKB: Payment Document Lov Is Empty When Entering A Payment (Doc ID 857587.1)
    R12: Payment Workbench Error: FRM-41830 List Of Values Contains No Entries (APXPAWKB.FMB) (Doc ID 1323875.1)

  • Where can i get a duel processor for my iPhone 4 to be upgraded to the iPhone 4s

    where can i get a duel processor for my iPhone 4 to be upgraded to the iPhone 4s

    You can’t upgrade it individually; you need to buy an iPhone 4S or better.
    (124135)

  • I have tried to change my User id which is an email address I no longer want to use. Now I am constantly getting requests from icloud and Apple ID for my password and cant get into my icloud account.

    I have tried to change my User id which is an email address I no longer want to use. Now I am constantly getting requests from icloud and Apple ID for my password and cant get into my icloud account.

    To change the iCloud ID you have to go to Settings>iCloud, tap Delete Account, provide the password for the old ID when prompted to turn off Find My iPhone, then sign back in with the ID you wish to use.  If you don't know the password for your old ID, or if it isn't accepted, go to https://appleid.apple.com, click Manage my Apple ID and sign in with your current iCloud ID.  Click edit next to the primary email account, change it back to your old email address and save the change.  Then edit the name of the account to change it back to your old email address.  You can now use your current password to turn off Find My iPhone on your device, even though it prompts you for the password for your old account ID. Then save any photo stream photos that you wish to keep to your camera roll.  When finished go to Settings>iCloud, tap Delete Account and choose Delete from My iDevice when prompted (your iCloud data will still be in iCloud).  Next, go back to https://appleid.apple.com and change your primary email address and iCloud ID name back to the way it was.  Now you can go to Settings>iCloud and sign in with your current iCloud ID and password.

  • Error while getting the ORACLE user account for your concurrent request

    Hi ,
    When I am submitting the Concurrent Program from OAF page Iam getting
    Error
    Encountered an error while getting the ORACLE user account for your concurrent request. Contact your system administrator.
    When we will face this error.
    Not able to submit the Request
    Krishna

    Krishna
    Try like this
    public int submitCPRequest(String shipmentId) {
    System.out.println("into submitCPRequest");
    try {
    OAApplicationModule am = pageContext.getApplicationModule(webBean) ;
    OADBTransaction transaction = am.getOADBTransaction();
    Connection conn = transaction.getJdbcConnection();
    ConcurrentRequest cr = new ConcurrentRequest(conn);
    cr.setDeferred();
    String applnName = new String("XXAPL"); //Application that contains the concurrent program
    System.out.println("ApplName"+ applnName);
    String cpName = new String("SHIP_REQ"); //Concurrent program name
    System.out.println("Concc Name"+ cpName);
    // String cpDesc = new String("Shipping Request"); // concurrent Program description
    // Pass the Arguments using vector
    // Here i have added my parameter headerId to the vector and passed the
    //vector to the concurrent program
    Vector cpArgs = new Vector();
    cpArgs.addElement(shipmentId);
    System.out.println("Args"+ cpArgs);
    After this it is going into exception
    // Calling the Concurrent Program
    int requestId = cr.submitRequest(applnName, cpName, null, null, false, cpArgs);
    System.out.println("Req Id"+ requestId);
    tx.commit();
    return requestId;
    catch (SetDeferredException e)
    throw new OAException("SetDeferredException " + e.getMessage(),OAException.ERROR);
    catch (RequestSubmissionException e) {
    System.out.println("Into Exception");
    OAException oe = new OAException(e.getMessage());
    oe.setApplicationModule(this);
    throw oe;
    }Thanks
    AJ

  • Multiple HTTP GET requests for individual classes

    Hello,
    I have a Java plug-in deployed under tomcat 6. JRE version is 1.6.0_16. All the required jars are deployed packed (pack.gz) and the applet tag has 'java_arguments' parameter defined as:
    <param name='java_arguments' value='-Xms256m -Xmx512m -Djnlp.packEnabled=true -Djnlp.versionEnabled=true' />
    All the jars get loaded nicely as I see in the Tomcat access log:
    127.0.0.1 - - [03/Mar/2010:17:24:04 +0000] "GET /testapplet/lib/log4j-1.2.13.jar.pack.gz?version-id=1.2.13 HTTP/1.1" 200 0
    but immediately I see a bunch of GET requests for the individual classes in the same log4j jar:
    127.0.0.1 - - [03/Mar/2010:17:24:06 +0000] "GET /testapplet/lib/org/apache/log4j/Logger.class HTTP/1.1" 404 0
    127.0.0.1 - - [03/Mar/2010:17:24:06 +0000] "GET /testapplet/lib/org/apache/log4j/Category.class HTTP/1.1" 404 0
    127.0.0.1 - - [03/Mar/2010:17:24:06 +0000] "GET /testapplet/lib/org/apache/log4j/spi/AppenderAttachable.class HTTP/1.1" 404 0
    As you can see each of these GET requests are returned a Http error code 404. While testing locally, this isn't adding any delays, but over a real deployment it's bound to be slow down the applet loading while the server is responding to each of these class requests.
    Subsequently, the application itself runs without any issues and these bogus class requests failures have no effect (thankfully) on the functionality.
    Any one seen this behavior? Appreciate any thoughts or help.
    Regards,
    Parag

    http://forums.java.net/jive/thread.jspa?threadID=75990&tstart=0

  • How does Firefox handle xml:base when generating GET requests for SVG image elements?

    I am loading an SVG image at the following URL:
    http://localhost/howl/svg/id/543
    The source for this SVG code is:
    <svg xml:base="/howl/">
    <svg width="535" height="325" xmlns="http://www.w3.org/2000/svg"
    xmlns:xlink="http://www.w3.org/1999/xlink">
    <image xlink:href="file/id/532" />
    </svg>
    </svg>
    As you can see, the SVG code is located at one path, but the <image> is relative to the root, hence the wrapping xml:base attribute.
    The actual requests in Firefox, according to Tomcat Logging are:
    GET /howl/svg/id/543
    GET /howl/file/id/532
    However, Firebug's Net tab shows these requests:
    GET /howl/svg/id/543
    GET /howl/svg/id/file/id/532 (Incorrect, doesn't happen)
    GET /howl/file/id/532
    When I test the same thing in Safari and Chrome, all three GET requests actually happen, the incorrect one resolving in a 404.
    I suspect that Firefox is generating all three requests, but discarding the incorrect one and Firebug is not aware of this. As a result, Firebug shows all three requests, but the incorrect one never resolves.
    So, I'm curious about the behavior or whether I am doing this incorrectly.
    Thanks!

    A good place to ask questions and advice about web development is at the mozillaZine Web Development/Standards Evangelism forum.<br />
    The helpers at that forum are more knowledgeable about web development issues.<br />
    You need to register at the mozillaZine forum site in order to post at that forum.<br />
    See http://forums.mozillazine.org/viewforum.php?f=25

  • Encountered an error while getting the ORACLE user account for your concurrent request. Contact your system administrator

    Dear Techies,
    We have registered an Extra Information Type as self service OAF page and did some validations using user hook which are working fine. But for some requests EIT creation page is throwing below errors.
    1. Encountered an error while getting the ORACLE user account for your concurrent request. Contact your system administrator.
    2. An unexpected situation occurred while executing routine FND_DATA_SECURITY.GET_SECURITY_PREDICATE_HELPER.The cause was: The parameter 'p_object_name' cannot be 'GLOBAL'.
    System throws these errors whenever user hook suppose to throw our customized validation messages.Since we are at UAT instance, we are bouncing apache and oacore to get rid of these errors every time they appear. But we cannot bounce once it is moved to production.
    Kindly share some ideas  to fix these errors as we are very close to Go-Live and we are facing this issue with all EIT's and SIT's.
    Thanks and Regards
    Dileep Kumar.

    Hi Mahesh,
    Thanks for reply.
    I have gone through the link that you have suggested. But our EIT user hook validations doesn't  have any code related to submission of concurrent programs. More over our error is not stable. If we bounce the apache and oacore, the system will work fine without unexpected errors for some time. We are not even able to replicate these errors.
    Thanks and Regards
    Dileep Kumar.

  • When I boot up i keep getting requests for keychain password, about 6 different things asking for it before i can get to desktop, HELP !!!!!

    When I boot up I keep getting requests for keychain password from various things ive never heard of like cloudd
    Like this basically
    Any ideas how i stop this
    Pete

    Hi Lutonpete,
    Welcome to the Apple Support Communities!
    I understand that you are receiving repeated prompts for different “Local Items” keychain passwords and know how frustrating this situation can be. There is a solution to this issue however. Please use the steps and information in the attached article to resolve this issue. 
    OS X Mavericks v10.9.1: Repeated prompts to unlock "Local Items" keychain - Apple Support
    Cheers,
    Joe

  • I am getting RPD0018 Error from IDS for few portal requests

    Hi,
    We are getting RPD0018 error from IDS for few portal requests. I thought this error was generating when the IDS max wait time sets 30 seconds for gendata to respond back. I have changed this IDS Wait time to 180 Seconds, but still i am getting the same error. I was not able to figure out the cause. Can some one help me out?
    Thanks

    Hi,
    This error is likely being thrown by GenData due to some failure in the generation, not by the max wait time. According to the documentation:
    "Category: Error: Bridge Configuration
    Gendata failure in //ROWSET[@NAME="RPD0018"]//VAR[@NAME="LOCATION"].
    Cause: Gendata failed.
    Remedy: Fix Gendata errors and try again.
    You should look at the transactions that are failing and debug the forms/sections being generated.
    -DA

  • Help for SNMP get requests

    Hi all,
    I use SCOM2012 to monitor 2 applicative servers. The agent is correctly installed because I can see the health of them but the SNMP get request doesn't work for other fonctionnlaities included in the Management Pack.I installed Wireshark on both servers
    and I can see fine the SNMP packets, but in the details, the community is empty.
    Should I configure the SNMP Service on SCOM server like on the Application servers ?
    Thanks for you help.
    Chris

    Chris,
    you'd like to SNMP get against a Windows computer?
    That is not possible:
    Windows computers running SNMP are filtered out of discovery results if:
    The device type is “Host” and the vendor is “Microsoft”
    The sysDescription field contains “Microsoft”
    The sysOid starts with .1.3.6.1.4.1.311.1.1.3.1
    The sysOid contains 1.3.6.1.4.1.199.1.1.3.11
    Please refer to the documentation:
    http://technet.microsoft.com/en-us/library/hh212935.aspx
    Cheers,
    Patrick
    Please remember to click “Mark as Answer” on the post that helped you.
    Patrick Seidl (System Center and Private Cloud)
    Website: http://www.syliance.com
    Blog: http://www.systemcenterrocks.com

Maybe you are looking for

  • Letterboxing and Aspect Ratio problem

    I'm authoring a feature film DVD. All menus and movies are 16:9 When I play the Simulator in "16:9" everything is fine. When I play the Simulator in "4:3 Letterbox" my menus are letterboxed as desired, however every movie is for some reason squished

  • Intel hd graphics, black screen on tty switch and more

    Hi, This is my first post on the arch forums, after having used this wonderful distro for half a year. I look forward to being a more active user in the future. Last week, my laptop HD crashed and i had to re-install arch on a new one. With this came

  • Icons disappear in Cover Flow when window resized...

    I created a custom folder icon for my Pixelmator projects, applied it to the folder, and all looked to be perfect. However, I later discovered that when I resized the Finder window and the icon grows larger in Coverflow, my icon disappears! This seem

  • Creating a time lapse from a video

    Is there a way in iMovie 09 to discard frames in order to create a time lapse from a video that has already been shot? I realize that the normal way to create a time lapse is to assemble a group of stills into a video. What I'm looking for is sort of

  • Excel chart - bar values appear after selecting slicers

    I have a small dashboard that displays total order dollars by week. This is generated from a SSAS cube on SQL Server. I have a couple slicers that control what is being displayed (order type and product type). The chart type is from a template. This