Skip to content

Commit

Permalink
Merge pull request #2 from estigma88/adding-distribution
Browse files Browse the repository at this point in the history
Adding distribution file
  • Loading branch information
estigma88 authored Dec 26, 2017
2 parents 28e3d53 + 381fddd commit e6f089f
Show file tree
Hide file tree
Showing 11 changed files with 410 additions and 0 deletions.
3 changes: 3 additions & 0 deletions desktop-gui/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
apply plugin: 'java'
apply plugin: 'application'

repositories {
mavenCentral()
Expand All @@ -11,3 +12,5 @@ dependencies {
compile project(':dhash')
compile project(':lookup-service')
}

mainClassName = "co.edu.uniquindio.dht.Main"
5 changes: 5 additions & 0 deletions desktop-gui/src/dist/lib/resources/chord_properties/chord.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<chord xmlns="http://www.DHT-UQ.org/chord" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.DHT-UQ.org/chord chord.xsd ">
<time stableRing="2000"/>
<successorList amount="3"/>
</chord>
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<communication xmlns="http://www.DHT-UQ.org/communication"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.DHT-UQ.org/communication communication.xsd ">
<instance
class="co.edu.uniquindio.utils.communication.transfer.structure.CommunicationManagerStructure" />


<!-- <instance-->
<!--
class="co.edu.uniquindio.utils.communication.transfer.network.CommunicationManagerUDP"
/>
-->

<time waitingResult="2000" />
<params>
<param name="BUFFER_SIZE_MULTICAST">1024</param>
<param name="IP_MULTICAST">224.0.0.2</param>
<param name="PORT_MULTICAST">2000</param>
<param name="PORT_TCP_RESOURCE">2001</param>
<param name="PORT_TCP">2002</param>
<param name="PORT_UDP">2003</param>
<param name="BUFFER_SIZE_UDP">1024</param>
</params>
</communication>
102 changes: 102 additions & 0 deletions desktop-gui/src/dist/lib/resources/communication_properties/logger.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration>

<appender name="STDOUT_DHASH" class="org.apache.log4j.ConsoleAppender">
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [Dhash] [%C{1}] %m%n" />
</layout>
</appender>

<appender name="STDOUT_DHT" class="org.apache.log4j.ConsoleAppender">
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [DHT-UQ_GUI] [%C{1}] %m%n" />
</layout>
</appender>

<appender name="CH3_DHASH" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="c:/logger.log" />
<param name="MaxBackupIndex" value="3" />
<param name="MaxFileSize" value="1KB" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [Dhash] [%C{1}] %m%n" />
</layout>
</appender>

<appender name="STDOUT_CHORD" class="org.apache.log4j.ConsoleAppender">
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [Chord] [%C{1}] %m%n" />
</layout>
</appender>

<appender name="CH3_CHORD" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="c:/logger.log" />
<param name="MaxBackupIndex" value="3" />
<param name="MaxFileSize" value="1KB" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [Chord] [%C{1}] %m%n" />
</layout>
</appender>

<appender name="STDOUT_COMMUNICATION" class="org.apache.log4j.ConsoleAppender">
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [Communication] [%C{1}] %m%n" />
</layout>
</appender>

<appender name="CH3_COMMUNICATION" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="c:/logger.log" />
<param name="MaxBackupIndex" value="3" />
<param name="MaxFileSize" value="1KB" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [Communication] [%C] %m%n" />
</layout>
</appender>

<logger name="co.edu.uniquindio.chord">
<level value="INFO" />

<!--
<level value="FINE" class="co.edu.uniquindio.utils.logger.FineLevel"
/>
-->

<appender-ref ref="STDOUT_CHORD" />
<!-- <appender-ref ref="CH3_CHORD" />-->
</logger>
<logger name="co.edu.uniquindio.dht">
<level value="INFO" />

<!--
<level value="FINE" class="co.edu.uniquindio.utils.logger.FineLevel"
/>
-->

<appender-ref ref="STDOUT_DHT" />
</logger>

<logger name="co.edu.uniquindio.dhash">
<level value="INFO" />
<!--
<level value="FINE"
class="co.edu.uniquindio.utils.logger.FineLevel"/>
-->
<!--
<level value="FINEST"
class="co.edu.uniquindio.utils.logger.FinestLevel"/>
-->
<appender-ref ref="STDOUT_DHASH" />
<!-- <appender-ref ref="CH3_DHASH" />-->
</logger>

<logger name="co.edu.uniquindio.utils">
<level value="INFO" />
<appender-ref ref="STDOUT_COMMUNICATION" />
<!-- <appender-ref ref="CH3_UTILS" />-->
</logger>

<root>
<level value="debug" />
</root>

</log4j:configuration>
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<communication xmlns="http://www.DHT-UQ.org/communication"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.DHT-UQ.org/communication communication.xsd ">
<instance
class="co.edu.uniquindio.utils.communication.transfer.structure.CommunicationManagerStructure" />


<!-- <instance-->
<!--
class="co.edu.uniquindio.utils.communication.transfer.network.CommunicationManagerTCP"
/>
-->

<time waitingResult="2000" />
<params>
<param name="BUFFER_SIZE_MULTICAST">1024</param>
<param name="IP_MULTICAST">224.0.0.1</param>
<param name="PORT_MULTICAST">2000</param>
<param name="PORT_TCP_RESOURCE">2001</param>
<param name="PORT_TCP">2002</param>
<param name="PORT_UDP">2003</param>
<param name="BUFFER_SIZE_UDP">1024</param>
</params>
</communication>
5 changes: 5 additions & 0 deletions desktop-gui/src/dist/lib/resources/dhash_properties/dhash.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<dhash xmlns="http://www.DHT-UQ.org/dhash" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.DHT-UQ.org/dhash dhash.xsd ">
<overlay factoryClass="co.edu.uniquindio.chord.node.ChordNodeFactory" observerClass="co.edu.uniquindio.dhash.node.ReAssignObserver"/>
<replication amount="1"/>
</dhash>
37 changes: 37 additions & 0 deletions desktop-gui/src/dist/lib/resources/schema/chord.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://www.DHT-UQ.org/chord" elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.DHT-UQ.org/chord">

<xsd:element name="chord">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="time" minOccurs="1" maxOccurs="1"></xsd:element>
<xsd:element ref="successorList" minOccurs="1" maxOccurs="1"></xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>

<xsd:element name="time">
<xsd:complexType>
<xsd:attribute name="stableRing" use="optional"
default="2000">
<xsd:simpleType>
<xsd:restriction base="xsd:long">
<xsd:minInclusive value="100"></xsd:minInclusive>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:complexType>
</xsd:element>

<xsd:element name="successorList">
<xsd:complexType>
<xsd:attribute name="amount" use="optional" default="3">
<xsd:simpleType>
<xsd:restriction base="xsd:int">
<xsd:minInclusive value="1"></xsd:minInclusive>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:complexType>
</xsd:element>
</xsd:schema>
53 changes: 53 additions & 0 deletions desktop-gui/src/dist/lib/resources/schema/communication.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://www.DHT-UQ.org/communication" elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.DHT-UQ.org/communication">

<xsd:element name="communication">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="instance" minOccurs="1"
maxOccurs="1">
</xsd:element>
<xsd:element ref="time" minOccurs="1" maxOccurs="1"></xsd:element>
<xsd:element ref="params" maxOccurs="1" minOccurs="1"></xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>

<xsd:element name="time">
<xsd:complexType>
<xsd:attribute name="waitingResult" default="2000">
<xsd:simpleType>
<xsd:restriction base="xsd:long">
<xsd:minInclusive value="100"></xsd:minInclusive>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:complexType>
</xsd:element>

<xsd:element name="instance">
<xsd:complexType>
<xsd:attribute name="class" use="required">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"></xsd:minLength>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:complexType>
</xsd:element>

<xsd:element name="params">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="param" minOccurs="0" maxOccurs="unbounded"></xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>

<xsd:element name="param">
<xsd:complexType>
<xsd:attribute name="name" type="xsd:string" use="required"></xsd:attribute>
</xsd:complexType>
</xsd:element>
</xsd:schema>
30 changes: 30 additions & 0 deletions desktop-gui/src/dist/lib/resources/schema/dhash.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://www.DHT-UQ.org/dhash" elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.DHT-UQ.org/dhash">
<xsd:element name="dhash">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="overlay" minOccurs="1" maxOccurs="1"></xsd:element>
<xsd:element ref="replication" minOccurs="1" maxOccurs="1"></xsd:element>
</xsd:sequence>
</xsd:complexType></xsd:element>
<xsd:element name="replication">
<xsd:complexType>
<xsd:attribute name="amount" default="1" use="optional">
<xsd:simpleType>
<xsd:restriction base="xsd:int">
<xsd:minInclusive value="1"></xsd:minInclusive>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:complexType>
</xsd:element>

<xsd:element name="overlay">
<xsd:complexType>
<xsd:attribute name="factoryClass" type="xsd:string"
use="required">
</xsd:attribute>
<xsd:attribute name="observerClass" type="xsd:string"></xsd:attribute>
</xsd:complexType>
</xsd:element>
</xsd:schema>
91 changes: 91 additions & 0 deletions desktop-gui/src/dist/lib/resources/schema/message.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="http://www.DHT-UQ.org/message" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:dht="http://www.DHT-UQ.org/message">

<complexType name="Address">
<attribute name="source" type="string" use="required"></attribute>
<attribute name="destination" type="string" use="optional"></attribute>
</complexType>

<complexType name="Type">

<attribute name="name" type="string" use="required"></attribute>
<attribute name="amountParams" use="required">
<simpleType>
<restriction base="int">

<minInclusive value="0"></minInclusive>
</restriction>
</simpleType>
</attribute>
</complexType>


<complexType name="Param">
<attribute name="name" type="string" use="required"></attribute>
</complexType>

<complexType name="Params">
<sequence>
<element name="param" type="dht:Param" minOccurs="0" maxOccurs="unbounded"></element>
</sequence>
</complexType>


<complexType name="Message">
<sequence>
<element name="type" type="dht:Type" minOccurs="1"
maxOccurs="1">
</element>
<element name="address" type="dht:Address" minOccurs="1"
maxOccurs="1">
</element>
<element name="params" type="dht:Params" minOccurs="1"
maxOccurs="1">
</element>
</sequence>
<attribute name="sendType" use="required">
<simpleType>
<restriction base="string">
<enumeration value="REQUEST"></enumeration>
<enumeration value="RESPONSE"></enumeration>
</restriction>
</simpleType>
</attribute>
<attribute name="sequenceNumber" use="required">
<simpleType>
<restriction base="long">
<minInclusive value="1"></minInclusive>
</restriction>
</simpleType>
</attribute>
</complexType>


<complexType name="BigMessage">
<complexContent>
<extension base="dht:Message">
<sequence>

<element name="datas" type="dht:Datas"></element>
</sequence>
</extension>
</complexContent>
</complexType>

<element name="message" type="dht:Message"></element>

<element name="bigMessage" type="dht:BigMessage"></element>

<complexType name="Data">
<sequence>
<element name="bytes" type="base64Binary" minOccurs="1" maxOccurs="1"></element>
</sequence>
<attribute name="name" type="string" use="required"></attribute>
</complexType>

<complexType name="Datas">
<sequence>
<element name="data" type="dht:Data" minOccurs="1" maxOccurs="unbounded"></element>
</sequence>
</complexType>
</schema>
Loading

0 comments on commit e6f089f

Please sign in to comment.