Mongomatic, from Ben Myles, is a new Ruby library for accessing MongoDB documents.
The primary design goals of Mongomatic are simplicity and adherence to MongoDB conventions. Mongomatic is not an ActiveRecord clone and has been designed to fit nicely with the document-oriented nature of MongoDB.
The library requires ActiveSupport (2 or 3) and the Ruby MongoDB driver. Ruby versions 1.8.x and 1.9.x are supported. Other versions of Ruby may be supported but have not been tested.
Mongomatic can be installed from GitHub or via RubyGems.
Couchio , corporate sponsor of the CouchDB NoSQL database CouchDB, announced the first developer preview of the CouchDB SDK for Android devices.
According to Couchio, CouchDB on Android lets you build web-apps or native apps that take full advantage of CouchDB’s built-in, reliable peer-to-peer sync facilities.
Our goal is to provide you with a kick-ass SDK to build web- and native applications using CouchDB as the device-native data store. You will be able to use all your hard earned knowledge about web technologies to build apps on mobile devices.
This release does come with a few caveats. Namely the build is not yet optimized for performance on mobile devices, memory consumption or installation footprint. Couchio does say that they are working on this and many other areas in a future release.
The source code is available on GitHub. If you are on an Android device, you can install CouchDB SDK for Android directly from the Android Marketplace.
Check-0ut the new community-powered Redis Cookbook for recipes, how-to’s and more. The source is available on GitHub for you to fork and add your own contributions.
Project Voldemort is a scalable, highly available, NoSql, distributed, key/value store developed by Linkedin which in turn was inspired by Amazon’s Dynamo paper. The source code for Voldemort is currently hosted at GitHub.
Voldemort is written in Java and will run on any platform where Java can run. Getting Voldemort up and running on Linux/OSX or any other Posix based system is seamless. Running Voldemort is a little challenging, but not impossible.
Download and install the Java SDK and Apache Ant. Make sure the Apache Ant bin directory is on your path.
To verify that you have the Server HotSpot VM installed, open a command window and type the following:
java -server -version
You should see something like this:
java version "1.6.0_17"
Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
Java HotSpot(TM) Server VM (build 10.0-b22, mixed mode)
java version "1.6.0_17"Java(TM) SE Runtime Environment (build 1.6.0_17-b04)Java HotSpot(TM) Server VM (build 10.0-b22, mixed mode)
If you get an error about no ‘server’ JVM at c:\Program Files\Java\jreXXX\bin\server.jvm.dll, then you’ll need to monkey-patch your Java installation before continuing.
Java Monkey Patch
Locate the directory where your Java JDK was installed (eg C:\Program Files\Java\jdk1.6.0_06)
Copy the \jre\bin\server folder to JRE\bin folder (eg: C:\Program Files\Java\jre6\bin)
Verify your Java installation again by entering the following in a command window:
java -server -version
You should get output similar to the paragraph above.
Installing Voldemort
For this tutorial, download the latest stable release from the Voldemort repository at GitHub. For this tutorial, I used Release 0.80.1.
After the download is complete, extract the files to a directory of your choosing.
If you navigate to the bin directory, you’ll notice that the majority of script files are shell scripts. Well that’s not going to work on Windows. Time for some more monkey patching.
Shell Script Monkey Patching
For this tutorial I will convert the three scripts you need to get Voldemort up and running:
run-class.sh
voldemort-server.sh
voldermort-shell.sh
Copy or download the 3 files below and place them in your Voldemort \bin directory.
@echo off
REM
REM Copyright 2008-2009 LinkedIn, Inc
REM Copyright 2010 Erik Howard
REM
REM Licensed under the Apache License, Version 2.0 (the "License");
REM you may not use this file except in compliance with the License.
REM You may obtain a copy of the License at
REM
REM http://www.apache.org/licenses/LICENSE-2.0
REM
REM Unless required by applicable law or agreed to in writing, software
REM distributed under the License is distributed on an "AS IS" BASIS,
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
REM See the License for the specific language governing permissions and
REM limitations under the License.
REM
@echo off
if "%2" == "" goto :continue
echo USAGE: bin/voldemort-server.bat [voldemort_home]
goto :eof
:continue
setlocal
SET BASE_DIR=%~dp0..
SET CLASSPATH=.
for %%j in (%BASE_DIR%\dist\*.jar) do (call :append_classpath "%%j")
for %%j in (%BASE_DIR%\lib\*.jar) do (call :append_classpath "%%j")
goto :run
:append_classpath
set CLASSPATH=%CLASSPATH%;%1
goto :eof
:run
if "%VOLD_OPTS%" == "" set "VOLD_OPTS=-Xmx256M -server -Dcom.sun.management.jmxremote"
REM java -Xmx512M -cp %CLASSPATH% -Dcom.sun.management.jmxremote voldemort.server.VoldemortServer %1
java -Dlog4j.configuration=src/java/log4j.properties %VOLD_OPTS% -cp %CLASSPATH% voldemort.server.VoldemortServer %*
endlocal
:eof
Starting Voldemort
From a command prompt, go to the directory where you extracted Voldemort and type the following:
You should see several lines of information scroll by. Congratulations – you’ve just started Project Voldemort on Windows!
Testing Voldemort
Open up another command window and change to your Voldemort project directory.
Type the following to startup the Voldemort shell:
bin\voldemort-shell.bat test tcp://localhost:6666
With the shell up and running, lets try out a few commands
put "name" "erik"
get "name"
version(0:1) "erik"
delete "name"
get "name"
null
exit
k k thx bye
Conclusion
Before you can use the full functionality of Voldemort, you must first convert the remaining shell scripts in the bin directory to dos batch scripts. Good Luck.
Wanted to try out MongoDB, but have no time to install and configure it? Well head over to http://try.mongodb.org/ and play around with MongoDB within your browser.
Full-day April 30th event in San Francisco to explore development on the NoSql document database MongoDB
The conference features sessions on database internals, schema design, GridFS, replication, sharding, and more. In addition to these topics, attendees can learn about MongoDB in the real world through a series of presentations about production deployments at Justin.tv, Boxed Ice, Punchbowl Software, and Harmony App.
Small, hands-on, language-specific development workshops will take place alongside the presentation tracks. The Conference Center Lounge will also be available for the duration of the conference for hacking, networking, and discussion.
DATE: Friday April 30, 2010
TIME: 8:30am – 5:30pm
LOCATION: Bently Reserve, 400 Sansome Street, San Francisco, CA 94111
Like Twitter, Digg is moving from MySql to Cassandra.
Digg is moving away from MySql to a “NoSql” solution due to difficulties in building a “high performance, write intensive” application said John Quinn, VP of engineering in a recent blog post.
Growth has forced us into horizontal and vertical partitioning strategies that have eliminated most of the value of a relational database, while still incurring all the overhead
Most of Digg’s functionality has been reimplemented using Cassandra as it’s NoSql datastore. Digg previously ran experiments on their live site, which you can read more about here, replacing a high scale MySql system with a Cassandra alternative.
Digg has also made it’s own enhancements to Cassandra. “We’ve made massive performance improvements: increased comparitor speed, added better compaction threading, reduced logging overhead, added row-level caching and implemented multi-get capability. We’ve also implemented native atomic counters using Zookeeper” he says.
Quinn also mentions says “We’ve tested and improved the operational capabilities of Cassandra, upgrading its Rackaware capability, added slow query logging, improved the bulk import functionality and implemented Scribe support for improved logging”.