brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aledsage <...@git.apache.org>
Subject [GitHub] incubator-brooklyn pull request: Thread pool for persisting to Obj...
Date Thu, 03 Jul 2014 19:01:26 GMT
Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/41#discussion_r14531996
  
    --- Diff: core/src/main/java/brooklyn/entity/rebind/persister/BrooklynMementoPersisterToObjectStore.java
---
    @@ -351,6 +525,27 @@ private void delete(String subPath, String id) {
             }
         }
     
    +    private ListenableFuture<String> asyncRead(final String subPath) {
    --- End diff --
    
    Reads are done concurrently, but Runnable in `loadMementoManifest` and `loadMemento` does
the read + deserialize + exception handling. Doing just the read in an async convenience wasn't
helpful in terms of keeping the code simple (not that it's simple, unfortunately!).
    
    Without this, we'd get maybe 5-10 reads a second (from my home network anyway) so rebinding
100 entities in the two phases would take 20-40 seconds.
    
    We should consider retrieving each just once - not worth it for file-based but good for
objectStore-based. However we'd need to either write a bunch of temporary files, or keep potentially
a lot of data in-memory. One to defer but think about.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message