Browse Source

version changes, logging, todo

master
Drew Short 11 years ago
parent
commit
912348c2f1
  1. 28
      pom.xml
  2. 62
      src/main/resources/application.conf
  3. 61
      src/test/resources/application.conf
  4. 18
      todo

28
pom.xml

@ -36,8 +36,14 @@
<lib.log4j.version>1.2.17</lib.log4j.version> <lib.log4j.version>1.2.17</lib.log4j.version>
<lib.slf4j.version>1.7.5</lib.slf4j.version> <lib.slf4j.version>1.7.5</lib.slf4j.version>
<lib.grizzled-slf4j.version>1.0.1</lib.grizzled-slf4j.version> <lib.grizzled-slf4j.version>1.0.1</lib.grizzled-slf4j.version>
<lib.scala-library.version>2.10.0</lib.scala-library.version>
<lib.scalafx.version>8.0.0-M1</lib.scalafx.version>
<lib.scala-library.version>2.10.3</lib.scala-library.version>
<lib.scalafx.version>8.0.0-M3</lib.scalafx.version>
<lib.akka.version>2.2.3</lib.akka.version>
<lib.jta.version>1.1</lib.jta.version>
<lib.ehcache.version>2.8.0</lib.ehcache.version>
<lib.commons-cli.version>1.2</lib.commons-cli.version>
<lib.commons-codec.version>1.9</lib.commons-codec.version>
<lib.jtransforms.version>2.4.0</lib.jtransforms.version>
</properties> </properties>
<dependencies> <dependencies>
@ -86,37 +92,37 @@
<dependency> <dependency>
<groupId>net.sourceforge.jtransforms</groupId> <groupId>net.sourceforge.jtransforms</groupId>
<artifactId>jtransforms</artifactId> <artifactId>jtransforms</artifactId>
<version>2.4.0</version>
<version>${lib.jtransforms.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>commons-cli</groupId> <groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId> <artifactId>commons-cli</artifactId>
<version>1.2</version>
<version>${lib.commons-cli.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>commons-codec</groupId> <groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId> <artifactId>commons-codec</artifactId>
<version>1.9</version>
<version>${lib.commons-codec.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>javax.transaction</groupId> <groupId>javax.transaction</groupId>
<artifactId>jta</artifactId> <artifactId>jta</artifactId>
<version>1.1</version>
<version>${lib.jta.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>net.sf.ehcache</groupId> <groupId>net.sf.ehcache</groupId>
<artifactId>ehcache</artifactId> <artifactId>ehcache</artifactId>
<version>2.8.0</version>
<version>${lib.ehcache.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.typesafe.akka</groupId> <groupId>com.typesafe.akka</groupId>
<artifactId>akka-actor_2.10</artifactId> <artifactId>akka-actor_2.10</artifactId>
<version>2.1.1</version>
<version>${lib.akka.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.typesafe.akka</groupId> <groupId>com.typesafe.akka</groupId>
<artifactId>akka-slf4j_2.10</artifactId> <artifactId>akka-slf4j_2.10</artifactId>
<version>2.1.1</version>
<version>${lib.akka.version}</version>
</dependency> </dependency>
</dependencies> </dependencies>
@ -126,6 +132,7 @@
<directory>src/main/resources</directory> <directory>src/main/resources</directory>
<filtering>true</filtering> <filtering>true</filtering>
<includes> <includes>
<include>**/*.conf</include>
<include>**/*.properties</include> <include>**/*.properties</include>
<include>**/*.info</include> <include>**/*.info</include>
</includes> </includes>
@ -134,6 +141,7 @@
<directory>src/main/resources</directory> <directory>src/main/resources</directory>
<filtering>false</filtering> <filtering>false</filtering>
<excludes> <excludes>
<exclude>**/*.conf</exclude>
<exclude>**/*.properties</exclude> <exclude>**/*.properties</exclude>
<exclude>**/*.info</exclude> <exclude>**/*.info</exclude>
</excludes> </excludes>
@ -144,6 +152,7 @@
<directory>src/test/resources</directory> <directory>src/test/resources</directory>
<filtering>true</filtering> <filtering>true</filtering>
<includes> <includes>
<include>**/*.conf</include>
<include>**/*.properties</include> <include>**/*.properties</include>
<include>**/*.info</include> <include>**/*.info</include>
</includes> </includes>
@ -152,6 +161,7 @@
<directory>src/test/resources</directory> <directory>src/test/resources</directory>
<filtering>false</filtering> <filtering>false</filtering>
<excludes> <excludes>
<exclude>**/*.conf</exclude>
<exclude>**/*.properties</exclude> <exclude>**/*.properties</exclude>
<exclude>**/*.info</exclude> <exclude>**/*.info</exclude>
</excludes> </excludes>

62
src/main/resources/application.conf

@ -1,4 +1,62 @@
//Default Properties File
//Image Tools version: ${project.version}
version = "${build-version}"
akka { akka {
event-handlers = ["akka.event.slf4j.Slf4jEventHandler"]
loglevel = "DEBUG"
loggers = ["akka.event.slf4j.Slf4jLogger"]
loglevel = "INFO"
}
//Default App Settings
app {
timed = false
log {
debug = false
info = false
error = true
}
engine {
//Concurrency Settings
concurrent {
similarity.limit = 15
processing.limit = 15
}
}
}
#Default Image Settings
image {
//images must be 90% similar
differenceThreshold = 0.90
//control generation of hashes for new images.
hash {
precision=64
}
ahash {
use = true
weight = 0.70
precision = 8
tolerence = 8
}
dhash {
use = true
weight = 0.85
precision = 8
tolerence = 8
}
phash {
//set to false if hashing images is taking too long
use = true
weight = 1.0
precision = 32
tolerence = 8
}
}
//Default Thumbnail Settings
thumbnail {
//Directory where to store thumbnails
directory = ".cache/thumbnails/"
//Size of the thumbnail to generate and store
size = 128
} }

61
src/test/resources/application.conf

@ -1,4 +1,63 @@
//Default Properties File
//Image Tools version: ${project.version}
version = "${build-version}"
akka { akka {
event-handlers = ["akka.event.slf4j.Slf4jEventHandler"]
loggers = ["akka.event.slf4j.Slf4jLogger"]
loglevel = "DEBUG" loglevel = "DEBUG"
} }
//Default App Settings
app {
timed = false
log {
debug = true
info = true
error = true
}
engine {
//Concurrency Settings
concurrent {
similarity.limit = 15
processing.limit = 15
}
}
}
#Default Image Settings
image {
//images must be 90% similar
differenceThreshold = 0.90
//control generation of hashes for new images.
hash {
precision=64
}
ahash {
use = true
weight = 0.70
precision = 8
tolerence = 8
}
dhash {
use = true
weight = 0.85
precision = 8
tolerence = 8
}
phash {
//set to false if hashing images is taking too long
use = true
weight = 1.0
precision = 32
tolerence = 8
}
}
//Default Thumbnail Settings
thumbnail {
//Directory where to store thumbnails
directory = ".cache/thumbnails/"
//Size of the thumbnail to generate and store
size = 128
}

18
todo

@ -0,0 +1,18 @@
Move over to Logback for the backend
-Convert the configuration file
-Convert the AppConfig to configure basic logging
Profile and improve performance for the ConcurrentEngine when looking for similarities.
-SynchronousEngine is about 2.5x faster currently for finding similarities
-ConcurrentEngine actors for finding similarities are not CPU constrained and need to be
Convert app configuration format from a java properties to a typesafehub:config
-Rewrite properties in new format (JSON)
-Rewrite PropertiesLoader to use the new format
Add functionality to both engines
-Recursive directory scanning
-Determine how to handle similarites there... All images or just per folder
-Move files to new locations
-Rename new files based on their MD5
Add functionality to ImageService
-Cache thumbnails
-Generate thumbnails
-Move caching of images into the ImageService
Loading…
Cancel
Save