Quantcast
Channel: Question and Answer » web-services
Viewing all articles
Browse latest Browse all 136

How to efficiently implement this background processing chain?

$
0
0

I am working on an audio software that uses The EchoNest web service to identify and retrieve metadata about audio songs and I would like to have some advice on implementing a background processing chain.

(to get the full picture, I’ll show you what I did already)

I’ve implemented the following chain that is mandatory before querying the service about a song’s details:

enter image description here

Not much to say except that before being able to query song data, we need its fingerprint and a song ID returned by the Identify sub-process. Of all these steps, they all happen locally but the last one (Identify).

Now about the part of the system I’m seeking for advices:

enter image description here

Above are the different types of queries that can be requested for a song, they are not inter-dependent as we already have the only thing needed, the song ID (diagram 1). Note that I’ve only put a few but there are nearly 30 of them (see here).

Requirements/architecture:

  1. user can drop files at any time, they are queued for identification
  2. queries can run in parallel with step 1 and optionally concurrently

Ideally, the system should be:

  • easily extensible when for instance, I implement a new type of query.
  • easy to use, I just enqueue a query to the chain and wait for a response

Environment:

I am using C# with Dataflow (Task Parallel Library), currently I’ve had some good success implementing diagram 1 using this approach.

My question:

Is there a particular/well-known pattern to tackle this problem ?


Viewing all articles
Browse latest Browse all 136

Trending Articles