Giter VIP home page Giter VIP logo

Comments (3)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 17, 2024
The FlickrServices2 class aggregates all of its results and then adds it to the 
shared buffer for processing.  I 
think this might be slower than letting each query add to the buffer as it 
completes, because we are 
potentially bounded by the slowest query.

Another correct solution is to add to the shared buffer as each Query 
completes.  The articles about Thread 
Pools say to be wary of doing this because it introduces the potential for 
deadlock.  Note that this is not the 
case in this shared buffer scenario, as there is no 'hold and wait' condition.  
We have each thread potentially 
waiting (not holding the lock) for one other thread to finish some simple queue 
operations (which don't 
require any additional locks).

We'll have to do some performance analysis with various combinations of these 
methods, because it isn't clear 
to me how having multiple thread pools and multiple sources (flickr, facebook, 
etc), competing for the shared 
buffer will perform.

Original comment by [email protected] on 14 Dec 2007 at 5:36

  • Added labels: ****
  • Removed labels: ****

from wosaic.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 17, 2024
Responding to Comment 1:

This is something that we can discuss more at the meeting. However, we are 
already
submitting progress from FlickrService2 as each query completes.  The logic is 
as
follows:

foreach query:
    Start a new thread that will specifically query flickr //non-blocking call

foreach query:
    Submit our query results to the shared buffer // blocking call

The first loop is a very quick iteration just spawning threads, but the second
actually blocks to wait for results from each call.  I believe this is the best 
way
to do it.

Original comment by [email protected] on 4 Jan 2008 at 5:30

  • Added labels: ****
  • Removed labels: ****

from wosaic.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 17, 2024

Original comment by [email protected] on 19 Jan 2008 at 6:03

  • Changed state: Fixed
  • Added labels: ****
  • Removed labels: ****

from wosaic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.