Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Casbah (MongoDB Scala Driver) v2.4.1 Released
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  16 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Brendan W. McAdams  
View profile   Translate to Translated (View Original)
 More options Jul 6 2012, 10:42 am
From: "Brendan W. McAdams" <bren...@10gen.com>
Date: Fri, 6 Jul 2012 10:42:44 -0400
Local: Fri, Jul 6 2012 10:42 am
Subject: Casbah (MongoDB Scala Driver) v2.4.1 Released

Only one minor fix in this release, to correct an import issue from the
previous release.

Fixed QueryDSL imports for “default” (com.mongodb.casbah.Imports) import so
that bareword ops like $set and $inc are available.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kocka Slavomir  
View profile  
 More options Jul 18 2012, 7:55 am
From: Kocka Slavomir <Slavomir.Ko...@anext.sk>
Date: Wed, 18 Jul 2012 11:55:26 +0000
Local: Wed, Jul 18 2012 7:55 am
Subject: Re: [casbah] Casbah (MongoDB Scala Driver) v2.4.1 Released

Hi,

I found 2.4.1 using search: http://search.maven.org/remotecontent?filepath=org/mongodb/casbah_2.9...

However when browsing directly on repo http://repo1.maven.org/maven2/org/mongodb/casbah-core_2.9.2/

the last version is 2.4.0… Any idea? Maven is not able to find 2.4.1 :/

Thanks...

Slavo

On Jul 6, 2012, at 4:42 PM, Brendan W. McAdams wrote:

  smime.p7s
3K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Roman Timushev  
View profile   Translate to Translated (View Original)
 More options Jul 18 2012, 10:03 am
From: Roman Timushev <rtim...@gmail.com>
Date: Wed, 18 Jul 2012 07:03:43 -0700 (PDT)
Local: Wed, Jul 18 2012 10:03 am
Subject: Re: [casbah] Casbah (MongoDB Scala Driver) v2.4.1 Released

It is available in Sonatype repo:
https://oss.sonatype.org/content/repositories/releases/org/mongodb/ca...

среда, 18 июля 2012 г., 15:55:26 UTC+4 пользователь Slavo написал:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Brendan W. McAdams  
View profile  
 More options Jul 18 2012, 10:14 am
From: "Brendan W. McAdams" <bren...@10gen.com>
Date: Wed, 18 Jul 2012 10:14:27 -0400
Local: Wed, Jul 18 2012 10:14 am
Subject: Re: [casbah] Casbah (MongoDB Scala Driver) v2.4.1 Released

We publish to Sonatype and do *not *have any control over the sync to
central maven.  Sometimes it is fast, sometimes it is slow.

I recommend pulling artifacts from sonatype for the "most up to date"


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
iwein.f...@gmail.com  
View profile  
 More options Oct 23 2012, 6:52 am
From: iwein.f...@gmail.com
Date: Tue, 23 Oct 2012 03:52:15 -0700 (PDT)
Local: Tues, Oct 23 2012 6:52 am
Subject: Re: Casbah (MongoDB Scala Driver) v2.4.1 Released

Is there a fix for the connection leaks that casbah is prone too? I've written my own template, and so has at least one other:

http://alvinalexander.com/scala/managing-mongodb-connections-casbah-d...

Is this still needed in 2.4.1?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Age Mooij  
View profile  
 More options Oct 24 2012, 4:13 am
From: Age Mooij <age.mo...@gmail.com>
Date: Wed, 24 Oct 2012 01:13:48 -0700 (PDT)
Local: Wed, Oct 24 2012 4:13 am
Subject: Re: Casbah (MongoDB Scala Driver) v2.4.1 Released

Interesting question!

AFAIK the MongoConnection class actually represents a connection pool so
what I've done so far is to initialize the MongoConnection and
MongoCollection instances when my repository actor is created and to make
sure the connection is closed when the actor dies. In other words, I'm
using a MongoConnection for potentially days/weeks/months.

