Thursday, February 26, 2015

Alfresco javascript debugger & spring-loaded

sometimes these can conflict if you configure the spring-loaded wrong or use ... so if the javascript debugger does not open, try to removing the spring-loaded in the JVM args

Alfresco - reusing printed xpaths in javascript console

I had to hand export import via javascript console some custom node properties (categories) and association, which was done via xpaths, because the nodeRefs store in source system did not match the targets. But i found out that i had to use this little encode function to make it work:

function enc(nonenc) {
    return jsonUtils.encodeJSONString(nonenc)

        .replace('\\/','/')
            .replace('\\','\\\\');
}


It encodes the international characters to escaped UTF like '\u00F8' instead of 'ΓΈ' and removes the "\/" and escapes backslashes.

Used it in export:
  var xpath = enc(node.qnamePath);

And in import:
  var nodes = search.xpathSearch(xpath);

Thursday, January 29, 2015

Compile Tomcat native (with all enabled) for Alfresco on Ubuntu 14.04

First add some need packages
sudo apt-get install fakeroot make gcc openssl libssl-dev  uuid uuid-dev libsctp1 libsctp-dev

Second compile APR
#download site http://apr.apache.org/
wget http://ftp.download-by.net/apache/apr/apr-1.5.1.tar.gz
tar xzvf apr-1.5.1.tar.gz
cd apr-1.5.1/
./configure --enable-nonportable-atomics --enable-threads --enable-posix-shm --enable-allocator-uses-mmap
make
make test
sudo make install


Third compile Tomcat native
#download http://tomcat.apache.org/download-native.cgi
wget http://ftp.download-by.net/apache/tomcat/tomcat-connectors/native/1.1.32/source/tomcat-native-1.1.32-src.tar.gz
tar xzvf tomcat-native-1.1.32-src.tar.gz
cd tomcat-native-1.1.32-src/jni/native
./configure --enable-ocsp --with-apr=/usr/local/apr --with-java-home=/usr/lib/jvm/java-7-openjdk-amd64
make
sudo make install


Fourth edit start script
Add this to you alfresco/catalina. For Loftux script in /etc/init/alfresco, for Alfresco installer in tomcat/bin/setenv.sh

export LD_LIBRARY_PATH='$LD_LIBRARY_PATH:/usr/local/apr/lib'

Oberve in Alfresco.log or catalina.out something like:
Jan 29, 2015 9:12:11 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: Loaded APR based Apache Tomcat Native library 1.1.32 using APR version 1.5.1.
Jan 29, 2015 9:12:11 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
Jan 29, 2015 9:12:11 PM org.apache.catalina.core.AprLifecycleListener initializeSSL
INFO: OpenSSL successfully initialized (OpenSSL 1.0.1f 6 Jan 2014)


Note: accept filters will only work on BSD

Wednesday, January 28, 2015

Huge datalists in Alfresco, yes you can (now)

Novem-IT, novem-it.dk presentation of enhancement to extended datalist module allowing huge datalists in excess of 100000

We do not know where the limit is .. The enhancement of the search could be a candidate for improving the search interface.

The magic is really an implementation of a count-query, that is the ability to perform an unlimited search returning no rows/results, but the number of matching nodes found (not returned nodes). Since we then know the total size of the query, the real data query need only do skip and fetch a single page (~50 nodes). SOLR4 performs super doing this, returning page results for given page in 0,4 seconds for webscript response with datalist size of 140000!


Thursday, January 22, 2015

Performance of new Aikau DocumentLibrary (5.0.c version)

The new Aikau 'framework' is very promising, I tested the new Documentlibrary, and found it to be very functional with some functions not working and with some performance problems on the client-side (approx. 2x on my machine), due to many dojo scope initializations (hitch function)





New Feautures seem to be:
- smother look and feel  and details in the presentation making it nicer to the eye
- paging is now added on top


Performance wise, here is the main cause:
.cache["dojo/_base/lang"]/</a.hitch

Calls:      3838        
Procent: 81.57%   
Time:      58090.815ms    

This is probably improved in Alfresco HEAD. A resolve could be to make bigger components / less reuse?




































Monday, January 19, 2015

contributed to extended datalists community module

as part of work for a customer we have done work on the https://github.com/deas/fme-alfresco-extdl extedned datalists module adding:
  • Paging
  • sorting across filter changes
  • fix filters not working
  • performance enhanced
Tested on Alfresco community 4.2.f

This way Novem-IT and our customer can contribute and gain from common future development on the module.

Work was done on this fork https://github.com/tass01024/fme-alfresco-extdl and awaiting a pull request to the main site.

started at Novem-IT

Thanks for a great time to Redpill-Linpro http://www.redpill-linpro.com, welcome to new experiences at Novem-IT http://www.novem-it.dk. Will continue work on Alfresco & Mule ESB, if the world does not pull me away :)