You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@storm.apache.org by "Huang, Roger" <ro...@visa.com> on 2014/01/15 17:38:03 UTC

experiences w/ storm-rdbms

Anyone have any experiences (pro/con) or tips for using storm-rdbms?
https://github.com/nathanmarz/storm-contrib/tree/master/storm-rdbms
thanks,
Roger


Re: experiences w/ storm-rdbms

Posted by Edison <xe...@gmail.com>.
the sample is only used for showing you how to use as a "sample". Better
use pool to manage the connection, and init the pool in the prepare method,
and get a connection in the execute method.

2014/1/17 Huang, Roger <ro...@visa.com>

>  Daniel,
>
> Thanks for the info!
>
> -Roger
>
>
>
>
>
> *From:* Danijel Schiavuzzi [mailto:dschiavu@gmail.com]
> *Sent:* Thursday, January 16, 2014 4:14 AM
> *To:* user@storm.incubator.apache.org
> *Subject:* Re: experiences w/ storm-rdbms
>
>
>
> I think it's a good starting point to modify or use as a template for
> writing a bolt for your RDBMS.
>
> However, if I remember correctly from when I was researching it,
> storm-rdbms had a bug -- it opened the JDBC connection in the bolt's
> constructor instead of the prepare() method, so in case the bolt gets
> reassigned to another Storm worker, things might not work correctly
> (because all Storm components, such as spouts or bolts, are distributed
> around the cluster in a serialized form). It's safer to setup the database
> connection in the prepare() method, which gets called by Storm whenever a
> new bolt instance is started on the cluster.
>
> If you need a way to access relational databases from the Trident API,
> take a look at storm-mysql or trident-mssql projects on Github.
>
>
>
> Best regards,
>
> Danijel Schiavuzzi
> www.schiavuzzi.com
>
>
>
> On Wed, Jan 15, 2014 at 5:38 PM, Huang, Roger <ro...@visa.com> wrote:
>
> Anyone have any experiences (pro/con) or tips for using storm-rdbms?
>
> https://github.com/nathanmarz/storm-contrib/tree/master/storm-rdbms
>
> thanks,
>
> Roger
>
>
>
>
>
>
> --
> Danijel Schiavuzzi
>

RE: experiences w/ storm-rdbms

Posted by "Huang, Roger" <ro...@visa.com>.
Daniel,
Thanks for the info!
-Roger


From: Danijel Schiavuzzi [mailto:dschiavu@gmail.com]
Sent: Thursday, January 16, 2014 4:14 AM
To: user@storm.incubator.apache.org
Subject: Re: experiences w/ storm-rdbms

I think it's a good starting point to modify or use as a template for writing a bolt for your RDBMS.

However, if I remember correctly from when I was researching it, storm-rdbms had a bug -- it opened the JDBC connection in the bolt's constructor instead of the prepare() method, so in case the bolt gets reassigned to another Storm worker, things might not work correctly (because all Storm components, such as spouts or bolts, are distributed around the cluster in a serialized form). It's safer to setup the database connection in the prepare() method, which gets called by Storm whenever a new bolt instance is started on the cluster.
If you need a way to access relational databases from the Trident API, take a look at storm-mysql or trident-mssql projects on Github.

Best regards,

Danijel Schiavuzzi
www.schiavuzzi.com<http://www.schiavuzzi.com>

On Wed, Jan 15, 2014 at 5:38 PM, Huang, Roger <ro...@visa.com>> wrote:
Anyone have any experiences (pro/con) or tips for using storm-rdbms?
https://github.com/nathanmarz/storm-contrib/tree/master/storm-rdbms
thanks,
Roger




--
Danijel Schiavuzzi

Re: experiences w/ storm-rdbms

Posted by Danijel Schiavuzzi <ds...@gmail.com>.
I think it's a good starting point to modify or use as a template for
writing a bolt for your RDBMS.

However, if I remember correctly from when I was researching it,
storm-rdbms had a bug -- it opened the JDBC connection in the bolt's
constructor instead of the prepare() method, so in case the bolt gets
reassigned to another Storm worker, things might not work correctly
(because all Storm components, such as spouts or bolts, are distributed
around the cluster in a serialized form). It's safer to setup the database
connection in the prepare() method, which gets called by Storm whenever a
new bolt instance is started on the cluster.

If you need a way to access relational databases from the Trident API, take
a look at storm-mysql or trident-mssql projects on Github.

Best regards,

Danijel Schiavuzzi
www.schiavuzzi.com



On Wed, Jan 15, 2014 at 5:38 PM, Huang, Roger <ro...@visa.com> wrote:

>  Anyone have any experiences (pro/con) or tips for using storm-rdbms?
>
> https://github.com/nathanmarz/storm-contrib/tree/master/storm-rdbms
>
> thanks,
>
> Roger
>
>
>



-- 
Danijel Schiavuzzi