diff --git a/cs656/lab3/ChatClient.sh b/cs656/lab3/ChatClient.sh new file mode 100755 index 0000000..8baee9e --- /dev/null +++ b/cs656/lab3/ChatClient.sh @@ -0,0 +1,2 @@ +#!/bin/sh +java -cp .:./lib/log4j.jar:./lib/openchord_1.0.4.jar ChordClient $* diff --git a/cs656/lab3/Makefile b/cs656/lab3/Makefile new file mode 100644 index 0000000..653f3bc --- /dev/null +++ b/cs656/lab3/Makefile @@ -0,0 +1,6 @@ + +all: + javac -cp .:lib/openchord_1.0.4.jar:lib/log4j.jar *.java + +clean: + -rm -f *~ *.class diff --git a/cs656/lab3/chord.properties b/cs656/lab3/chord.properties new file mode 100644 index 0000000..9f4bf41 --- /dev/null +++ b/cs656/lab3/chord.properties @@ -0,0 +1,26 @@ +#Property file for Open Chord version 1.0.4 +# Name of log4j property file +log4j.properties.file=log4j.properties + +# Number of bytes of displayed IDs +de.uniba.wiai.lspi.chord.data.ID.number.of.displayed.bytes=4 + +#Number of successors +de.uniba.wiai.lspi.chord.service.impl.ChordImpl.successors=2 + +#Number of threads for asynchronous executions +de.uniba.wiai.lspi.chord.service.impl.ChordImpl.AsyncThread.no=10 + +# Start times and intervals of maintenance tasks +de.uniba.wiai.lspi.chord.service.impl.ChordImpl.StabilizeTask.start=0 +de.uniba.wiai.lspi.chord.service.impl.ChordImpl.StabilizeTask.interval=6 +de.uniba.wiai.lspi.chord.service.impl.ChordImpl.FixFingerTask.start=2 +de.uniba.wiai.lspi.chord.service.impl.ChordImpl.FixFingerTask.interval=12 +de.uniba.wiai.lspi.chord.service.impl.ChordImpl.CheckPredecessorTask.start=4 +de.uniba.wiai.lspi.chord.service.impl.ChordImpl.CheckPredecessorTask.interval=6 + +#ThreadPool for incoming requests +de.uniba.wiai.lspi.chord.com.socket.InvocationThread.corepoolsize=10 +de.uniba.wiai.lspi.chord.com.socket.InvocationThread.maxpoolsize=50 +#time to keep idle threads alive before termination in seconds: +de.uniba.wiai.lspi.chord.com.socket.InvocationThread.keepalivetime=20 \ No newline at end of file diff --git a/cs656/lab3/lib/log4j.jar b/cs656/lab3/lib/log4j.jar new file mode 100644 index 0000000..1595a56 Binary files /dev/null and b/cs656/lab3/lib/log4j.jar differ diff --git a/cs656/lab3/lib/openchord_1.0.4.jar b/cs656/lab3/lib/openchord_1.0.4.jar new file mode 100644 index 0000000..b267163 Binary files /dev/null and b/cs656/lab3/lib/openchord_1.0.4.jar differ diff --git a/cs656/lab3/log4j.properties b/cs656/lab3/log4j.properties new file mode 100644 index 0000000..898be25 --- /dev/null +++ b/cs656/lab3/log4j.properties @@ -0,0 +1,12 @@ +log4j.rootLogger=ON +log4j.appender.FILE=org.apache.log4j.FileAppender +log4j.appender.FILE.Append=False +log4j.appender.FILE.layout=org.apache.log4j.HTMLLayout +log4j.appender.FILE.layout.LocationInfo = true +log4j.appender.FILE.File=open_chord.log.html + +log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender +log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout +log4j.appender.CONSOLE.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n + +log4j.logger.de.uniba.wiai.lspi.chord=WARN, FILE