From 23fb18b3f14a1b396f0c61f2ea4559fec758cb1d Mon Sep 17 00:00:00 2001 From: pvtroshin Date: Tue, 11 Oct 2011 11:37:05 +0000 Subject: [PATCH] Google Analytics statistics is added git-svn-id: link to svn.lifesci.dundee.ac.uk/svn/barton/ptroshin/JABA2@4651 e3abac25-378b-4346-85de-24260fe3988d --- .classpath | 1 + WEB-INF/lib/compbio-ga-1.0.jar | Bin 0 -> 11684 bytes build.xml | 1 + conf/GA.properties | 8 +- .../compbio/engine/conf/PropertyHelperManager.java | 4 +- lib/src/compbio-ga-src-1.0.jar | Bin 0 -> 10859 bytes webservices/compbio/ws/server/GAUtils.java | 82 ++++++++++++++++++++ webservices/compbio/ws/server/LocalURL.txt | 3 - webservices/compbio/ws/server/MafftWS.java | 6 +- webservices/compbio/ws/server/MuscleWS.java | 6 +- webservices/compbio/ws/server/ProbconsWS.java | 9 +-- webservices/compbio/ws/server/TcoffeeWS.java | 7 +- webservices/compbio/ws/server/WSUtil.java | 14 +++- 13 files changed, 117 insertions(+), 24 deletions(-) create mode 100644 WEB-INF/lib/compbio-ga-1.0.jar create mode 100644 lib/src/compbio-ga-src-1.0.jar create mode 100644 webservices/compbio/ws/server/GAUtils.java delete mode 100644 webservices/compbio/ws/server/LocalURL.txt diff --git a/.classpath b/.classpath index 9651a3f..c9f256a 100644 --- a/.classpath +++ b/.classpath @@ -13,5 +13,6 @@ + diff --git a/WEB-INF/lib/compbio-ga-1.0.jar b/WEB-INF/lib/compbio-ga-1.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..378a99a4bc67d1bc7fc960f5e261ccc0623942ef GIT binary patch literal 11684 zcmb7qWmud`wlxHIC(u}McL`2#cXzkO-8HxbcM0z9?oM#`27&~);PU0n%sFS~%-p&6 ztA3uh`p4d@x~lh6d+&EG1!)LKc(C7wn7@?3-@g3g0S5*NCM&8UNG~ZT#`ro02Bz>2 zQ&=$3U#9)H(-|YbOi97Pz%YN!f0)V&%1MfeDyuNaiUr5i%0V!rig-!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/GA.properties @@ -1,14 +1,14 @@ -# This file contains settings for Google Analytics Statistics Engine. +# This file contains settings for Google Analytics (GA) Statistics Engine. # Feel free to remove/delete this file if you do not want us to see that you # use JABAWS. However, we would appreciate it greatly if you could leave it on. -# We depend on the JABAWS usage statistics for our future funding. We do not -# collect any personal data. That data that we submit is as follows +# JABAWS usage statistics are collected for funding and reporting purposes, and +# no private information is collected. The data sent by JABAWS is as follows: # 1) The IP address of the JABAWS server machine. # 2) The name of the web service that was called. # 3) A few details of the system such as java version, user language, color depth, screen # resolution and character encoding. -# All calls to statistics are completed asynchronously and create very little +# All calls to GA are completed asynchronously and create very little # overhead. Thus they do not influence the server response time or performance. # Values yes or true = enable GA, any other value will disable it diff --git a/engine/compbio/engine/conf/PropertyHelperManager.java b/engine/compbio/engine/conf/PropertyHelperManager.java index fb35362..b3d2b66 100644 --- a/engine/compbio/engine/conf/PropertyHelperManager.java +++ b/engine/compbio/engine/conf/PropertyHelperManager.java @@ -61,8 +61,10 @@ public final class PropertyHelperManager { + "Engine.cluster.properties"); File execProp = getResourceFromClasspath(confDir + "Executable.properties"); + File gaProp = getResourceFromClasspath(confDir + + "GA.properties"); ph = new PropertyHelper(locEngineProp, clustEngineProp, - execProp); + execProp, gaProp); } catch (IOException e) { log.warn( "Cannot read property files! Reason: " diff --git a/lib/src/compbio-ga-src-1.0.jar b/lib/src/compbio-ga-src-1.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..fad0585e443e66afa6742774fa245e1911b37b26 GIT binary patch literal 10859 zcmaia1yEes+AZ#`4Z++vic31T| zUA5NQr*~KNXG>lR90CsHw(r?X3s@1mq0(v8E0`jlz0* zaXGWQ9L0@)b9?0ZK9_+4sp25ZgYv#OufveszE9CJ3=XPk+X~-1)@i<<*l|8u&SBF^ zOCDXbI<@7U4%%MpbNBWt30@m@$#|k&Syi+suU)-4?_`6!U^iH@4F@6TN;KzYNG$7J zOrtAYv0i$=#|^AAc^yJa!g{ybm*CXa5gBje+fgZySl zjV42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?Jt(<-&p^#y8X}8-^^}*QGNeO{oVTZ2m9a6Z-4OfeJlTk{b$epA6B@( z4gm(_-v;!5sp|i#mj5_}-@neUXZln1pX2(!%l_M7;4fKz)c=MuKRCM>@Qtm(*M@|M@*BKf`s~w0Qc*)00si$MfuyO{{v~msA2#B literal 0 HcmV?d00001 diff --git a/webservices/compbio/ws/server/GAUtils.java b/webservices/compbio/ws/server/GAUtils.java new file mode 100644 index 0000000..e4473d1 --- /dev/null +++ b/webservices/compbio/ws/server/GAUtils.java @@ -0,0 +1,82 @@ +package compbio.ws.server; + +import java.net.InetAddress; +import java.net.UnknownHostException; + +import org.apache.log4j.Logger; + +import compbio.engine.conf.PropertyHelperManager; +import compbio.stat.ga.AnalyticsConfigData; +import compbio.stat.ga.GoogleAnalyticsTracker; +import compbio.util.PropertyHelper; +import compbio.util.Util; +import compbio.ws.client.Services; + +public class GAUtils { + + // MODIFY BEFORE RELEASE! + final static String VERSION_TYPE = "WAR"; + + private static final Logger log = Logger.getLogger(GAUtils.class); + + static PropertyHelper PROP_HELPER = PropertyHelperManager + .getPropertyHelper(); + + private static AnalyticsConfigData config = new AnalyticsConfigData( + "UA-26161150-1"); + + private static GoogleAnalyticsTracker TRACKER = new GoogleAnalyticsTracker( + config); + + public static final boolean IS_GA_ENABLED = isGoogleAnalyticsEnabled(); + + private static String SERVER_ADDRESS = getServerIP(); + + private static boolean isGoogleAnalyticsEnabled() { + String val = PROP_HELPER.getProperty("enable.ga"); + if (Util.isEmpty(val)) { + return false; + } + val = val.trim(); + if ("yes".equalsIgnoreCase(val) || "true".equalsIgnoreCase(val)) { + return true; + } + return false; + } + + private static String getServerIP() { + String IP = "127.0.0.1"; + if (!anonymizeIP()) { + try { + InetAddress localAddrIP = InetAddress.getLocalHost(); + IP = localAddrIP.getCanonicalHostName(); + } catch (UnknownHostException ignored) { + } + } + return IP; + } + + private static boolean anonymizeIP() { + String val = PROP_HELPER.getProperty("anonymize.ip"); + if (Util.isEmpty(val)) { + return false; + } + if ("yes".equalsIgnoreCase(val) || "true".equalsIgnoreCase(val)) { + return true; + } + return false; + } + + static void reportUsage(Services service) { + String service_name = "UNKNOWN"; + if (service == null) { + log.warn("GA: Services was NULL!"); + } else { + service_name = service.toString(); + } + TRACKER.trackPageViewFromReferrer("JABAWS/2.0/" + service_name, + service_name, "http://www.compbio.dundee.ac.uk", + SERVER_ADDRESS, VERSION_TYPE); + TRACKER.resetSession(); + } +} diff --git a/webservices/compbio/ws/server/LocalURL.txt b/webservices/compbio/ws/server/LocalURL.txt deleted file mode 100644 index aa70a6f..0000000 --- a/webservices/compbio/ws/server/LocalURL.txt +++ /dev/null @@ -1,3 +0,0 @@ -http://localhost:7979/Clustal -http://localhost:8080/ws/Clustal -http://localhost:7979/Muscle diff --git a/webservices/compbio/ws/server/MafftWS.java b/webservices/compbio/ws/server/MafftWS.java index 63de39b..f293ae7 100644 --- a/webservices/compbio/ws/server/MafftWS.java +++ b/webservices/compbio/ws/server/MafftWS.java @@ -66,7 +66,7 @@ public class MafftWS implements MsaWS { throws JobSubmissionException { WSUtil.validateFastaInput(sequences); ConfiguredExecutable confMafft = init(sequences); - return WSUtil.align(sequences, confMafft, null, "align", getLimit("")); + return WSUtil.align(sequences, confMafft, log, "align", getLimit("")); } ConfiguredExecutable init(List dataSet) @@ -88,7 +88,7 @@ public class MafftWS implements MsaWS { Mafft.KEY_VALUE_SEPARATOR); log.info("Setting parameters: " + params); confMafft.addParameters(params); - return WSUtil.align(sequences, confMafft, null, "customAlign", + return WSUtil.align(sequences, confMafft, log, "customAlign", getLimit("")); } @@ -106,7 +106,7 @@ public class MafftWS implements MsaWS { // particular preset is not found Limit limit = getLimit(preset.getName()); - return WSUtil.align(sequences, confMafft, null, "presetAlign", limit); + return WSUtil.align(sequences, confMafft, log, "presetAlign", limit); } @SuppressWarnings("unchecked") diff --git a/webservices/compbio/ws/server/MuscleWS.java b/webservices/compbio/ws/server/MuscleWS.java index 95cef8b..a9d6c52 100644 --- a/webservices/compbio/ws/server/MuscleWS.java +++ b/webservices/compbio/ws/server/MuscleWS.java @@ -66,7 +66,7 @@ public class MuscleWS implements MsaWS { throws JobSubmissionException { WSUtil.validateFastaInput(sequences); ConfiguredExecutable confMuscle = init(sequences); - return WSUtil.align(sequences, confMuscle, null, "align", getLimit("")); + return WSUtil.align(sequences, confMuscle, log, "align", getLimit("")); } ConfiguredExecutable init(List sequences) @@ -90,7 +90,7 @@ public class MuscleWS implements MsaWS { List params = WSUtil.getCommands(options, Muscle.KEY_VALUE_SEPARATOR); confMuscle.addParameters(params); - return WSUtil.align(sequences, confMuscle, null, "customAlign", + return WSUtil.align(sequences, confMuscle, log, "customAlign", getLimit("")); } @@ -105,7 +105,7 @@ public class MuscleWS implements MsaWS { ConfiguredExecutable confMuscle = init(sequences); confMuscle.addParameters(preset.getOptions()); Limit limit = getLimit(preset.getName()); - return WSUtil.align(sequences, confMuscle, null, "presetAlign", limit); + return WSUtil.align(sequences, confMuscle, log, "presetAlign", limit); } @SuppressWarnings("unchecked") diff --git a/webservices/compbio/ws/server/ProbconsWS.java b/webservices/compbio/ws/server/ProbconsWS.java index 3d80cad..71f4730 100644 --- a/webservices/compbio/ws/server/ProbconsWS.java +++ b/webservices/compbio/ws/server/ProbconsWS.java @@ -63,8 +63,8 @@ public class ProbconsWS implements MsaWS { throws JobSubmissionException { WSUtil.validateFastaInput(sequences); ConfiguredExecutable confProbcons = init(sequences); - return WSUtil.align(sequences, confProbcons, null, "align", - getLimit("")); + return WSUtil + .align(sequences, confProbcons, log, "align", getLimit("")); } ConfiguredExecutable init(List dataSet) @@ -86,7 +86,7 @@ public class ProbconsWS implements MsaWS { Probcons.KEY_VALUE_SEPARATOR); log.info("Setting parameters:" + params); confProbcons.addParameters(params); - return WSUtil.align(sequences, confProbcons, null, "customAlign", + return WSUtil.align(sequences, confProbcons, log, "customAlign", getLimit("")); } @@ -101,8 +101,7 @@ public class ProbconsWS implements MsaWS { ConfiguredExecutable confProbcons = init(sequences); confProbcons.addParameters(preset.getOptions()); Limit limit = getLimit(preset.getName()); - return WSUtil - .align(sequences, confProbcons, null, "presetAlign", limit); + return WSUtil.align(sequences, confProbcons, log, "presetAlign", limit); } @SuppressWarnings("unchecked") diff --git a/webservices/compbio/ws/server/TcoffeeWS.java b/webservices/compbio/ws/server/TcoffeeWS.java index e9bda4d..086d870 100644 --- a/webservices/compbio/ws/server/TcoffeeWS.java +++ b/webservices/compbio/ws/server/TcoffeeWS.java @@ -67,8 +67,7 @@ public class TcoffeeWS implements MsaWS { throws JobSubmissionException { WSUtil.validateFastaInput(sequences); ConfiguredExecutable confTcoffee = init(sequences); - return WSUtil - .align(sequences, confTcoffee, null, "align", getLimit("")); + return WSUtil.align(sequences, confTcoffee, log, "align", getLimit("")); } ConfiguredExecutable init(List sequences) @@ -101,7 +100,7 @@ public class TcoffeeWS implements MsaWS { Tcoffee.KEY_VALUE_SEPARATOR); log.info("Setting parameters:" + params); confTcoffee.addParameters(params); - return WSUtil.align(sequences, confTcoffee, null, "customAlign", + return WSUtil.align(sequences, confTcoffee, log, "customAlign", getLimit("")); } @@ -116,7 +115,7 @@ public class TcoffeeWS implements MsaWS { ConfiguredExecutable confTcoffee = init(sequences); confTcoffee.addParameters(preset.getOptions()); Limit limit = getLimit(preset.getName()); - return WSUtil.align(sequences, confTcoffee, null, "presetAlign", limit); + return WSUtil.align(sequences, confTcoffee, log, "presetAlign", limit); } @SuppressWarnings("unchecked") diff --git a/webservices/compbio/ws/server/WSUtil.java b/webservices/compbio/ws/server/WSUtil.java index fb96de8..7341989 100644 --- a/webservices/compbio/ws/server/WSUtil.java +++ b/webservices/compbio/ws/server/WSUtil.java @@ -38,6 +38,8 @@ import compbio.metadata.Limit; import compbio.metadata.LimitExceededException; import compbio.metadata.Option; import compbio.metadata.ResultNotAvailableException; +import compbio.ws.client.Services; +import compbio.ws.client.ServicesUtil; public final class WSUtil { @@ -106,9 +108,19 @@ public final class WSUtil { compbio.runner.Util.writeInput(sequences, confExec); AsyncExecutor engine = Configurator.getAsyncEngine(confExec); String jobId = engine.submitJob(confExec); + reportUsage(confExec, logger); return jobId; } + static void reportUsage(ConfiguredExecutable confExec, Logger logger) { + if (GAUtils.IS_GA_ENABLED) { + Services service = ServicesUtil.getServiceByRunner(confExec + .getExecutable().getClass()); + GAUtils.reportUsage(service); + logger.info("Reporting GA usage for " + service); + } + } + public static String analize(List sequences, ConfiguredExecutable confExec, Logger log, String method, Limit limit) throws JobSubmissionException { @@ -120,7 +132,7 @@ public final class WSUtil { compbio.runner.Util.writeInput(sequences, confExec); AsyncExecutor engine = Configurator.getAsyncEngine(confExec); String jobId = engine.submitJob(confExec); - + reportUsage(confExec, log); return jobId; } -- 1.7.10.2