If that is not the intended usage pattern and we should really be creating
and closing connections for every single interaction with Mongo, then I'd
love to hear about it.

Age


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Brendan W. McAdams  
View profile  
 More options Oct 24 2012, 5:14 am
From: "Brendan W. McAdams" <bwmcad...@gmail.com>
Date: Wed, 24 Oct 2012 02:14:06 -0700 (PDT)
Local: Wed, Oct 24 2012 5:14 am
Subject: Re: Casbah (MongoDB Scala Driver) v2.4.1 Released

I wasn't aware of any connection leaks, but I do find the current Java
driver connection pool to be atrocious.

I'm working on the 2.5.0 release this week, and I'll see if I can't
integrate a change along these lines to mitigate some of the pooling
problems.

I know in 2.9.x java driver  there have been some tweaks to the pool as
well that may fix some of this.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Age Mooij  
View profile   Translate to Translated (View Original)
 More options Oct 24 2012, 5:21 am
From: Age Mooij <age.mo...@gmail.com>
Date: Wed, 24 Oct 2012 11:21:25 +0200
Local: Wed, Oct 24 2012 5:21 am
Subject: Re: [casbah] Re: Casbah (MongoDB Scala Driver) v2.4.1 Released

Which of the two usage patterns would you advise? keeping a connection/collection open for long periods or opening them for each individual interaction with Mongo?

Age

On Oct 24, 2012, at 11:14, "Brendan W. McAdams" <bwmcad...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Brendan W. McAdams  
View profile  
 More options Oct 24 2012, 8:10 am
From: "Brendan W. McAdams" <bren...@10gen.com>
Date: Wed, 24 Oct 2012 15:10:48 +0300
Local: Wed, Oct 24 2012 8:10 am
Subject: Re: [casbah] Re: Casbah (MongoDB Scala Driver) v2.4.1 Released

I don't know, as I'm not aware of any actual connection leaks.

There is a pool, so it should return to the pool.  I doubt it's a Java
issue, there may be something I'm doing wrong on the Scala end that is
causing references to be held on ot… need tos ee if there's an easy way to
track that down.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Brendan W. McAdams  
View profile  
 More options Oct 24 2012, 8:49 am
From: "Brendan W. McAdams" <bren...@10gen.com>
Date: Wed, 24 Oct 2012 05:49:49 -0700 (PDT)
Local: Wed, Oct 24 2012 8:49 am
Subject: Re: Casbah (MongoDB Scala Driver) v2.4.1 Released

Reading through the linked post, I still don't see leakage happening.

Casbah provides you with a connection *POOL*, not an individual connection.

calling close() shuts down the *entire connection pool*.  This is the
"leakage" you are observing: The connection pool opens a pool of
connections, not an individual connection.

This is incorrect usage, and you should be utilizing the pool.  The
Connection objects will be released back into the pool when unused and you
don't need to close them manually.

I will update the docs to clarify that.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Iwein Fuld  
View profile  
 More options Oct 24 2012, 4:09 pm
