IST-2001-33234

PEPITO

 

P2PmBlog

This document briefly describes the P2PmBlog and has a quick start guide to installing and running the demo.

Introduction

One of the efforts in the Pepito project (http://www.sics.se/pepito/) attempts to use recent advances of peer-to-peer computing, and DHTs (Distributed Hash Table) to realize sophisticated blogging and news aggregation services and create a test application for the peer-to-peer (P2P) technology.

P2PmBlog allows users to easily create so-called weblogs from any Internet or mobile terminal. Weblogs (or “blogs”) are thematic information sites edited by several authors and available for reading to the mass of Internet users [1].

System overview

The P2PmBlog system consists of “blog nodes” that may form large peer-to-peer systems where blog data is shared through the use of key-based routing algorithms, and a number of “blog clients” that can connect to such nodes via XMLRPC. Examples of such clients are “blog extractor” processes that can pull information from regular weblogs into the network, and reader applications that can extract data from the P2P system, via a blog node, and present it to a user. A more detailed description of the P2PmBlog system can be found here.

Demo

This rest of this document is meant as a brief quick start guide to adding and reading blog content from a P2P blog node. This involves

Requirements

Running a P2P blog node requires Linux Red Hat 9 or higher, as well as Java 1.4 or higher.
Running a desktop reader requires Java 1.4 or higher.
Running J2ME reader through emulator requires Java 1.4 or higher and the Java Wireless Toolkit.
Running J2ME reader on a phone requires a J2ME MIDP 2.0 capable phone configured for data traffic (GPRS or equiv).

Installation

  1. Download the P2PmBlog distribution. Distributions exists for Linux, Windows and mobile phones (J2ME MIDP2):
    Linux - The Linux distribution includes the Blog Node, Desktop Reader and Blog Extractor.
    Windows - The Windows distribution includes the Desktop Reader and Blog Extractor.
    Mobile phone - The mobile phone distribution includes the J2ME Reader.
  2. Unzip the P2PmBlog file and extract the files. This will create a directory called P2PmBlog, which contains a bin and a lib directory.

Starting a Blog Node

The Blog Node is part only of the Linux distribution and requires Linux Red Hat 9 or higher to run, as well as Java 1.4 or higher. To start a blog node process, use the BlogNode script in the bin directory (available in the Linux distribution only).

>cd bin
>./BlogNode


When started, BlogNode reads a number of settings from the file blognode.properties, also located in the bin directory. Some important properties included in this file are:

  • port - The port where the BlogNode accepts XMLRPC calls
  • acceptClientIPs - A list of ip numbers identifying hosts that are allowed to connect to the BlogNode (using XMLRPC). If several numbers are given, they should be separated using the semicolon character, e.g., ip1;ip2;ip3. The asterisk character may be used as a wildcard character. For instance, 193.10.65.* specifies all hosts on the 193.10.65 network.
  • p2pJoinHost - The host name (or ip number) of some host where another BlogNode process is running. If set, the BlogNode will connect to this other process when started. Connecting BlogNodes is a prerequisite for creating a network of nodes that can share blog data. If p2pJoinHost is not set, the BlogNode will initially be unconnected, but other BlogNodes may of course connect to it at a later stage.
  • p2pJoinPort - The port used to connect to the host identified by p2pJoinHost when the BlogNode is started.
  • p2pLocalPort - The port where a BlogNode accepts incoming connections from other BlogNodes.

    Starting Blog Extractor

    The blog extractor is part of the both the Linux and Windows P2PmBlog distribution. The extractor process is easiest started with the batch file, bin/BlogExtractor.bat, which contains default values for the starting parameters:

    <properties file> <blognode host> <blognode port> <user name> <user pass> <client name> <debug level>

    of which the <blognode host> must be changed to the address of the computer where your blognode is running before starting. This will start the extractor with a supplied cache file, which will feed new blog entries into the P2P network at a regular interval.

    The properties file (pointed to by <properties file>) contains <data source property files, handler type> pairs,
    where the data source property files typically contain easily understood access information and timing data for the particular data source.

    Starting a Desktop Reader

    The desktop reader is part of the both the Linux and Windows P2PmBlog distribution. The blog content desktop reader process is easiest started with the batch file, BlogReader.bat under Windows, and the BlogReader script under Linux. These are located in the bin directory of the corresponding distribution.

    When started, the desktop reader builds a GUI that looks like this:

    A settings window will also appear where you have to enter some information in order for the reader to function properly. The most important information are the Blog node host name (or ip number) and the Blog port. The host and port settings will be used by the reader to connect to a BlogNode process whenever the reader needs to access blog data from the P2P network, or add new data, for example, create new blog entries. The Username is used to identify the user. For instance, when posting entries, the username will be part of the information stored in the P2P network, and other users that retrieve and read the entry will thus be able to see the author's name. The Password setting can be ignored. When done, press the Ok button to commit the new settings. The settings may be changed at any time by clicking on the Settings... button in the main GUI.

    To create a new blog to which entries then can be posted, select the Create Blog... button on the GUI. A new window will appear in which a blog name and a short description of the blog may be entered. The Subscription check button can be used to specify if you want to subscribe to the new blog or not. By default, the button is checked, i.e., the blog will be subscribed.

    After creating and subscribing to a new blog, the blog name will appear in the Subscribed blogs list in the main GUI. By selecting the name, a list of available blog entries will appear in the entries list. Since the blog that was created will have no entries yet, the message "-- no entries --" is displayed instead.

    To get a list of all blogs in the system (created by any user), press the Subscribe.... A new window will appear that lists the blog names of all such blogs, and allows blogs to be selected for subscription. Only subscribed blogs will appear in the Subscribed blogs list of the main GUI, and blogs therefore needs to be subscribed in order to access their current entries as well as posting new ones. The window below shows an example where three blogs named Blog1, Blog2 and Blog3 exists. Blog1 and Blog2 are subscribed, Blog3 is not.


    To create a new entry and post it to a blog, select the blog in the Subscribed blogs list and click on the Create blog... button. A new GUI window will appear:

    An entry consist of a title, a text and zero or more image objects. The images can be selected by pressing the Add media... button, which will open a file browser GUI that can be used to locate images that should be part of the entry. Currently, only gif, jpg and png image types are supported. After entering the entry data and pressing the Ok button, the main reader GUI will be updated to display the new entry title in the entries list. By selecting the entry text, the main GUI will look something like this:

    Installing and Starting J2ME Reader

    Requires MIDP 2.0 device (push usage also requires JSR-120 support). This reader has (because of lack of MIDP 2.0 devices at time of writing) only been tested on a SonyEricsson P900 with upgraded firmware.

    To install either:
    - use the pc software that came with your phone to transfer the bin/j2me/p2pmblog.{jar,jad} files to your phone, which should start installation. Otherwise, for a more flexible solution ...
    - put the bin/j2me/p2pmblog.{jar,jad} files on a web server (configured with MIME type mappings: the .jad file extension must map to the text/vnd.sun.j2me.app-descriptor type and the .jar extension to the application/java-archive type). Next, download the jad file through the phone browser, which should start installation automagically.

    Once installed, start 'p2pmblog' application, and accept initial queries, and click the splash screen

    , after which you'll eventually be taken to a preference dialog

    where you, just as for the other apps, need to change "P2P node address" to a host where you're running a blog node. After choosing ok, choose 'Subscr' from menu (sorry, no screenshot) and select a blog subscription (sorry, no screenshot). Have patience with initial operations, since initializing GPRS connection may take time (ugly tip from experinced GPRS user: if you're having problems getting the connection when starting application, first visit arbitrary site using phone browser to initialize connection, then start application). This will take you back to the list of blogs you subscribe to:

    and when you select one of the blogs, you get a list of recent entries on that blog:

    selecting one of the entries will present the content of that entry:

    Issues

    Blog Extractor

    J2ME Reader


    For limited support, contact . For more information on Pepito, see Pepito page at SICS.