You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Matt <dr...@gmail.com> on 2017/08/29 02:57:39 UTC

Reusing CacheStores connections?

Hi,

Following the documentation I came up with the following code, but now I
wonder if this is really the way to go with CacheStores.

https://gist.github.com/fdc613759d4d7a845631e0b71aafa559

Using a profiler I found out openConnection() is executed more than 1000
times, on this method alone my application spend 10% of  the time.

Shouldn't Ignite be reusing the connections somehow? Any way to improve
this?

An example with better performance would be really helpful.

Cheers,
Matt

Re: Reusing CacheStores connections?

Posted by afedotov <al...@gmail.com>.
Hi,

Please consider using some kind of pooled DataSource instead of using
simple DriverManager.getConnection for obtaining a connection.

Kind regards,
Alex.

On Tue, Aug 29, 2017 at 5:57 AM, Matt-2 [via Apache Ignite Users] <
ml+s70518n16468h42@n6.nabble.com> wrote:

> Hi,
>
> Following the documentation I came up with the following code, but now I
> wonder if this is really the way to go with CacheStores.
>
> https://gist.github.com/fdc613759d4d7a845631e0b71aafa559
>
> Using a profiler I found out openConnection() is executed more than 1000
> times, on this method alone my application spend 10% of  the time.
>
> Shouldn't Ignite be reusing the connections somehow? Any way to improve
> this?
>
> An example with better performance would be really helpful.
>
> Cheers,
> Matt
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> http://apache-ignite-users.70518.x6.nabble.com/Reusing-
> CacheStores-connections-tp16468.html
> To start a new topic under Apache Ignite Users, email
> ml+s70518n1h65@n6.nabble.com
> To unsubscribe from Apache Ignite Users, click here
> <http://apache-ignite-users.70518.x6.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1&code=YWxleGFuZGVyLmZlZG90b2ZmQGdtYWlsLmNvbXwxfC0xMzYxNTU0NTg=>
> .
> NAML
> <http://apache-ignite-users.70518.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Reusing-CacheStores-connections-tp16468p16484.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.