/* GispPeer.java * * Copyright (c) 2003, Benja Fallenstein * * This file is part of Fenfire. * * Fenfire is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * Fenfire is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General * Public License for more details. * * You should have received a copy of the GNU Lesser General * Public License along with Fenfire; if not, write to the Free * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA * * */ /* * Written by Benja Fallenstein */ package org.nongnu.storm.modules.gispmap; import org.nongnu.storm.*; import org.nongnu.storm.impl.*; import org.nongnu.storm.impl.p2p.*; import org.nongnu.storm.util.HTTPProxy; import java.io.*; import java.util.*; import com.axlight.jnushare.gisp.*; /** A Storm peer based on the GISP hashtable. */ public class GispPeer extends Peer { static public boolean dbg = false; static private void p(String s) { System.out.println(s); } public GispPeer(IndexedPool publishedPool, StormPool cachePool, int port, String[] seedAddresses) throws Exception { super(publishedPool, cachePool, new GispP2PMap(port, seedAddresses)); } public static void main(String argv[]) throws Exception { IndexedPool publishedPool = null; int gisp_port = GispP2PMap.PORT; int gateway_port = -1; int i=0; while(i= 0) { new HTTPProxy(peer.getPool(), gateway_port).run(); } } }