Skip to content

Commit

Permalink
new release strategy: the standard release is now built the same way …
Browse files Browse the repository at this point in the history
…as the pro release

a new release type was added: 'embedded' which is the same as the current standard release was
this will not have any effect to the next release 0.56, which will still a pro-release on public download
the transition the the new release strategy must be done now to enable automatic update by the updated in future releases

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4287 6c8d7289-2bf4-0310-a012-ef5d649a1542
  • Loading branch information
orbiter committed Dec 20, 2007
1 parent 1cb6e43 commit 52dd015
Show file tree
Hide file tree
Showing 7 changed files with 78 additions and 31 deletions.
5 changes: 3 additions & 2 deletions build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ javacSource=1.4
javacTarget=1.4

# Release Configuration
releaseVersion=0.556
releaseFile=yacy_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz
releaseVersion=0.557
stdReleaseFile=yacy_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz
embReleaseFile=yacy_emb_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz
proReleaseFile=yacy_pro_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz
releaseFileParentDir=yacy
releaseNr=$Revision$
Expand Down
33 changes: 29 additions & 4 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@

<!-- YaCy Release Date -->
<filter token="REPL_DATE" value="${DSTAMP}"/>
<filter token="REPL_RELEASE" value="${releaseFile}"/>
<filter token="REPL_RELEASE" value="${stdReleaseFile}"/>

<!-- YaCy Release Version number -->
<echo message="YaCy Version number: ${releaseVersion}" />
Expand Down Expand Up @@ -517,9 +517,9 @@
<!-- =======================================================================================================
making a release file for yacy
======================================================================================================= -->
<target name="dist" depends="copyMain4Dist" description="Compiling sources and make a release file ...">
<target name="distEmb" depends="copyMain4Dist" description="make for embedded YaCy (no extra parsers)">

<tar destfile="${release}/${releaseFile}" compression="gzip" defaultexcludes="yes" longfile="fail">
<tar destfile="${release}/${embReleaseFile}" compression="gzip" defaultexcludes="yes" longfile="fail">

<!-- packing all files into a gzipped tar -->
<tarfileset dir="${release_main}" prefix="${releaseFileParentDir}/" dirmode="${accessRightsDir}" mode="${accessRightsExecutable}">
Expand All @@ -536,8 +536,33 @@
<!-- deleting unneeded files -->
<delete dir="${release_main}"/>
</target>

<target name="dist" depends="compileExtensions,copyMain4Dist,copyExt4Dist" description="make for standard YaCy (same as pro)">
<tar destfile="${release}/${stdReleaseFile}" compression="gzip" defaultexcludes="yes" longfile="fail">

<!-- packing all files into a gzipped tar -->
<tarfileset dir="${release_main}" prefix="${releaseFileParentDir}/" dirmode="${accessRightsDir}" mode="${accessRightsExecutable}">
<include name="**/*.sh"/>
<include name="**/*.command"/>
</tarfileset>
<tarfileset dir="${release_main}" prefix="${releaseFileParentDir}/" dirmode="${accessRightsDir}" mode="${accessRightsFile}" >
<include name="**/*.*"/>
<exclude name="**/*.sh"/>
<exclude name="**/*.command"/>
</tarfileset>

<tarfileset dir="${release_ext}" prefix="${releaseFileParentDir}/" dirmode="${accessRightsDir}" mode="${accessRightsFile}" >
<include name="**/*.*"/>
</tarfileset>
</tar>

<target name="distPro" depends="compileExtensions,copyMain4Dist,copyExt4Dist">
<delete dir="${release_main}"/>
<delete dir="${release_ext}"/>
<delete dir="${release}/WINDOWS" failonerror="false" />
<delete dir="${release}/SPECS" failonerror="false" />
</target>

<target name="distPro" depends="compileExtensions,copyMain4Dist,copyExt4Dist" description="make for standard YaCy">
<tar destfile="${release}/${proReleaseFile}" compression="gzip" defaultexcludes="yes" longfile="fail">

