Re: [Mojolicious] Re: What databases are you using with Mojolicious? (Poll)

2014-10-02 Thread hammondos
MongoDB (via official driver), now more inclined towards ElasticSearch - in 
the future probably Redis too

On Wednesday, 1 October 2014 18:55:12 UTC+1, nor...@googlemail.com wrote:

 CouchDB with Store::CouchDB (I am the author and use it in other non Mojo 
 projects too)

 no schema changes :)

 cheers
 Lenz

 On Wed, Oct 1, 2014 at 3:37 PM, senp...@gmail.com javascript: wrote:

 Right now: MySQL, DBD::mysql

 In the future probably SQLite and MongoDB.


 On Thursday, September 25, 2014 9:07:07 PM UTC+2, sri wrote:

 Lets have a little poll, what databases are you using with Mojolicious? 
 And which modules are you currently using to access them?

 --
 sebastian

  -- 
 You received this message because you are subscribed to the Google Groups 
 Mojolicious group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to mojolicious...@googlegroups.com javascript:.
 To post to this group, send email to mojol...@googlegroups.com 
 javascript:.
 Visit this group at http://groups.google.com/group/mojolicious.
 For more options, visit https://groups.google.com/d/optout.




-- 
You received this message because you are subscribed to the Google Groups 
Mojolicious group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.


[Mojolicious] Re: Connections pool to Redis for Mojo

2014-10-02 Thread Jan Henning Thorsen
Hi,

I'm not sure how to do that. You could create a shared connection in each 
fork and then re-use that, but I have no idea how that would actually work.

  helper redis = sub {
my $c = shift;
$c-app-defaults-{redis} ||= Mojo::Redis2-new;
  };

I've never tried that myself (since I don't like sharing connections 
between requests), but it should work if you're only doing simple things 
like get/set/...

Mojo::Redis2 doesn't have a pool, but it has a single connection pr 
operation type: blocking/non-blocking/pubsub/...

Patches are welcome though :) (I've written Mojo::Redis2 and contributed to 
Mojo::Redis) 


On Wednesday, October 1, 2014 9:09:51 PM UTC+2, Alberto Mijares wrote:

 Hi list, 

 I'd like to keep a fixed number of open connections to Redis and each 
 time the app is reached by a request, the query is send using one of 
 these previously opened connections. 

 Can you give me some ideas on how to achieve this in the Mojo way? Any 
 reference? 

 Thanks in advance, 

 Alberto Mijares 


-- 
You received this message because you are subscribed to the Google Groups 
Mojolicious group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.


[Mojolicious] Re: What databases are you using with Mojolicious? (Poll)

2014-10-02 Thread Daniel Böhringer
postgres

Am Donnerstag, 25. September 2014 21:07:07 UTC+2 schrieb sri:

 Lets have a little poll, what databases are you using with Mojolicious? 
 And which modules are you currently using to access them?

 --
 sebastian


-- 
You received this message because you are subscribed to the Google Groups 
Mojolicious group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.


Re: [Mojolicious] Re: Connections pool to Redis for Mojo

2014-10-02 Thread Alberto Mijares
Thank you Jan.

I'll give a try. Anyway, why don't you like shared connections? I
think it's a way to avoid the overhead of TCP, do you have a better
approach?

Regards,


Alberto Mijares



On Thu, Oct 2, 2014 at 7:57 AM, Jan Henning Thorsen
jan.henn...@thorsen.pm wrote:
 Hi,

 I'm not sure how to do that. You could create a shared connection in each
 fork and then re-use that, but I have no idea how that would actually work.

   helper redis = sub {
 my $c = shift;
 $c-app-defaults-{redis} ||= Mojo::Redis2-new;
   };

 I've never tried that myself (since I don't like sharing connections between
 requests), but it should work if you're only doing simple things like
 get/set/...

 Mojo::Redis2 doesn't have a pool, but it has a single connection pr
 operation type: blocking/non-blocking/pubsub/...

 Patches are welcome though :) (I've written Mojo::Redis2 and contributed to
 Mojo::Redis)


 On Wednesday, October 1, 2014 9:09:51 PM UTC+2, Alberto Mijares wrote:

 Hi list,

 I'd like to keep a fixed number of open connections to Redis and each
 time the app is reached by a request, the query is send using one of
 these previously opened connections.

 Can you give me some ideas on how to achieve this in the Mojo way? Any
 reference?

 Thanks in advance,

 Alberto Mijares

 --
 You received this message because you are subscribed to the Google Groups
 Mojolicious group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to mojolicious+unsubscr...@googlegroups.com.
 To post to this group, send email to mojolicious@googlegroups.com.
 Visit this group at http://groups.google.com/group/mojolicious.
 For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
Mojolicious group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.