Comments on: Inter-Matlab data transfer with memcached https://undocumentedmatlab.com/blog_old/inter-matlab-data-transfer-with-memcached Charting Matlab's unsupported hidden underbelly Thu, 02 May 2024 08:00:01 +0000 hourly 1 https://wordpress.org/?v=4.4.1 By: Mark Mikofskihttps://undocumentedmatlab.com/blog_old/inter-matlab-data-transfer-with-memcached#comment-330306 Wed, 27 Aug 2014 23:23:49 +0000 https://undocumentedmatlab.com/?p=4969#comment-330306 Turns out that the newer schooner/whalin client is even faster than the old whalin (meetup.com) client, and they say it’s faster than both spymemcached (from couchbase/membase) and xmemcached.

The missing libraries to make this run are in the lib folder of the zip file for the Memcached-Java-Client-3.0.0 which are the release page of Greg Whalin’s Github Memcached-Java-Client repo.

I was able to build this using jdk-7 by extracting the file, making a new bin folder at the same folder as lib and src, then navigating to src\main\java and executing the following:

C:\> "C:\Program Files\Java\jdk1.7.0_55\bin\javac.exe" -verbose -cp ..\..\..\lib\commons-pool-1.5.6.jar;..\..\..\lib\slf4j-api-1.6.1.jar;..\..\..\lib\slf4j-simple-1.6.1.jar -sourcepath com\schooner\MemCached\ -source 1.6 -target 1.6 -d ..\..\..\bin com\whalin\MemCached\*.java com\schooner\MemCached\*.java com\schooner\MemCached\command\*.java

Then back up to the new bin folder an executing this:

c:\> "C:\Program Files\java\jdk1.7.0_55\bin\jar.exe" -cvf Memcached-Java-Client.jar com\

It works almost exactly like the old meetup.com client, but the package is named “com.whalin.MemCached” instead. Also now you will also have to add “commons-pool-1.5.6.jar”, “slf4j-api-1.6.1.jar” and “slf4j-simple-1.6.1.jar” to your MATLAB Java classpath using javaaddpath().

]]>
By: Mark Mikofskihttps://undocumentedmatlab.com/blog_old/inter-matlab-data-transfer-with-memcached#comment-330303 Wed, 27 Aug 2014 22:31:11 +0000 https://undocumentedmatlab.com/?p=4969#comment-330303 In order to get rid of that message and output logging messages to a file configure the Apache.org log4j logger yourself by creating a FileAppender with the default layout and then configuring the BasicConfigurator.

>> fileAppender_withDefaultLayout = org.apache.log4j.FileAppender(org.apache.log4j.PatternLayout,'memcached.log')
fileAppender_withDefaultLayout =
org.apache.log4j.FileAppender@60f585a2
>> org.apache.log4j.BasicConfigurator.configure(fileAppender_withDefaultLayout)

To get rid of the logger message for xmemcached you will have to download SLF4J and add slf4j-api-X.Y.Z.jar, slf4j-simple-X.Y.Z.jar and slf4j-log4j-X.Y.Z.jar to your path first, where X.Y.Z is the SLF4J version, 1.7.7 as of 2014-08-27. Then configure log4j as above for com.meetup.memcached.

]]>