<!-- packing all files into a gzipped tar -->
Expand Down
6 changes: 3 additions & 3 deletions htroot/ConfigUpdate_p.java
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public static serverObjects respond(httpHeader header, serverObjects post, serve
int relcount = 0;
while (i.hasNext()) {
release = (yacyVersion) i.next();
prop.put("candeploy_downloadedreleases_" + relcount + "_name", (release.proRelease ? "pro" : "standard") + "/" + ((release.mainRelease) ? "main" : "dev") + " " + release.releaseNr + "/" + release.svn);
prop.put("candeploy_downloadedreleases_" + relcount + "_name", (release.fullRelease ? "pro" : "standard") + "/" + ((release.mainRelease) ? "main" : "dev") + " " + release.releaseNr + "/" + release.svn);
prop.put("candeploy_downloadedreleases_" + relcount + "_file", release.name);
prop.put("candeploy_downloadedreleases_" + relcount + "_selected", (release == dflt) ? "1" : "0");
relcount++;
Expand All @@ -158,7 +158,7 @@ public static serverObjects respond(httpHeader header, serverObjects post, serve
i = releases.iterator();
while (i.hasNext()) {
release = (yacyVersion) i.next();
prop.put("candeploy_availreleases_" + relcount + "_name", (release.proRelease ? "pro" : "standard") + "/" + ((release.mainRelease) ? "main" : "dev") + " " + release.releaseNr + "/" + release.svn);
prop.put("candeploy_availreleases_" + relcount + "_name", (release.fullRelease ? "pro" : "standard") + "/" + ((release.mainRelease) ? "main" : "dev") + " " + release.releaseNr + "/" + release.svn);
prop.put("candeploy_availreleases_" + relcount + "_url", release.url.toString());
prop.put("candeploy_availreleases_" + relcount + "_selected", "0");
relcount++;
Expand All @@ -170,7 +170,7 @@ public static serverObjects respond(httpHeader header, serverObjects post, serve
i = releases.iterator();
while (i.hasNext()) {
release = (yacyVersion) i.next();
prop.put("candeploy_availreleases_" + relcount + "_name", (release.proRelease ? "pro" : "standard") + "/" + ((release.mainRelease) ? "main" : "dev") + " " + release.releaseNr + "/" + release.svn);
prop.put("candeploy_availreleases_" + relcount + "_name", (release.fullRelease ? "pro" : "standard") + "/" + ((release.mainRelease) ? "main" : "dev") + " " + release.releaseNr + "/" + release.svn);
prop.put("candeploy_availreleases_" + relcount + "_url", release.url.toString());
prop.put("candeploy_availreleases_" + relcount + "_selected", (release == dflt) ? "1" : "0");
relcount++;
Expand Down
19 changes: 15 additions & 4 deletions source/de/anomic/kelondro/kelondroRowCollection.java
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,6 @@ public final void insertUnique(int index, kelondroRow.Entry a) {
set(index, a);
}


public synchronized void addUnique(kelondroRow.Entry row) {
byte[] r = row.bytes();
addUnique(r, 0, r.length);
Expand Down Expand Up @@ -663,14 +662,26 @@ public static void test(int testsize) {
kelondroRow r = new kelondroRow(new kelondroColumn[]{
new kelondroColumn("hash", kelondroColumn.celltype_string, kelondroColumn.encoder_bytes, yacySeedDB.commonHashLength, "hash")},
kelondroBase64Order.enhancedCoder, 0);

kelondroRowCollection a = new kelondroRowCollection(r, testsize);
System.out.println("kelondroRowCollection test with size = " + testsize);
long t0 = System.currentTimeMillis();
random = new Random(0);
for (int i = 0; i < testsize; i++) a.add(randomHash().getBytes());
random = new Random(0);
for (int i = 0; i < testsize; i++) a.add(randomHash().getBytes());
a.sort();
a.uniq();
long t1 = System.currentTimeMillis();
System.out.println("create a : " + (t1 - t0) + " milliseconds, " + d(testsize, (t1 - t0)) + " entries/millisecond; a.size() = " + a.size());

kelondroRowCollection c = new kelondroRowCollection(r, testsize);
System.out.println("kelondroRowCollection test with size = " + testsize);
random = new Random(0);
long t0 = System.currentTimeMillis();
t0 = System.currentTimeMillis();
for (int i = 0; i < testsize; i++) {
c.add(randomHash().getBytes());
}
long t1 = System.currentTimeMillis();
t1 = System.currentTimeMillis();
System.out.println("create c : " + (t1 - t0) + " milliseconds, " + d(testsize, (t1 - t0)) + " entries/millisecond");
kelondroRowCollection d = new kelondroRowCollection(r, testsize);
for (int i = 0; i < testsize; i++) {
Expand Down
4 changes: 2 additions & 2 deletions source/de/anomic/plasma/plasmaSearchEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -581,12 +581,12 @@ public ResultEntry oneResult(int item) {
long sleeptime = Math.min(600, this.eventTime + (this.query.maximumTime / this.query.displayResults() * ((item % this.query.displayResults()) + 1)) - System.currentTimeMillis());
if (this.resultList.size() <= item + 10) sleeptime = Math.min(sleeptime + 300, 600);
if (sleeptime > 0) try {Thread.sleep(sleeptime);} catch (InterruptedException e) {}
System.out.println("+++DEBUG-oneResult+++ (1) sleeping " + sleeptime);
//System.out.println("+++DEBUG-oneResult+++ (1) sleeping " + sleeptime);

// then sleep until any result is available (that should not happen)
while ((this.resultList.size() <= item) && (anyWorkerAlive())) {
try {Thread.sleep(100);} catch (InterruptedException e) {}
System.out.println("+++DEBUG-oneResult+++ (2) sleeping " + 100);
//System.out.println("+++DEBUG-oneResult+++ (2) sleeping " + 100);
}

}
Expand Down
36 changes: 22 additions & 14 deletions source/de/anomic/yacy/yacyVersion.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public final class yacyVersion implements Comparator, Comparable {
public static final float YACY_ACCEPTS_RANKING_TRANSMISSION = (float) 0.414;
public static final float YACY_HANDLES_COLLECTION_INDEX = (float) 0.486;
public static final float YACY_POVIDES_REMOTECRAWL_LISTS = (float) 0.550;
public static final float YACY_STANDARDREL_IS_PRO = (float) 0.557;

// information about latest release, retrieved by other peers release version
public static double latestRelease = 0.1; // this value is overwritten when a peer with later version appears
Expand All @@ -71,7 +72,7 @@ public final class yacyVersion implements Comparator, Comparable {
public float releaseNr;
public String dateStamp;
public int svn;
public boolean proRelease, mainRelease;
public boolean fullRelease, mainRelease;
public yacyURL url;
public String name;

Expand All @@ -94,10 +95,13 @@ public yacyVersion(String release) {
// cut off tail
release = release.substring(0, release.length() - 7);
if (release.startsWith("yacy_pro_v")) {
proRelease = true;
fullRelease = true;
release = release.substring(10);
} else if (release.startsWith("yacy_emb_v")) {
fullRelease = false;
release = release.substring(10);
} else if (release.startsWith("yacy_v")) {
proRelease = false;
fullRelease = false;
release = release.substring(6);
} else {
throw new RuntimeException("release file name '" + release + "' is not valid, wrong prefix");
Expand All @@ -124,6 +128,10 @@ public yacyVersion(String release) {
} catch (NumberFormatException e) {
throw new RuntimeException("release file name '" + release + "' is not valid, '" + comp[2] + "' should be a integer number");
}
if ((this.releaseNr > YACY_STANDARDREL_IS_PRO) && (release.startsWith("yacy_v"))) {
// patch for new release strategy
this.fullRelease = true;
}
// finished! we parsed a relase string
}

Expand Down Expand Up @@ -152,7 +160,7 @@ public int hashCode() {

public String toAnchor() {
// generates an anchor string that can be used to embed in an html for direct download
return "<a href=" + this.url.toNormalform(true, true) + ">YaCy " + ((this.proRelease) ? "pro release" : "standard release") + " v" + this.releaseNr + ", SVN " + this.svn + "</a>";
return "<a href=" + this.url.toNormalform(true, true) + ">YaCy " + ((this.fullRelease) ? "standard/full release" : "embedded release") + " v" + this.releaseNr + ", SVN " + this.svn + "</a>";
}

// static methods:
Expand All @@ -161,9 +169,9 @@ public static final yacyVersion thisVersion() {
// construct a virtual release name for this release
if (thisVersion == null) {
plasmaSwitchboard sb = plasmaSwitchboard.getSwitchboard();
boolean pro = new File(sb.getRootPath(), "libx").exists();
boolean full = new File(sb.getRootPath(), "libx").exists();
thisVersion = new yacyVersion(
"yacy" + ((pro) ? "_pro" : "") +
"yacy" + ((full) ? "" : "_emb") +
"_v" + sb.getConfig("version", "0.1") + "_" +
sb.getConfig("vdate", "19700101") + "_" +
sb.getConfig("svnRevision", "0") + ".tar.gz");
Expand All @@ -177,7 +185,7 @@ public static final yacyVersion rulebasedUpdateInfo(boolean manual) {
// if false, null is returned
plasmaSwitchboard sb = plasmaSwitchboard.getSwitchboard();

// check if update process allowes update retrieve
// check if update process allows update retrieve
String process = sb.getConfig("update.process", "manual");
if ((!manual) && (!process.equals("auto"))) {
yacyCore.log.logInfo("rulebasedUpdateInfo: not an automatic update selected");
Expand All @@ -194,9 +202,9 @@ public static final yacyVersion rulebasedUpdateInfo(boolean manual) {

// check if we know that there is a release that is more recent than that which we are using
TreeSet[] releasess = yacyVersion.allReleases(true); // {0=promain, 1=prodev, 2=stdmain, 3=stddev}
boolean pro = new File(sb.getRootPath(), "libx").exists();
yacyVersion latestmain = (releasess[(pro) ? 0 : 2].size() == 0) ? null : (yacyVersion) releasess[(pro) ? 0 : 2].last();
yacyVersion latestdev = (releasess[(pro) ? 1 : 3].size() == 0) ? null : (yacyVersion) releasess[(pro) ? 1 : 3].last();
boolean full = new File(sb.getRootPath(), "libx").exists();
yacyVersion latestmain = (releasess[(full) ? 0 : 2].size() == 0) ? null : (yacyVersion) releasess[(full) ? 0 : 2].last();
yacyVersion latestdev = (releasess[(full) ? 1 : 3].size() == 0) ? null : (yacyVersion) releasess[(full) ? 1 : 3].last();
String concept = sb.getConfig("update.concept", "any");
String blacklist = sb.getConfig("update.blacklist", ".\\...[123]");

Expand Down Expand Up @@ -314,10 +322,10 @@ private static TreeSet[] allReleaseFrom(yacyURL url) {
try {
release = new yacyVersion(url);
//System.out.println("r " + release.toAnchor());
if ( release.proRelease && release.mainRelease) promainreleases.add(release);
if ( release.proRelease && !release.mainRelease) prodevreleases.add(release);
if (!release.proRelease && release.mainRelease) stdmainreleases.add(release);
if (!release.proRelease && !release.mainRelease) stddevreleases.add(release);
if ( release.fullRelease && release.mainRelease) promainreleases.add(release);
if ( release.fullRelease && !release.mainRelease) prodevreleases.add(release);
if (!release.fullRelease && release.mainRelease) stdmainreleases.add(release);
if (!release.fullRelease && !release.mainRelease) stddevreleases.add(release);
} catch (RuntimeException e) {
// the release string was not well-formed.
// that might have been another link
Expand Down
6 changes: 4 additions & 2 deletions yacy.init
Original file line number Diff line number Diff line change
Expand Up @@ -558,8 +558,10 @@ filterOutStopwordsFromTopwords=true
50_localcrawl_busysleep__pro=100
50_localcrawl_memprereq=4194304
50_localcrawl_isPaused=false
60_remotecrawlloader_idlesleep=10000
60_remotecrawlloader_busysleep=2000
60_remotecrawlloader_idlesleep=60000
60_remotecrawlloader_idlesleep__pro=10000
60_remotecrawlloader_busysleep=40000
60_remotecrawlloader_busysleep__pro=2000
60_remotecrawlloader_memprereq=2097152
60_remotecrawlloader_isPaused=false
62_remotetriggeredcrawl_idlesleep=10000
Expand Down

0 comments on commit 52dd015

Please sign in to comment.