Re: Postgres and Java Microservices Multithreading

From: Scott Ribe <scott_ribe(at)elevated-dev(dot)com>
To: "<soumik(dot)bhattacharjee(at)kpn(dot)com>" <soumik(dot)bhattacharjee(at)kpn(dot)com>
Cc: peter(at)osdev(dot)nl, pgsql-admin(at)lists(dot)postgresql(dot)org, pgsql-admin(at)postgresql(dot)org
Subject: Re: Postgres and Java Microservices Multithreading
Date: 2019-12-05 13:33:37
Message-ID: 2CB4B3C9-F43F-49D8-A594-93DBE99EF514@elevated-dev.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-docs

"parallel query" refers to parallelism within a single query, not at all related to the questions you're asking

connection pooler is something you might want to investigate, but that really depends on total number of connections across your microservices, and how connection pooling within your clients might be handled. If your clients make persistent connections, and they're not making all that many (maybe not more than 10-20 each across the 15), you wouldn't need it. If client connections come and go, or your clients use higher number of connections, then yes, put pgbouncer between clients & PG.

--
Scott Ribe
scott_ribe(at)elevated-dev(dot)com
https://www.linkedin.com/in/scottribe/

> On Dec 5, 2019, at 6:22 AM, <soumik(dot)bhattacharjee(at)kpn(dot)com> <soumik(dot)bhattacharjee(at)kpn(dot)com> wrote:
>
> Thanks Peter for your response, appreciate much.
>
> But I think the applications wont behave the same way as with Oracle.(We have 15+ Microservices running in Oracle with parallel processing)
>
> Below I just checked and testing in Test Env.
>
> https://www.postgresql.org/docs/12/parallel-query.html
> https://dzone.com/articles/postgresql-connection-pooling-part-1-pros-amp-cons
>
>
> If anyone have some use cases/real time project executions will be really helpful.
>
> Thanks..
>
>
>
> From: Peter M. Groen <peter(at)osdev(dot)nl>
> Sent: donderdag 5 december 2019 13:30
> To: Bhattacharjee, Soumik <soumik(dot)bhattacharjee(at)kpn(dot)com>; pgsql-admin(at)lists(dot)postgresql(dot)org; pgsql-admin(at)postgresql(dot)org
> Subject: Re: Postgres and Java Microservices Multithreading
>
> There is no reason why it shouldn't work as long as you use the database only as a data storage and all the java-stuff is as a separate layer in your software.
> Conversion problems can happen on data-types, constraints and/or triggers. If you use stored-procedures, those should be converted / rewritten as well..
>
> A bit of a strange question as this is basic datbase knowledge.... ??/ Esp. if you're working at KPN.
> --
> Open Systems Development B.V.
> Peter M. Groen
> Managing Director
> Rooseveltstraat 18-P
> 2321 BM Leiden
> +31 6 12 08 95 62
> email : peter(at)osdev(dot)nl
> skype : peter_m_groen
>
> On Thu, 2019-12-05 at 12:22 +0000, soumik(dot)bhattacharjee(at)kpn(dot)com wrote:
> Hi Experts,
>
> Few more details as discussed with application team.
>
> In parallel processing Application will create multiple threads towards our PG database to retrieve/ update data.
>
>
> • Application will send multiple parallel requests to DB on same table to SELECT data.
> • Application will send multiple parallel requests to DB on same table to UPDATE data
> • Application will send multiple parallel requests to DB on same table to INSERT data
>
>
>
> Thanks..
>
> From: Bhattacharjee, Soumik
> Sent: donderdag 5 december 2019 10:48
> To: 'pgsql-admin(at)lists(dot)postgresql(dot)org' <pgsql-admin(at)lists(dot)postgresql(dot)org>; 'pgsql-admin(at)postgresql(dot)org' <pgsql-admin(at)postgresql(dot)org>
> Subject: RE: Postgres and Java Microservices Multithreading
>
> Hi Experts,
>
> Please let me know if you have some use cases or documentations around this.
>
> Any response will help me a lot in this context.
>
> Thanks in advance.
>
>
> From: Bhattacharjee, Soumik
> Sent: woensdag 4 december 2019 14:34
> To: 'pgsql-admin(at)lists(dot)postgresql(dot)org' <pgsql-admin(at)lists(dot)postgresql(dot)org>; pgsql-admin(at)postgresql(dot)org
> Subject: Postgres and Java Microservices Multithreading
>
> Hi Experts,
>
> To set the context we are operating in Oracle 11g R2 and our applications are deployed in private cloud and all 15 + Java micro services are multithreaded.
>
> And we are doing database migration from Oracle 11gR2 to Postgres 12.
>
> So if anyone can share your experience or share some documentations/use cases if we can maintain the same configurations for Java micro services with multithreading as we are using in Oracle and same works in Postgres too? – (We just plan to switch the data source from Oracle to Postgres- will that work? )
>
>
> Thanks..

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Scott Ribe 2019-12-05 13:47:20 Postgres and Java Microservices Multithreading
Previous Message soumik.bhattacharjee 2019-12-05 13:22:10 RE: Postgres and Java Microservices Multithreading

Browse pgsql-docs by date

  From Date Subject
Next Message Scott Ribe 2019-12-05 13:47:20 Postgres and Java Microservices Multithreading
Previous Message soumik.bhattacharjee 2019-12-05 13:22:10 RE: Postgres and Java Microservices Multithreading