Re: RPC via WebSockets.

Поиск
Список
Период
Сортировка
От Dmitry Igrishin
Тема Re: RPC via WebSockets.
Дата
Msg-id CAAfz9KNzQx1BqqKnV9h+6w3dFdQvR5PYj75YW4AEeJwFG1Fi5A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: RPC via WebSockets.  (Nikolay Samokhvalov <samokhvalov@gmail.com>)
Список pgsql-general


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 
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:
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.

В списке pgsql-general по дате отправления:

Предыдущее
От: Nikolay Samokhvalov
Дата:
Сообщение: Re: RPC via WebSockets.
Следующее
От: stan
Дата:
Сообщение: A question about rules