pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedRPC via WebSockets.
3+ messages / 2 participants
[nested] [flat]
* RPC via WebSockets.
@ 2020-01-17 21:17 Dmitry Igrishin <dmitigr@gmail.com>
2020-01-18 02:54 ` Re: RPC via WebSockets. Nikolay Samokhvalov <samokhvalov@gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Igrishin @ 2020-01-17 21:17 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
Hello!
Who needs to talk to Postgres right from a WEB-browser via WebSockets? For
example, conveniently call storable functions/procedures?
Yes, i know about PostgREST. But I want to focus on RPC via WebSockets
without all these REST or "give me contents of that table by this URL"
stuff...
I'm thinking about writing an application which is simple to
install/deploy, simple to configure, with a connection pool built-in.
Ideally, one binary and one config in JSON format.
I need some feedback before start. So please don't hesitate to share any of
your thoughts/ideas/comments/scepticism here :-)
Thanks.
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: RPC via WebSockets.
2020-01-17 21:17 RPC via WebSockets. Dmitry Igrishin <dmitigr@gmail.com>
@ 2020-01-18 02:54 ` Nikolay Samokhvalov <samokhvalov@gmail.com>
2020-01-18 05:36 ` Re: RPC via WebSockets. Dmitry Igrishin <dmitigr@gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Nikolay Samokhvalov @ 2020-01-18 02:54 UTC (permalink / raw)
To: Dmitry Igrishin <dmitigr@gmail.com>; +Cc: pgsql-general@lists.postgresql.org
This is a very common task, definitely.
As for WebSockets, there is an addition to PostgREST, postgrest-websockets
https://github.com/diogob/postgres-websockets#readme
PostgREST is not only for "give me contents", you can write functions (in
any PL) and call them using POST /rpc/functionname.
There is also an attempt to build similar tool in Go (although I'm not sure
how popular and powerful it is): pREST https://github.com/prest/prest
Finally, there is a whole line of trendy and quite popular tools for having
GraphQL on top of Postgres, including but not limited to:
- PostGraphile https://github.com/graphile/postgraphile
- Hasura https://github.com/hasura/graphql-engine
- Prisma https://github.com/prisma/prisma
On Fri, Jan 17, 2020 at 13:18 Dmitry Igrishin <dmitigr@gmail.com> wrote:
> Hello!
>
> Who needs to talk to Postgres right from a WEB-browser via WebSockets? For
> example, conveniently call storable functions/procedures?
>
> Yes, i know about PostgREST. But I want to focus on RPC via WebSockets
> without all these REST or "give me contents of that table by this URL"
> stuff...
>
> I'm thinking about writing an application which is simple to
> install/deploy, simple to configure, with a connection pool built-in.
> Ideally, one binary and one config in JSON format.
>
> I need some feedback before start. So please don't hesitate to share any
> of your thoughts/ideas/comments/scepticism here :-)
>
> Thanks.
>
>
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: RPC via WebSockets.
2020-01-17 21:17 RPC via WebSockets. Dmitry Igrishin <dmitigr@gmail.com>
2020-01-18 02:54 ` Re: RPC via WebSockets. Nikolay Samokhvalov <samokhvalov@gmail.com>
@ 2020-01-18 05:36 ` Dmitry Igrishin <dmitigr@gmail.com>
0 siblings, 0 replies; 3+ messages in thread
From: Dmitry Igrishin @ 2020-01-18 05:36 UTC (permalink / raw)
To: Nikolay Samokhvalov <samokhvalov@gmail.com>; +Cc: pgsql-general@lists.postgresql.org
On Sat, 18 Jan 2020, 05:54 Nikolay Samokhvalov, <samokhvalov@gmail.com>
wrote:
> This is a very common task, definitely.
>
> As for WebSockets, there is an addition to PostgREST, postgrest-websockets
> https://github.com/diogob/postgres-websockets#readme
>
Yep, but as it's addition, it's not first class citizen and requires extra
steps to install it. While this is possible it's not user friendly. I would
like to fix this :-)
> PostgREST is not only for "give me contents", you can write functions (in
> any PL) and call them using POST /rpc/functionname.
>
This is what I want to emphasize on at first: calling functions, written in
any PL via JSON-RPC. There's also plans to execute any named queries
conveniently stored in text files, for example, foo.sql might contains:
-- @id my-query1
select :name::text
-- @id my-query2
select :age::integer
And then the caller can call these queries by ID, providing the parameter
values as simple as regular RPC call.
> There is also an attempt to build similar tool in Go (although I'm not
> sure how popular and powerful it is): pREST https://github.com/prest/prest
>
> Finally, there is a whole line of trendy and quite popular tools for
> having GraphQL on top of Postgres, including but not limited to:
> - PostGraphile https://github.com/graphile/postgraphile
> - Hasura https://github.com/hasura/graphql-engine
> - Prisma https://github.com/prisma/prisma
>
Thanks for the links!
> On Fri, Jan 17, 2020 at 13:18 Dmitry Igrishin <dmitigr@gmail.com> wrote:
>
>> Hello!
>>
>> Who needs to talk to Postgres right from a WEB-browser via WebSockets?
>> For example, conveniently call storable functions/procedures?
>>
>> Yes, i know about PostgREST. But I want to focus on RPC via WebSockets
>> without all these REST or "give me contents of that table by this URL"
>> stuff...
>>
>> I'm thinking about writing an application which is simple to
>> install/deploy, simple to configure, with a connection pool built-in.
>> Ideally, one binary and one config in JSON format.
>>
>> I need some feedback before start. So please don't hesitate to share any
>> of your thoughts/ideas/comments/scepticism here :-)
>>
>> Thanks.
>>
>>
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2020-01-18 05:36 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-01-17 21:17 RPC via WebSockets. Dmitry Igrishin <dmitigr@gmail.com>
2020-01-18 02:54 ` Nikolay Samokhvalov <samokhvalov@gmail.com>
2020-01-18 05:36 ` Dmitry Igrishin <dmitigr@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox