Building a better near cache

I'm currently putting some code together to use for frequently updated data. The data set is large enough to warrant a distributed cache, and it will be read frequently by other cluster members than the key owner. To add to this, when the data changes it will trigger some business logic on the cluster members that had previously read the data.
In effect, it is a distributed cache in which clients can subscribe to particular keys to be notified when the underlying data changes.
The data is volatile and has very high update frequency so there's no point in backing it up on a second node, so I've configured a distributed-cache with 0 backups.
I've implemented a working prototype by wrapping a near cache and front-map listener. The wrapper maintains a set of current subscribers for each key, and each time a key is invalidated as per the near-schemes invalidation strategy the value is re-requested if the subscriber set is non empty. This works fine, but I'd like to get rid of the extra invalidate and get packages and instead get the updated value sent directly instead of the invalidation.
So here's a couple of questions:
1) Is it possible to get this behaviour from a near cache out of the box (docs are slightly vague, and I haven't been able to get it to work by trial and error)
2) If I were to stop using a near-cache and register a map listener for the keys directly on the distributed cache:
a) is the key match evaluated on the object form or the binary representation of the cached key - I'm concerned about the cpu overhead when deserialising the keys?
b) if there's more than one listener for the specified key, will the update package be sent using unicast or multicast?

Hi Henric,
I gave some thinking on this since yesterday.
It might be worth investigating to see if you could override the listener handling and registration methods which near cache uses so that you could use whatever notifications are sent anyway.
1. : I can't answer this at the moment.
2. a: I believe the key match is done on the binary key. I don't see any reason why not to use the binary key.
2. b: I think it depends on how many listeners. Look at the documentation of the multicast-threshold-percent setting within the multicast-listener configuration.
Best regards,
Robert

Similar Messages

  • Update to near cache value is not reflected in the other near cache

    Hi,
    I have a cluster of two weblogic servers running within them tangosol cache. I also have two seperate tangosol servers running on the same two servers.
    When I make an update on the tangosol cache on one of the weblogic application, unfortunately the update is not picked up by the other weblogic application tangosol cache.
    What do I need to do so that all updates are available in all the tangosol cache?
    example below:
    initial:
    server1: weblogic tangosol near cache, key = "One", Value = null
    server2: weblogic tangosol near cache, key = "One", Value = null
    update on server1;
    server1: weblogic tangosol near cache, key = "One", Value = "New York"
    server2: weblogic tangosol near cache, key = "One", Value = null <- still null (?)
    Why is the value on server2 not updated also?
    Thanks.
    The tangosol configuration is a near distributed cache. The xml is below. Thanks.
    <?xml version="1.0"?>
    <!DOCTYPE cache-config SYSTEM "cache-config.dtd">
    <cache-config>
    <caching-scheme-mapping>
    <!--
    Caches with any name will be created as default replicated.
    -->
    <cache-mapping>
    <cache-name>*</cache-name>
    <scheme-name>default-near</scheme-name>
    </cache-mapping>
    </caching-scheme-mapping>
    <caching-schemes>
    <!--
    Default simple Near caching scheme with default eviction local cache
    in the front-tier and a non-expiring distributed cache in the back-tier.
    -->
    <near-scheme>
    <scheme-name>default-near</scheme-name>
    <front-scheme>
    <local-scheme>
    <scheme-ref>default-eviction</scheme-ref>
    </local-scheme>
    </front-scheme>
    <back-scheme>
    <distributed-scheme>
    <scheme-ref>default-distributed</scheme-ref>
    </distributed-scheme>
    </back-scheme>
    <!--
    invalidation auto = all changes in back caches gets notified
    present = subscribes to only changes thats held in near cache
    -->
    <invalidation-strategy>auto</invalidation-strategy>
    <!-- the cache server starts does not start all the schemes -->
    <autostart>false</autostart>
    </near-scheme>
    <!--
    Default Distributed caching scheme.
    -->
    <distributed-scheme>
    <scheme-name>default-distributed</scheme-name>
    <service-name>DistributedCache</service-name>
    <backing-map-scheme>
    <class-scheme>
    <scheme-ref>default-backing-map</scheme-ref>
    </class-scheme>
    </backing-map-scheme>
    <autostart>true</autostart>
    </distributed-scheme>
    <!--
    Default backing map scheme definition used by all the caches that do
    not require any eviction policies
    -->
    <class-scheme>
    <scheme-name>default-backing-map</scheme-name>
    <class-name>com.tangosol.util.SafeHashMap</class-name>
    <init-params></init-params>
    </class-scheme>
    <!--
    Default eviction policy scheme.
    -->
    <local-scheme>
    <scheme-name>default-eviction</scheme-name>
    <eviction-policy>HYBRID</eviction-policy>
    <high-units>100000</high-units>
    <low-units>0</low-units>
    <expiry-delay>0</expiry-delay>
    <flush-delay>0</flush-delay>
    <cachestore-scheme></cachestore-scheme>
    </local-scheme>
    </caching-schemes>
    </cache-config>

    We can certainly set up a call to discuss what you are seeing. Please email [email protected] with your phone number and other information to set up the call.
    The more information that you can provide in advance (on the forum or by email), the better. For example, send your configuration settings (cache configuration, cluster configuration) files.
    Peace.

  • Can off JVM heap Memory used in the Near-Cache front-tier

    I had tried to config a near-Cache used nio-manager(off JVM heap) in the Front-tier.
    <near-scheme>
          <scheme-name>CohApp-near</scheme-name>
          <front-scheme>
            <external-scheme>
            </external-scheme>
          </front-scheme>
          <back-scheme>
            <distributed-scheme>
              <scheme-ref>CohApp-distributed</scheme-ref>
            </distributed-scheme>
          </back-scheme>
          <invalidation-strategy>auto</invalidation-strategy>
          <autostart>true</autostart>
        </near-scheme>
    when start 'com.tangosol.net.DefaultCacheServer' for this config, error as:
    Oracle Coherence Version 3.7.1.0 Build 27797
    Enterprise Edition: Development mode
    Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
    2014-03-30 16:34:17.518/1.201 Oracle Coherence EE 3.7.1.0 <Error> (thread=main,
    member=n/a): Error org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invali
    d content was found starting with element 'external-scheme'. One of '{"http://xm
    lns.oracle.com/coherence/coherence-cache-config":local-scheme, "http://xmlns.ora
    cle.com/coherence/coherence-cache-config":class-scheme}' is expected. - line 92
    Exception in thread "main" (Wrapped: Failed to load the factory) (Wrapped: Missi
    ng or inaccessible constructor "com.tangosol.net.DefaultConfigurableCacheFactory
    (String)"
    <configurable-cache-factory-config>
      <class-name>com.tangosol.net.DefaultConfigurableCacheFactory</class-name>
      <init-params>
        <init-param>
          <param-type>java.lang.String</param-type>
          <param-value>coherence-cache-config.xml</param-value>
        </init-param>
      </init-params>
    </configurable-cache-factory-config>) java.lang.reflect.InvocationTargetExceptio
    n
            at com.tangosol.util.Base.ensureRuntimeException(Base.java:288)
            at com.tangosol.net.ScopedCacheFactoryBuilder.getDefaultFactory(ScopedCa
    cheFactoryBuilder.java:311)
            at com.tangosol.net.DefaultCacheFactoryBuilder.getSingletonFactory(Defau
    ltCacheFactoryBuilder.java:48)
            at com.tangosol.net.DefaultCacheFactoryBuilder.getFactory(DefaultCacheFa
    ctoryBuilder.java:121)
            at com.tangosol.net.ScopedCacheFactoryBuilder.getConfigurableCacheFactor
    y(ScopedCacheFactoryBuilder.java:112)
            at com.tangosol.net.CacheFactory.getConfigurableCacheFactory(CacheFactor
    y.java:126)
            at com.tangosol.net.DefaultCacheServer.getDefaultConfigurableCacheFactor
    y(DefaultCacheServer.java:364)
            at com.tangosol.net.DefaultCacheServer.main(DefaultCacheServer.java:197)
    Caused by: (Wrapped: Missing or inaccessible constructor "com.tangosol.net.Defau
    ltConfigurableCacheFactory(String)"
    <configurable-cache-factory-config>
      <class-name>com.tangosol.net.DefaultConfigurableCacheFactory</class-name>
      <init-params>
        <init-param>
          <param-type>java.lang.String</param-type>
          <param-value>coherence-cache-config.xml</param-value>
        </init-param>
      </init-params>
    </configurable-cache-factory-config>) java.lang.reflect.InvocationTargetExceptio
    n
            at com.tangosol.util.Base.ensureRuntimeException(Base.java:288)
            at com.tangosol.run.xml.XmlHelper.createInstance(XmlHelper.java:2652)
            at com.tangosol.run.xml.XmlHelper.createInstance(XmlHelper.java:2536)
            at com.tangosol.net.ScopedCacheFactoryBuilder.getDefaultFactory(ScopedCa
    cheFactoryBuilder.java:273)
            ... 6 more
    Caused by: java.lang.reflect.InvocationTargetException
            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
    orAccessorImpl.java:39)
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
    onstructorAccessorImpl.java:27)
            at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
            at com.tangosol.util.ClassHelper.newInstance(ClassHelper.java:694)
            at com.tangosol.run.xml.XmlHelper.createInstance(XmlHelper.java:2611)
            ... 8 more
    Caused by: (Wrapped: Failed to load cache configuration: coherence-cache-config.
    xml) (Wrapped) java.io.IOException: Exception occurred during schema validation:
    cvc-complex-type.2.4.a: Invalid content was found starting with element 'externa
    l-scheme'. One of '{"http://xmlns.oracle.com/coherence/coherence-cache-config":l
    ocal-scheme, "http://xmlns.oracle.com/coherence/coherence-cache-config":class-sc
    heme}' is expected.
            at com.tangosol.util.Base.ensureRuntimeException(Base.java:288)
            at com.tangosol.run.xml.XmlHelper.loadResourceInternal(XmlHelper.java:34
    1)
            at com.tangosol.run.xml.XmlHelper.loadFileOrResource(XmlHelper.java:283)
            at com.tangosol.net.DefaultConfigurableCacheFactory.loadConfig(DefaultCo
    nfigurableCacheFactory.java:439)
            at com.tangosol.net.DefaultConfigurableCacheFactory.loadConfig(DefaultCo
    nfigurableCacheFactory.java:425)
            at com.tangosol.net.DefaultConfigurableCacheFactory.<init>(DefaultConfig
    urableCacheFactory.java:155)
            ... 14 more
    Caused by: (Wrapped) java.io.IOException: Exception occurred during schema valid
    ation:
    cvc-complex-type.2.4.a: Invalid content was found starting with element 'externa
    l-scheme'. One of '{"http://xmlns.oracle.com/coherence/coherence-cache-config":l
    ocal-scheme, "http://xmlns.oracle.com/coherence/coherence-cache-config":class-sc
    heme}' is expected.
            at com.tangosol.run.xml.XmlHelper.loadXml(XmlHelper.java:122)
            at com.tangosol.run.xml.XmlHelper.loadXml(XmlHelper.java:157)
            at com.tangosol.run.xml.XmlHelper.loadResourceInternal(XmlHelper.java:32
    2)
            ... 18 more
    Caused by: java.io.IOException: Exception occurred during schema validation:
    cvc-complex-type.2.4.a: Invalid content was found starting with element 'externa
    l-scheme'. One of '{"http://xmlns.oracle.com/coherence/coherence-cache-config":l
    ocal-scheme, "http://xmlns.oracle.com/coherence/coherence-cache-config":class-sc
    heme}' is expected.
            at com.tangosol.run.xml.SimpleParser.parseXml(SimpleParser.java:212)
            at com.tangosol.run.xml.SimpleParser.parseXml(SimpleParser.java:93)
            at com.tangosol.run.xml.SimpleParser.parseXml(SimpleParser.java:162)
            at com.tangosol.run.xml.SimpleParser.parseXml(SimpleParser.java:115)
            at com.tangosol.run.xml.XmlHelper.loadXml(XmlHelper.java:118)
            ... 20 more
    Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid conten
    t was found starting with element 'external-scheme'. One of '{"http://xmlns.orac
    le.com/coherence/coherence-cache-config":local-scheme, "http://xmlns.oracle.com/
    coherence/coherence-cache-config":class-scheme}' is expected.
            at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAX
    ParseException(ErrorHandlerWrapper.java:195)
            at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Err
    orHandlerWrapper.java:131)
            at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(
    XMLErrorReporter.java:384)
            at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(
    XMLErrorReporter.java:318)
            at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErro
    rReporter.reportError(XMLSchemaValidator.java:417)
            at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportS
    chemaError(XMLSchemaValidator.java:3182)
            at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleS
    tartElement(XMLSchemaValidator.java:1806)
            at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startEl
    ement(XMLSchemaValidator.java:705)
            at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scan
    StartElement(XMLNSDocumentScannerImpl.java:400)
            at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
    l$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2756)
            at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(X
    MLDocumentScannerImpl.java:648)
            at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next
    (XMLNSDocumentScannerImpl.java:140)
            at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
    l.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
            at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(X
    ML11Configuration.java:808)
            at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(X
    ML11Configuration.java:737)
            at com.sun.org.apache.xerces.internal.jaxp.validation.StreamValidatorHel
    per.validate(StreamValidatorHelper.java:144)
            at com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl.vali
    date(ValidatorImpl.java:111)
            at javax.xml.validation.Validator.validate(Validator.java:127)
            at com.tangosol.run.xml.SaxParser.validateXsd(SaxParser.java:236)
            at com.tangosol.run.xml.SimpleParser.parseXml(SimpleParser.java:206)
    So I think that if can off JVM heap Memory used in the Near-Cache front-tier?
    Or can help how to config the  off JVM heap Memory used in the Near-Cache front-tier.
    Thanks.

    Only local-scheme and class-scheme can be used in the front-scheme of a near cache. 

  • Updating Near Cache

    We currently have a Near-cache with a Partitioned-Cache on the Cluster.
    This contains about 60K objects which are quite large (they take about 60ms to load).
    We load the objects into the Near Cache using get(key) - the key is a Long
    Periodically the objects are changed on the cache, this causes them to expire and be removed from the Front NearCache.
    We do not want the 60ms delay when the multi-threaded application next comes to touch that object.
    In essense, we need a near cache that pro-actively maintains its working set in an up-to-date state, instead of the current "refresh on-demand" approach.
    We are very latency-sensitive and need to minimise the number of blocking network trips.
    - We want all the benefits of a NearCache (we use HighUnits/Expiry/Invalidation etc.)
    NOTE : It is not possible to use a Continuous Query Cache since the keys do not confirm to a Filter and are loaded on an ad-hoc basis by Key.
    There are two possible implementation options available:
    Plan A. When it receives an update event from the backing cache, instead of immediately removing the key from the front map, it should re-request the new value from the backing cache and update the front map with that new value. Insertions and deletions proceed as usual. This ensures an uninterrupted access from the client's perspective.
    Plan B. They may argue that this can leave the cache in an incoherent state while we are waiting for the new value (especially if it's done asynchronously). In this case, we can proceed with deleting the key from the front map, in anticipation that it will be reinserted when we receive a new value. This may impact the client with a delay while we are waiting for the new value. However, the likelyhood of such cache miss is rather small, unless the client requests the same keys repeatedly and very frequently. We may put up with occasional delays, but with the current implementation we incur a guaranteed delay.
    (We could use a Listener on the FrontMap and use a JavaThreadPoolExecutor which would reload the object by key).
    Perhaps we'd like a beforeUpdate event on the FrontMap, so the value does not disappear until we have had time to update it (the old object is good enough until we get the new value and better than a 60ms delay)
    Edited by: andrew.wilson on Aug 4, 2009 8:11 AM

    Hi Andrew,
    I just wanted to share the results of our offline conversation for the benefit of any others tracking this thread.
    Jon Purdy
    Oracle
    "My primary goal here is to avoid creating something that creates as many issues (from complexity) as it solves.
    I _think_ the best approach is probably to leave the near cache as it currently is, and wrap another "cache" around it (for read-only get-only access to potentially stale data). Your application code will need to decide which cache to access, but I think this is a good thing as you should be explicitly acknowledging the differing concurrency models (e.g. between a coherent cache and one that intentionally reduces coherency to increase data availability). I believe it would be best for this "cache" to actually expose a traditional DAO-ish interface (e.g. something like PotentiallyStaleCustomersDAO.findByPrimaryKey(long key)) rather than the more generic NamedCache interface; in part because implementing more than a couple methods of the NamedCache interface will get very tricky due to the unique semantics involved here.
    Your DAO implementation will need to maintain a small, thread-safe Map internally. This Map will contain stale values (exclusively) during the window between when an invalidation removes an item from the near cache, and when the prefetch places a new value in it. Your DOA will do a look-aside in that Map, and if it finds a value will return that; otherwise, it will route the request to the near cache.
    You'll need to create a custom listener and register it on the near cache (not sure if you'll want it on the near cache itself or just the internal front map).
    - On near cache "invalidate", push the "old" value into the DAO cache (this will be "by reference"), and asynchronously dispatch the prefetch task
    - On any other near cache deletion, remove the value from the DAO cache (just makes sure that the DAO isn't caching data that the near cache isn't)
    Use the same "Prefetch" task that "Plan B" called for, but extend it to remove the item from the DAO cache as soon as the call to "get" from the near cache completes. This will result in a benign race condition if another thread requests the same key, but you are assured that every "invalidation" will be matched by a corresponding "prefetch", which will keep the DAO cache clean (you can also make that DAO cache a size-limited local cache if you want, but as the size of it will be indirectly limited by the size of the near cache, it shouldn't be necessary).
    If you really want the NamedCache interface, you could configure a local cache and specify a CacheLoader for it; you would then wrap that CacheLoader around the finder method above, and specify an infinitesimal size/delay (e.g. 1 cache entry and 1ms expiry) on the cache. However, I would avoid doing this as you're widening your API and obfuscating the odd concurrency semantics of the data access. And most of the NamedCache methods would be useless to you."

  • Flex Builder 3 Beta 3 Debugging not working with latest Flash Player Debug

    First to emphasize that never had such issues with Flex
    Builder 2 Beta 2 and Flash Player 9.0.47 Debug version.
    I downloaded Flex Builder 3 Beta 3 and installed it. Then
    trying to debug any Flex app (old or newly created) does not work.
    I don’t get any errors, but after some research I saw
    it’s nagging up on trying to connect to the Flash Player
    debug version.
    1. Uninstalled old versions of Flash Player (FP).
    2. Downloaded latest debug version of FP 9 (9.0.115) and
    installed it both for IE and Opera (Netscape-compatible).
    3. Installed Flex Builder 3 Beta 3.
    4. Created a simple Flex app.
    5. Ran it in debug mode.
    6. Showed a small window with title “Progress
    Information” and a progress + text: Waiting for Flash Player
    to connect to debugger…
    7. Two minutes later I got the error: “Failed to
    connect; session timed out. Ensure that: 1. You compiled your Flash
    application with debugging on. 2. You are running the debugger
    version of Flash Player.”
    Any idea what is wrong? I tried to download an older debug
    version but then FB 3 Beta 3 raises the error it’s expecting
    version 9.0.115. I searched to download FB3 Beta 2 (because I
    deleted it after downloading Beta 3) but unfortunately Adobe did
    their best to wipe it out from their links.
    Any help is welcome.
    System Specs:
    Windows Vista Ultimate
    Flex Builder 3 Beta 3 Standalone
    JRE 1.6 Update 3
    -Dimitar

    Hi Dimitar,
    Did you close all the browsers (and applications which use
    Flash Player) when you install Flex Builder 3 Beta 3 or Flash
    Player? You can try manually installing it from <FB install
    location>/player/ directory. Here're some
    installation/unintallation instructions of Flash Player:
    http://labs.adobe.com/wiki/index.php/Flex_3:Release_Notes#Installing_Flex_SDK_3_Beta_3
    thanks,
    Sharon

  • Flex Builder 3 Beta 2 Expires early when using Flex 2 key, and new SDK

    I was told to use my Flex 2 key to extend the Beta period for
    Flex Builder 3, this worked, today it said I have 99 days left.
    but When I installed the latest SDK and restarted Flex
    Builder 3 Beta 2, it says it expires in 15 days.
    If I put the original SDK back and restart it goes back to 99
    days, so If I switch the SDKs while Eclipse is already loaded it
    seems to stay at 99 days, so now before I start Eclipse I have to
    move the orig SDK back, start Eclipse, then switch SDKs.
    This does not make much sense to me, why does the SDK affect
    the Builder Beta Period at all? is there a fix for this, I have a
    project due but 31st, and I would be screwed if it dies before
    then, I already have flex 2 but I cannot roll back as this project
    relies on Flex Builder 3 Functionality.

    I the probelm we are stating is that we DID enter our flex 2
    key and it DID initially set the expire date out, but I needed to
    use a later SDK and thats when the problem occured. without the
    latest the ImageSnapshot.captureImage does not work at all for me,
    so must use a later SDK. However this morning my Eclipse started
    stating 96 days remaining and I am still using the latest SDK, so
    no idea why it works sometimes and not others.

  • Read-Through Caching with expiry-delay and near cache (front scheme)

    We are experiencing a problem with our custom CacheLoader and near cache together with expiry-delay on the backing map scheme.
    I was under the assumption that it was possible to have an expiry-delay configured on the backing-scheme and that the near cache object was evicted when backing object was evicted. But according to our tests we have to put an expiry-delay on the front scheme too.
    Is my assumption correct that there will not be automatic eviction on the near cache (front scheme)?
    With this config, near cache is never cleared:
                 <near-scheme>
                      <scheme-name>config-part</scheme-name>
                      <front-scheme>
                            <local-scheme />
                      </front-scheme>
                      <back-scheme>
                            <distributed-scheme>
                                  <scheme-ref>config-part-distributed</scheme-ref>
                            </distributed-scheme>
                      </back-scheme>
                <autostart>true</autostart>
                </near-scheme>
                <distributed-scheme>
                      <scheme-name>config-part-distributed</scheme-name>
                      <service-name>partDistributedCacheService</service-name>
                      <thread-count>10</thread-count>
                      <backing-map-scheme>
                            <read-write-backing-map-scheme>
                                  <read-only>true</read-only>
                                  <scheme-name>partStatusScheme</scheme-name>
                                  <internal-cache-scheme>
                                        <local-scheme>
                                              <scheme-name>part-eviction</scheme-name>
                                              <expiry-delay>30s</expiry-delay>
                                        </local-scheme>
                                  </internal-cache-scheme>
                                  <cachestore-scheme>
                                        <class-scheme>
                                              <class-name>net.jakeri.test.PingCacheLoader</class-name>
                                        </class-scheme>
                                  </cachestore-scheme>
                                  <refresh-ahead-factor>0.5</refresh-ahead-factor>
                            </read-write-backing-map-scheme>
                      </backing-map-scheme>
                      <autostart>true</autostart>
                      <local-storage system-property="tangosol.coherence.config.distributed.localstorage">true</local-storage>
                </distributed-scheme>With this config (added expiry-delay on front-scheme), near cache gets cleared.
            <near-scheme>
                      <scheme-name>config-part</scheme-name>
                      <front-scheme>
                            <local-scheme>
                                 <expiry-delay>15s</expiry-delay>
                            </local-scheme>
                      </front-scheme>
                      <back-scheme>
                            <distributed-scheme>
                                  <scheme-ref>config-part-distributed</scheme-ref>
                            </distributed-scheme>
                      </back-scheme>
                <autostart>true</autostart>
                </near-scheme>
                <distributed-scheme>
                      <scheme-name>config-part-distributed</scheme-name>
                      <service-name>partDistributedCacheService</service-name>
                      <thread-count>10</thread-count>
                      <backing-map-scheme>
                            <read-write-backing-map-scheme>
                                  <read-only>true</read-only>
                                  <scheme-name>partStatusScheme</scheme-name>
                                  <internal-cache-scheme>
                                        <local-scheme>
                                              <scheme-name>part-eviction</scheme-name>
                                              <expiry-delay>30s</expiry-delay>
                                        </local-scheme>
                                  </internal-cache-scheme>
                                  <cachestore-scheme>
                                        <class-scheme>
                                              <class-name>net.jakeri.test.PingCacheLoader</class-name>
                                        </class-scheme>
                                  </cachestore-scheme>
                                  <refresh-ahead-factor>0.5</refresh-ahead-factor>
                            </read-write-backing-map-scheme>
                      </backing-map-scheme>
                      <autostart>true</autostart>
                      <local-storage system-property="tangosol.coherence.config.distributed.localstorage">true</local-storage>
                </distributed-scheme>

    Hi Jakkke,
    The Near Cache scheme allows to have configurable levels of cache coherency from the most basic expiry based cache to invalidation based cache to data versioning cache depending on the coherency requirements. The Near Cache is commonly used to achieve the performance of replicated cache without losing the scalability aspects of replicated cache and this is achieved by having a subset of data (based on MRU or MFU) in the <front-scheme> of the near cache and the complete set of data in the <back-scheme> of near cache. The <back-scheme> updates can automatically trigger events to invalidate the entries in the <front-scheme> based on the invalidation strategy (present, all, none, auto) configured for the near cache.
    If you want to expire the entries in the <front-scheme> and <back-scheme>, you need to specify an expiry-delay on both the schemes as mentioned by you in the last example. Now if you are expiring the items in the <back-scheme> for the reason that they get loaded again from the cache-store but the <front-scheme> keys remain same (only the values should be refreshed from the cache store) then you need not set the expiry-delay on the <front-scheme> rather mention the invalidation-strategy as present. But if you want to have a different set of entries in <front-scheme> after a specified expiry delay then you need to mention it in the <front-scheme> configuration.
    The near cache has the capability to keep front scheme and back scheme data in sync but the expiry of entries is not synced. Always, front-scheme is a subset of back-scheme.
    Hope this helps!
    Cheers,
    NJ

  • Tutorial for creating a J2EE project with "Flex Builder 3 Beta 3 " ?

    Hi,
    I'm trying to set up a Flex environment with:
    Flex Builder 3 Beta 3 stand alone
    WTP (from eclipse update manager)
    LCDS 2.5 (with JRun)
    JBoss 4.2.2GA
    At this moment I successful installed everything (but not set up). I added WTP at Flex Builder3 (with the eclipse update manager). I copied the two flex-tomcat files in jboss.
    Then in Flex Builder 3 I created a new Flex Project. In the wizard first window, I selected J2EE, Livecycle and WTP. Then in the next window I need to configurate the J2EE server.
    I couldn't find any information/tutorial for this window? Is there a tutorial for this?
    This window ask me:
    Target Runtime: I created a new one for JBoss 4.2.2 (during this process flex builder asked me to add a project but actually I'm creating this project so I hadn't any project to add (??)).
    ContextRoot: name of the project I'm creating (default). Is it good?
    Content Folder: the default is "WebContent". Is it good?
    Flex War File: What is that? Where do I find it?
    Thanks a lot,
    Jerome

    The settings you mention all sound fine, but the I believe the Flex War file may be what you referred to as the flex-tomcat files (specifically the one should be called flex.war from the install folder).
    You don't need to deploy the flex.war file to JBoss manually, when you create a project, you just select the file in the wizard and it is extracted and used as a template for the new project. In fact, it may cause a port conflict with your project if you do deploy manually it (unless you tweak some of the config files), so it's probably worth removing it from the deploy folder if you did put it there. The other file, flex-admin.war, can stay without causing issue.
    The closest to a tutorial that I am aware of is if you search "New Flex Project" in the help system, it talks about what each of the options should be when creating LCDS projects.

  • How to update Flash Builder 4 beta 2 so that it remains compatible with snapshots?

    I have Flash Builder 4 beta 2 STANDALONE installed on my Mac (MacOSX 10.6) and I just upgraded my Flex SDK to the latest stable snapshot (4.0.0.13875). Now it seems that the visual designer is not very happy with this upgrade.
    And in "Using Gumbo builds with Flex Builder" (http://opensource.adobe.com/wiki/display/flexsdk/Using+Gumbo+Builds+in+Flex+Builder) it is said that "Please note that the release of a milestone build will usually have an associated automatic update to Flex Builder that will include all relevant files."
    The question is how do I get that automatic update? I've tried Help/Software Updates/Find and install.../Updates for existing features, but it didn't find any updates. Any idea how I can revive my Design mode?

    There are no updates for Beta 2.
    You're probably seeing one of two issues with the latest nightly build:
    1) playerglobal.swc change http://forums.adobe.com/thread/559312?tstart=0
    2) Namespace change from xmlns:mx="library://ns.adobe.com/flex/halo" to xmlns:mx="library://ns.adobe.com/flex/mx"
    Jason San Jose
    Quality Engineer, Flash Builder

  • Flash Builder 4 Beta 2 ---- Data Management Problem

    Flash Builder 4 Beta 2 ---- Data Management Problem
    I have a simple datagrid, a PHP service and a MySQL database. When I run the code I get multiple(7) records returned to the datagrid.  Once I enable Data Management and run the exact same code, I only get 1  record returned.
    Is there a setting in Data Management that affects the number of records returned?
    Here is the MXML code I am testing. 
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                         xmlns:s="library://ns.adobe.com/flex/spark"
                         xmlns:mx="library://ns.adobe.com/flex/halo" minWidth="1024" minHeight="768" xmlns:carasgndataphp="services.carasgndataphp.*">
          <fx:Script>
                <![CDATA[
                      import mx.controls.Alert;
                      import mx.events.FlexEvent;
                      var inptdata:String = "1";
                      protected function dataGrid_creationCompleteHandler(event:FlexEvent):void
                            getAsgnDataResult.token = carAsgnDataPHP.getAsgnData(inptdata);
                ]]>
          </fx:Script>
          <fx:Declarations>
                <s:CallResponder id="getAsgnDataResult"/>
                <carasgndataphp:CarAsgnDataPHP id="carAsgnDataPHP" fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)" showBusyCursor="true"/>
                <!-- Place non-visual elements (e.g., services, value objects) here -->
          </fx:Declarations>
          <mx:DataGrid x="115" y="91" id="dataGrid" creationComplete="dataGrid_creationCompleteHandler(event)" dataProvider="{getAsgnDataResult.lastResult}" width="558" height="298">
                <mx:columns>
                      <mx:DataGridColumn headerText="A" dataField="numAsgn"/>
                      <mx:DataGridColumn headerText="T" dataField="numTopic"/>
                      <mx:DataGridColumn headerText="U" dataField="numUnit"/>
                      <mx:DataGridColumn headerText="P" dataField="numProblem"/>
                      <mx:DataGridColumn headerText="TP" dataField="PType"/>
                      <mx:DataGridColumn headerText="P" dataField="numSeqPresent"/>
                      <mx:DataGridColumn headerText="F" dataField="numSeqFeedback"/>
                      <mx:DataGridColumn headerText="D" dataField="numDelay"/>
                      <mx:DataGridColumn headerText="ID" dataField="idAsgnData"/>
                      <mx:DataGridColumn headerText="IDP" dataField="idProblem"/>
                </mx:columns>
          </mx:DataGrid>
    </s:Application>

    Hello,
    Data Mangement expects unique values for id property.This issue may occur when you select 'Identity' property in Data Mangement wizard which is not unique in the Table.For eg:, you have selected 'name' field as identity property. And your MySQL database table has multiple rows with identical values for 'name' column.
    Can you verify if you have similar setup?
    Thanks,
    Radhakrishna

  • Flash Builder 4 beta 2, Managed objects and IUID

    Hey Everyone,
    I just installed Flash Builder 4 beta 2, I am getting compiler errors now on my managed data service classes that implement IUID:
    [Managed]
    public class Foo implements  IUID {
    private var uid:String;
      public function set uid(value:String):void {
                this.uid=value;
    The compile error is on the above setter and says: [Managed] requires 'uid' to be of type 'String' , not sure what I am doing wrong here, and this was working on beta 1, any ideas?
    Thanks.

    Did you try a full clean and build?  Also try a new test app to reduce the number of possibilities.
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • Flash Builder 4 Beta RDS issue

    I cannot connect to ColdFusion via RDS with my Flash Builder 4 beta 2. I have no issue connecting to CF via RDS in dreamweaver CS3.
    However whenever I try to connect to a CFC via "connect to DataService" and I get "Enter RDS password and user name".. I always get "Authentication faliure. The supplied username or password may be wrong". I created 2 users for RDS in the CF 9 adminstrato.. and it would not accept either username/ password combo. I even tried using RDS with no authentication and rebooted the pc each time.
    I had no issue doing a very basic connection to a cfc like in the HelloCF example.. yet db connectivity fails.. idea of whats' the issue here?
    Thanks!

    Hi,
    Can you access your CFC from the browser?
    i mean like http://localhost:8501/MyCFC.cfc in the browser would open something like:
    http://localhost:8501/CFIDE/componentutils/cfcexplorer.cfc?METHOD=getcfcinhtml&PATH=/MyCFC .cfc&NAME=MyCFC.cfc
    Now replace METHOD=getcfcinhtml to METHOD=getcfcmetadata.
    If this displays some text as the result like:
    'C:\ColdFusion8\wwwroot\WEB-INF\cftags\component.cfccomponentWEB-INF.cftags.componentWEB-INF.cftags.componentC:\ColdFusion8\wwwroot\MyCFC.cfcAT_TestcasesFiles.LogicTesting.BookServiceTestAT_TestcasesFiles.LogicTesting.BookServiceTestnoBookgetItemremoteanytrueitemcomponent'
    If this itself throws an error, then you would be hitting
    http://bugs.adobe.com/jira/browse/FB-23626 , which showed up authentication error though CFC had problems.
    This has been resolved in the latest pre-release build.
    If you do not have access for the pre-release build please send a mail to rkrishna AT adobe DOT com.
    Hope this helps please let us know if you still face issues.
    Thanks,
    Balaji
    http://balajisridhar.wordpress.com

  • How can I get a count of objects in the near cache? (Extend client)

    Hi,
    I'm trying to figure out how to get the count of objects in my near cache (from c++ client). Knowing the size of the near cache is a key factor when optimizing configurations for performance.
    However if I call size() on the cache handle I get the count of objects in the cache (ie the cluster). How can I get a count of objects in the near cache?
    Thanks
    Rich Carless

    H Rich,
    It may not be ideal, but I think you may be able to infer the size by using the HeapAnalyzer (http://download.oracle.com/docs/cd/E15357_01/coh.360/e15728/classcoherence_1_1lang_1_1_heap_analyzer.html) facility, specifically the "class" based HeapAnalyzer. Its Snapshot representation http://download.oracle.com/docs/cd/E15357_01/coh.360/e15728/classcoherence_1_1lang_1_1_class_based_heap_analyzer_1_1_snapshot.html provides a mapping between class name and ClassStats (http://download.oracle.com/docs/cd/E15357_01/coh.360/e15728/classcoherence_1_1lang_1_1_class_based_heap_analyzer_1_1_class_stats.html) which provides information on how many instances of a given class type are in memory. Note the reported counts are process wide but if your key or value type are distinct you may be able to infer your answer. I realize this is rather complex, my only other suggestion would be to just make some guesses on size and see how they effect performance.
    Mark
    Oracle Coherence

  • Flash Builder 4 Beta Annoying - Keep imports organized - default feature - fix

    I Began using Adobe's Flash Builder 4 Beta and started coding Actionscript code; I imported classes and at time intervals, Flash Builder 4 beta deleted my unused imported classes. It was really annoying since I imported all of the classes I need in the project. I think that the Flash Builder 4 should have this option turned off by default. I searched around the internet and found this to fix it. GO TO: Window -> Preferences -> Flash Builder -> Editors -> Actionscript Code. Uncheck "keep imports organized". See the image below. Hope it helps someone.

    Hi Pat
    That is the "Mark Occurances" feature. Click into the editor window, then on your toolbar you should see the "Mark Occurances" button, looks like the tip of a yellow highlighter. Toggle it off and that goes away. Obviously something some folks like on, others hate, but since you can toggle it shouldn't be a big deal.
    Sincerely
    Mark R. Jonkman

  • How to get cache statistics of back map in a near cache

    Hi-
    I have a near cache configured.
    Local cache makes the front cache and Distributed cache makes the back cache.
    I am able to get statistics of front cache using coherence API, like as below.
    NamedCache coherenceCache = CacheUtils.getNamedCache( CacheUtils.getCacheRegionPrefix() + region.getRegionName() );
              if (coherenceCache instanceof NearCache)
                   NearCache nearCache = (NearCache)coherenceCache;
                   CachingMap cachingMap = (CachingMap)nearCache;
                   CacheStatistics frontStatistics = ((LocalCache)nearCache.getFrontMap()).getCacheStatistics();
    How do i get the statistics of back map?
    If i do below, it gives statistics which combines data for both front and back (That is what i infer based on my understanding - it increases get count in both front and back even if get it done in front cache)
                   CacheStatistics backStatistics = cachingMap.getCacheStatistics();
    So is there any way to get statistics for back cache alone with Coherence API for a near cache?
    Any help on this be much appreciated
    thanks

    Hi,
    NamedCache coherenceCache = CacheUtils.getNamedCache( CacheUtils.getCacheRegionPrefix() + region.getRegionName() );
    if (coherenceCache instanceof NearCache)
    NearCache nearCache = (NearCache)coherenceCache;
    CachingMap cachingMap = (CachingMap)nearCache;
    Map backingMap = cachingMap.getBackMap();
    OR
    Map backingMap = nearCache.getBackMap();
    getFrontMap() and getBackMap() are methods from CachingMap.
    Thanks & Regards,
    Murali.
    ============

Maybe you are looking for

  • Applescript to Access Calendar

    Hello all, I am creating an applescript to read my iCal events and find out when the next event is. It works fine except for at the beginnning of the program, it asks for permision to access the calendar. I looked into it, and found out to go into se

  • 3.6.9 shows only blank pages

    I updated from 3.6.3 to 3.6.9 and i can't manage to let firefox work again. It just show blank pages and "loading page.." text on the tab. I made several steps but everything failed: - I have reinstalled from scratch - I have started in "safe mode" -

  • Error when opening any campaign - CRM 7.0 WebUI

    Dears, when we try to open an marketing campaign we get the below error. Please help us. The URL http://host:port/sap/bc/bsp/sap/crm_ui_frame/BSPWDApplication.do was not called due to an error. Note The following error text was processed in the syste

  • Can I create material reservations on setting of particular user status?

    I know that Reservation creation can be kept on hold by choosing Never/Create on release etc at operation level. My requirement is , At release of work order - reservation should not be created and on setting of certain user status reservation should

  • HL7 schema modification error with imported schema namespace

    I have created a variant of one of the out of the box HL7 schemas.  The changes were made to the related Segments schema.  I have a custom namespace identified on both the "master" schema and one on the modified schema which is being imported into th