From: Iwein Fuld <iwein.f...@gmail.com>
Date: Wed, 24 Oct 2012 22:09:46 +0200
Local: Wed, Oct 24 2012 4:09 pm
Subject: Re: Casbah (MongoDB Scala Driver) v2.4.1 Released
I just went over this with Age. It seems that indeed I was using the
pool in the wrong way (although we didn't reproduce that). I'll get
back to this if I can confirm a problem, otherwise I'd assume
everything is fine.

Thanks!

On Wed, Oct 24, 2012 at 2:49 PM, Brendan W. McAdams <bren...@10gen.com> wrote:

--
http://twitter.com/iweinfuld
http://www.linkedin.com/in/iweinfuld

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alvin Alexander  
View profile  
 More options Nov 13 2012, 2:22 pm
From: Alvin Alexander <devda...@gmail.com>
Date: Tue, 13 Nov 2012 11:22:44 -0800 (PST)
Local: Tues, Nov 13 2012 2:22 pm
Subject: Re: Casbah (MongoDB Scala Driver) v2.4.1 Released

FWIW, I wrote the article at alvinalexander.com mentioned near the
beginning of this discussion. I just figured out what I was doing wrong,
and posted a small sample project at Github that shows how to insert
objects into MongoDB with Casbah without leaking connections:

https://github.com/alvinj/ScalaCasbahConnections

There may be a better way to do this, but I want to use Casbah with
Scalatra, and using the MongoFactory and DAO approach in my Stock class
seems like what I want.

I just wanted to let you know that this was user error (me), and I'll
update or delete the article on alvinalexander.com tonight.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Iwein Fuld  
View profile  
 More options Nov 14 2012, 5:53 am
From: Iwein Fuld <iwein.f...@gmail.com>
Date: Wed, 14 Nov 2012 11:53:37 +0100
Local: Wed, Nov 14 2012 5:53 am
Subject: Re: Casbah (MongoDB Scala Driver) v2.4.1 Released
Kudos for posting back here. Please update the article (don't delete
it), you're not the first to fall into this and people (like me :p)
could really use the background.

Iwein

--
http://twitter.com/iweinfuld
http://www.linkedin.com/in/iweinfuld

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Age Mooij  
View profile  
 More options Nov 14 2012, 6:28 am
From: Age Mooij <age.mo...@gmail.com>
Date: Wed, 14 Nov 2012 12:28:14 +0100
Local: Wed, Nov 14 2012 6:28 am
Subject: Re: [casbah] Re: Casbah (MongoDB Scala Driver) v2.4.1 Released
This matches how I use Casbah. I set up the MongoConnection and the required MongoCollections when my repository (actor) gets created (started) and I just reuse the collections until it's time to shut down. Casbah should take care of the connection pooling.

One important thing to think about though is that by default Casbah (or the underlying Java driver) does not retry after a connection failure. so if there is a brief network outage between your code and the Mongo server, your app won;t be able to recover. There's an easy fix for this (which I think should be default): set the correct option:

MongoOptions(autoConnectRetry = true)

And then use one of the MongoConnection apply methods that supports the MongoOptions argument.

If, like me, you are using Casbah from an Akka actor, you should also make sure your actor is restartable without leaking connections. I do this by calling close() on my MongoConnection in the actor postStop method.

Age

PS
Congratulations to Brendan for the new job at TypeSafe! I'm still patiently waiting for Casbah 2.5 ;)

On Nov 14, 2012, at 11:53, Iwein Fuld <iwein.f...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
tigerfoot  
View profile  
 More options Nov 29 2012, 7:59 pm
From: tigerfoot <gzol...@gmail.com>
Date: Thu, 29 Nov 2012 16:59:58 -0800 (PST)
Local: Thurs, Nov 29 2012 7:59 pm
Subject: Re: Casbah (MongoDB Scala Driver) v2.4.1 Released

I read on Mongo's site that they've release a change that allows writes to
returns a status (especially an error) that wasn't present before.
They claimed to have support across the drivers.

Does this latest version of Casbah support this feature?

Thanks for the fantastic code!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Brendan W. McAdams  
View profile  
 More options Nov 30 2012, 2:14 am
From: "Brendan W. McAdams" <bren...@10gen.com>
Date: Fri, 30 Nov 2012 07:14:58 +0000
Local: Fri, Nov 30 2012 2:14 am
Subject: Re: [casbah] Re: Casbah (MongoDB Scala Driver) v2.4.1 Released

Writes always returned a status in casbah. See all write methods - they
return WriteResult and always have.

We simply changed the default. In previous releases you had to specifically
turn on "safe" writes.

In the new driver releases it is on by default *if you use the new
MongoClient class*. Casbah will eventually reflect this behavior.
On Nov 30, 2012 1:00 AM, "tigerfoot" <gzol...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »