Comments (3)
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.
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.
Original comment by [email protected]
on 19 Jan 2008 at 6:03
- Changed state: Fixed
- Added labels: ****
- Removed labels: ****
from wosaic.
Related Issues (20)
- Cleanup the Mosaic class HOT 1
- JAIProcessor throws exception on some PNG's HOT 1
- Create alternative matching algorithms HOT 1
- Move UI Components to standard Toolbars and Menu HOT 1
- Create a creation "Wizard"
- Convert to SWT Components
- Add Image Functionalities
- Option to Save with High-Quality Pixels HOT 1
- Add more search options for Flickr Plugin
- Avoid recursion in FilesystemPlugin HOT 1
- Save settings between sessions
- Cache fetched pixels
- Find a new algorithm for resizing images in FilesystemPlugin HOT 2
- Expand Facebook Plugin
- Make a Picasa Source Plugin HOT 1
- Create better logic for showing generation progress
- Add worker threads to JAI Processor
- Create Sourceforge or Launchpad Project pages
- Look into saving as TIFF
- Organize class files into packages
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wosaic.