Support
Help Save Reptile!
Navigation

Essentials

Installation

Developers

P2P (content distribution)

Search Infrastructure

Services

Proposals

Resources

P2P and external protocol handlers.

In order to support multiple content providers across multiple network types, specifically P2P networks, we need to support multiple URL protocols.

Each P2P network type has its own topology and design with different types of URLs for accessing content.

Example:

Network type URL syntax
Freenet freenet:CHK@Oy9IfV7HvuqbVVo-ww8TxUhXDjkPAwI,w3G6rrNj1VKk9PHxtHU2Ug
JXTA urn:jxta:uuid-081092834091823409812039481029384019823409812388390980980980809808


Java URL Handlers

Java provides a URL Protocol Handler extension mechanism. This has been a standard part of Java since JDK 1.2 was released.

SUN has some decent documentation of this functionality.

The extension mechanism is provided via a standard factory pattern. Extensions are provided via the java.protocol.handler.pkgs system property.

            /**
             * The property which specifies the package prefix list to be scanned
             * for protocol handlers.  The value of this property (if any) should
             * be a vertical bar delimited list of package names to search through
             * for a protocol handler to load.  The policy of this class is that
             * all protocol handlers will be in a class called [protocolname].Handler,
             * and each package in the list is examined in turn for a matching
             * handler.  If none are found (or the property is not specified), the
             * default package prefix, sun.net.www.protocol, is used.  The search
             * proceeds from the first package in the list to the last and stops
             * when a match is found.
             */
            


Interaction with Reptile Search

The ability to download content is a very important piece of functionality with regard to Reptile Search. Running a search on a specific P2P network is fine but if we can't make use of the results the search was basically pointless.

This plugin mechanism will allow us to DL content and immediately present it to the user with the standard java.net.URL mechanism. This means that our existing XSLT pipe mechanism will function perfectly.


Panther HTTP proxy and cache integration

Due to the fact that this system is implemented with the Java URL extension mechanism, the Panther cache should function correctly with the new system.

Basically this means that all content will be available even if a remote node is unavailable. As long as we can get the content once we will have it in the cache.


Security issues

Due to Java's classloader design, if we were not careful, it might be possible to trick Reptile into loading code right over the P2P network via java.net.URLClassLoader and executing it.

We need to use Java's secruity infrastructure to disable classloading


TODO

  • Is remote classloading disabled when running within a Servlet container?


  • Copyright © 2001-2003, OpenPrivacy.org