Skip to content
Newer
Older
100755 71 lines (63 sloc) 3.69 KB
52a1890 @jwheare Revert "experimental code for darknet, just a servent so far"
jwheare authored
1 <!--#set var="title" value="Playdar - Music Content Resolving Framework" --><!--#include virtual="/inc/header.html" -->
2 <h2>Playdar Content Resolving Framework</h2>
3 <p>
930c215 resolver docs update, source code links
root authored
4 Playdar has an asynchronous cascading resolver pipeline. Resolvers with the highest weighting are queried first, and the search is quickly passed on to other resolvers in the chain until a match is found. As soon as a query is "solved", the pipeline is aborted.
52a1890 @jwheare Revert "experimental code for darknet, just a servent so far"
jwheare authored
5 </p>
6 <p>
930c215 resolver docs update, source code links
root authored
7 Resolver plugins are loaded into the pipeline with a <b>weight</b> and <b>target time</b>.
8
e0e3775 news, and update to resolvers page. also fixed links to demo sources
RJ authored
9 The weight is an int between 1-100, and dictates the order in which resolver plugins are queried. The most reliable and fastest resolver has a weight of 100 (ie the one that matches files on your hard disk).
930c215 resolver docs update, source code links
root authored
10 </p>
11 <p>
12 The target time is a millisecond value that the resolver will probably have found results in, if any exist. If a query is still not solved after the target time has elapsed, the query is dispatched to the resolver with the next highest weight.
13 </p>
14 <p>
15 Results are still valid if reported after the targettime, it's simply used to decide when to hit up the next resolver.
16 This helps cut down on spam. There's no point in querying the entire internet if you find a result on your hard disk.
17 </p>
18 <p>
e0e3775 news, and update to resolvers page. also fixed links to demo sources
RJ authored
19 <strong>Resolvers with equal weights are dispatched to in parallel</strong>, and the smallest targettime of resolvers at that weight is used to decide when to dispatch the query to the next resolver(s).
930c215 resolver docs update, source code links
root authored
20 </p>
21
e0e3775 news, and update to resolvers page. also fixed links to demo sources
RJ authored
22 <h3>Resolvers</h3>
930c215 resolver docs update, source code links
root authored
23 <p>
e0e3775 news, and update to resolvers page. also fixed links to demo sources
RJ authored
24 Currently the local-files resolver and the LAN resolver are fully supported and built by default. This allows you to find files on your hard disk, and from other machines running playdar on your home network.
930c215 resolver docs update, source code links
root authored
25 </p>
26 <p>
25df15f update site to reflect new erlang codebase
RJ authored
27 There are other scripts and plugins available in the contrib/ directory. An example of an external resolver script (writen in PHP) is the magnatune resolver - this resolves against the free online record label magnatune.com. There is also a script that resolves against mp3tunes (an online music locker service), and many others.
930c215 resolver docs update, source code links
root authored
28 </p>
29
30 <h3>Write your own Resolver Plugin</h3>
31 <p>
25df15f update site to reflect new erlang codebase
RJ authored
32 To write additional resolvers that find content from other sources you have two options:
52a1890 @jwheare Revert "experimental code for darknet, just a servent so far"
jwheare authored
33 <ul>
25df15f update site to reflect new erlang codebase
RJ authored
34 <li>
35 Any scripting language or other program can be spawned as an external process,
36 which Playdar talks to by writing to stdin and reading stdout. You need to parse requests to stdin (JSON objects)
37 and write any results to stdout (also as JSON objects). Playdar does the rest for you.
38 Example: <a href="http://github.com/RJ/playdar-core/tree/master/contrib/demo-script">demo resolver PHP script</a>
39 </li>
40 <li>
41 Writing a module in Erlang and defining the playdar_resolver behaviour.
42 A simple Erlang resolver looks like this: <a href="http://github.com/RJ/playdar-core/blob/master/playdar_modules/fake/src">fake_resolver (Erlang)</a>.
43 For slightly more complex examples, check the lan or library modules from the <a href="http://github.com/RJ/playdar-core/blob/master/playdar_modules">playdar_modules dir</a>.
44 </li>
52a1890 @jwheare Revert "experimental code for darknet, just a servent so far"
jwheare authored
45 </ul>
930c215 resolver docs update, source code links
root authored
46 Consider joining the mailing list or IRC if you are writing a resolver, we'd love to hear about it.
52a1890 @jwheare Revert "experimental code for darknet, just a servent so far"
jwheare authored
47 </p>
48
930c215 resolver docs update, source code links
root authored
49
52a1890 @jwheare Revert "experimental code for darknet, just a servent so far"
jwheare authored
50 <h3>Other resolver plugins...</h3>
51 <p>
930c215 resolver docs update, source code links
root authored
52 What other sources can you think of to resolve music from?
52a1890 @jwheare Revert "experimental code for darknet, just a servent so far"
jwheare authored
53 </p>
54 <p>
55 Here are some ideas:
56 </p>
57 <ul>
58 <li>Searching free sources such as magnatune.com or archive.org</li>
e0e3775 news, and update to resolvers page. also fixed links to demo sources
RJ authored
59 <li>Got a paid-for Rhapsody or Spotify account? Write a resolver plugin or script to use it.</li>
52a1890 @jwheare Revert "experimental code for darknet, just a servent so far"
jwheare authored
60 <li>iTunes shared libraries (not sure if this is possible due to silly encryption apple added?)</li>
61 <li>UPnP Media Devices</li>
e0e3775 news, and update to resolvers page. also fixed links to demo sources
RJ authored
62 <li>Ampache (starting point for this already in contrib/)</li>
52a1890 @jwheare Revert "experimental code for darknet, just a servent so far"
jwheare authored
63 <li>Any online service that has a search/streaming API</li>
64 <li><b>Your idea here</b></li>
65 </ul>
ad54e0f @jwheare Restore badly merged www
jwheare authored
66 </p>
52a1890 @jwheare Revert "experimental code for darknet, just a servent so far"
jwheare authored
67
68
69 </body>
70 </html>
Something went wrong with that request. Please try again.