NoSQL Benchmarks NoSQL use cases NoSQL Videos NoSQL Hybrid Solutions NoSQL Presentations Big Data Hadoop MapReduce Pig Hive Flume Oozie Sqoop HDFS ZooKeeper Cascading Cascalog BigTable Cassandra HBase Hypertable Couchbase CouchDB MongoDB OrientDB RavenDB Jackrabbit Terrastore Amazon DynamoDB Redis Riak Project Voldemort Tokyo Cabinet Kyoto Cabinet memcached Amazon SimpleDB Datomic MemcacheDB M/DB GT.M Amazon Dynamo Dynomite Mnesia Yahoo! PNUTS/Sherpa Neo4j InfoGrid Sones GraphDB InfiniteGraph AllegroGraph MarkLogic Clustrix CouchDB Case Studies MongoDB Case Studies NoSQL at Adobe NoSQL at Facebook NoSQL at Twitter



java: All content tagged as java in NoSQL databases and polyglot persistence

Jetty Session Clustering with Redis

The Jetty module jetty-session-redis uses Jedis, the Java client of Redis.

The configuration is completely transparent for a Webapp since you only need to modify the jetty.xml server configuration plus de webapp context files.

We have also implemented several serializers for your session attributes:

  • XStream
  • JSON
  • JBoss Serializer
  • JDK Serializer

No fancy stuff. Just a key-value store used the right way.

Code available on GitHub.

Original title and link: Jetty Session Clustering with Redis (NoSQL databases © myNoSQL)


Domain-model persistence with Morphia and MongoDB

Morphia is an Apache-licensed Google Code project that lets you persist, retrieve, delete, and query POJOs stored as documents in MongoDB. Morphia accomplishes this by providing a set of annotations and a wrapper around the Mongo Java driver. Morphia is conceptually similar to object-relational mappers such as Java Persistence API (JPA) or Java Data Objects (JDO) implementations. In this article, I’ll show how to use Morphia with a Java domain model mapped to MongoDB.

There are various ways to use MongoDB from Java and major MongoDB Java frameworks got compared.

Original title and link: Domain-model persistence with Morphia and MongoDB (NoSQL databases © myNoSQL)


NoSQL Databases in Grails and Spring Data

When checking the ☞ GitHub repository for Grails/GORM entities support for Riak MapReduce I have noticed multiple NoSQL integration projects[1] :

Grails/GORM and NoSQL databases:

  • Gemfire
  • JCR
  • MongoDB
  • Redis
  • Riak

Spring Data and NoSQL databases:

  • AppEngine
  • Cassandra
  • Gemfire
  • JCR
  • MongoDB
  • Redis
  • Riak

What seems to be missing is the Neo4j support in Spring Data, but maybe there’s a different repo for it.

Finally lots of love for NoSQL database in the Java land.

  1. At this time I’m not sure about each of these project status.  ()

Original title and link: NoSQL Databases in Grails and Spring Data (NoSQL databases © myNoSQL)

Neo4j Exceptions

As protocols, APIs are an extremely important part of the product and in case you have a rich API you might face criticism:

Now if a DeadlockDetectedException, HaCommunicationException, NotFoundException(thrown if a request is made to a node, relationship or property that does not exist), NotInTransactionException, ReadOnlyIndexException or TransactionFailureException were thrown, what would I really do about it? Nothing much, unfortunately. There is no way I could be smart and recover from these. At the most I’d log it and re-throw it.

A while back I had my part of suggestions related to Neo4j API and some of those became part of the Neo4j 1.2 roadmap. Problem is not that API is not fixable, but if you want to maintain backward compatibility things are quickly becoming complicated (or leading to ugly APIs).

Update: I’ve received a couple of comments that made me realize that most probably I haven’t expressed myself too well. So here is another attempt:

  1. it is normal for graph databases (and embedded databases) to have richer APIs. That’s why I’ve suggested to some of the graph databases to look more into providing it as a service, as that would reduce a bit the complexity
  2. it is normal that a complex API would not always be obvious and perfect to everybody
  3. it is great to get feedback about your API (in whatever form it comes, from “your API sucks” to “it’s good, but I’d like to be able to do this and that”) as it means that:
    • your users are getting deeper into your product and they care about it
    • you’ll have a chance to improve it over time so new users will find a better API
  4. maintaining backward compatibility for complex APIs is always a challenge and you must think about this as early as possible so you can follow the same policy over time

Original title and link: Neo4j Exceptions (NoSQL databases © myNoSQL)


CouchDB and Java

There are five different APIs recommended by CouchDB for use with Java. Each one uses a different API for JSON encode/decode, for logging and for the HTTP Stuff. If you want to use SSL, that’s also implemented differently

If they don’t want to support official libraries for CouchDB for every language, maybe they’ll do it for the ones where people are really confused on how to get started. Just maintaining a list as I do on NoSQL libraries for CouchDB is not enough.

Original title and link: CouchDB and Java (NoSQL databases © myNoSQL)


JOhm: Object-Hash Mapping for Redis and Java

In case you cannot use Redis with Grails, you might find JOhm interesting:

JOhm is a Java library for storing objects in Redis, a persistent key-value database.

Still in early versions, but looks promising.

Original title and link: JOhm: Object-Hash Mapping for Redis and Java (NoSQL databases © myNoSQL)


MongoDB and R using Java

It would be nice if there were an R package, along the lines of RMySQL, for MongoDB. For now there is not — so, how best to get data from a MongoDB database into R

I told you before about R and “data addicts”

Original title and link: MongoDB and R using Java (NoSQL databases © myNoSQL)


Redis and Java: JOhm

JOhm is a Object-hash mapping library for Java inspired on the awesome Ohm.

JOhm is a library for storing objects in Redis, a persistent key-value database.


Sounds quite similar to Redis support in Grails.

Original title and link: Redis and Java: JOhm (NoSQL databases © myNoSQL)

MongoDB: A Conversation Between Eliot Horowitz and Andy Glover

After ☞ posting an intro article on MongoDB with Java — we have a couple of these over here too, starting with this tutorial on MongoDB in Java and MongoDB Java frameworks compared — Andrew Glover ☞ publishes an audio recording of an interview with Eliot Horowitz, 10gen CTO and the first to have declared MongoDB is after MySQL and PostgreSQL users.

Original title and link: MongoDB: A Conversation Between Eliot Horowitz and Andy Glover (NoSQL databases © myNoSQL)

Redis: Implementing Auto Complete or How to build Trie on Redis

In the days the news are about instant searches and auto complete, Salvatore Sanfilippo (@antirez) shows how to use Redis sorted sets and corresponding commands (ZRANGE, ZRANK) to implement autocompletion:

The initial code in Ruby:

already got ported to Python:

and ☞ Java and ☞ PHP.

As Ilya Grigorik (@igrigorik) commented, this is building a ☞ Trie with Redis.

Original title and link: Redis: Implementing Auto Complete or How to build Trie on Redis (NoSQL databases © myNoSQL)