public inbox for [email protected]  
help / color / mirror / Atom feed
the wire protocol
4+ messages / 4 participants
[nested] [flat]

* the wire protocol
@ 2019-01-19 13:56 Catonano <[email protected]>
  2019-01-19 15:16 ` Re: the wire protocol Dmitry Igrishin <[email protected]>
  2019-01-22 03:25 ` Re: the wire protocol John DeSoi <[email protected]>
  0 siblings, 2 replies; 4+ messages in thread

From: Catonano @ 2019-01-19 13:56 UTC (permalink / raw)
  To: [email protected]

Hello,

there's this Python project using the so called wire protocol (as far as I
understand)

https://github.com/MagicStack/asyncpg

I'm caressing the idea to create a GNU Guile based project that does the
same thing

But I don't understand how they manage to get the connection to Postgresql,
their code is too complicated for me

Do they use the C library, libpq ?
Or do they manage the connection in their own code ?

Should I use libpq ?
Or should I manage the connection in my own code ?

In Guile I can manipulate sockets and the semantics are pretty close to the
ones of plain C

So even an example in C would be fine

I'd like to use a Unix socket

I hope this was the right mailing list for this question

If it's not, i apologize

Thanks in advance


^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: the wire protocol
  2019-01-19 13:56 the wire protocol Catonano <[email protected]>
@ 2019-01-19 15:16 ` Dmitry Igrishin <[email protected]>
  1 sibling, 0 replies; 4+ messages in thread

From: Dmitry Igrishin @ 2019-01-19 15:16 UTC (permalink / raw)
  To: Catonano <[email protected]>; +Cc: [email protected]

сб, 19 янв. 2019 г. в 16:56, Catonano <[email protected]>:
>
> Hello,
>
> there's this Python project using the so called wire protocol (as far as I understand)
>
> https://github.com/MagicStack/asyncpg
>
> I'm caressing the idea to create a GNU Guile based project that does the same thing
>
> But I don't understand how they manage to get the connection to Postgresql, their code is too complicated for me
>
> Do they use the C library, libpq ?
> Or do they manage the connection in their own code ?
AFAIK, asyncpg implements the frontend/backend protocol described here:
https://www.postgresql.org/docs/current/protocol.html

> Should I use libpq ?
Not necessary.

> Or should I manage the connection in my own code ?
You can implement the protocol yourself in pure Guile. It's up to you to decide.

> In Guile I can manipulate sockets and the semantics are pretty close to the ones of plain C
>
> So even an example in C would be fine
>
> I'd like to use a Unix socket
To do it, first of all you need to familiarize with the
frontend/backend protocol mentioned above.




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: the wire protocol
  2019-01-19 13:56 the wire protocol Catonano <[email protected]>
@ 2019-01-22 03:25 ` John DeSoi <[email protected]>
  2019-01-22 08:06   ` Re: the wire protocol Tony Locke <[email protected]>
  1 sibling, 1 reply; 4+ messages in thread

From: John DeSoi @ 2019-01-22 03:25 UTC (permalink / raw)
  To: Catonano <[email protected]>; +Cc: [email protected]


> On Jan 19, 2019, at 7:56 AM, Catonano <[email protected]> wrote:
> 
> there's this Python project using the so called wire protocol (as far as I understand)
> 
> https://github.com/MagicStack/asyncpg
> 
> I'm caressing the idea to create a GNU Guile based project that does the same thing
> 
> But I don't understand how they manage to get the connection to Postgresql, their code is too complicated for me


Here is a Common Lisp library that uses sockets and the wire protocol to work with Postgres.

https://github.com/marijnh/Postmodern

Should be very close to what you want to do with Guile/Scheme.

John DeSoi, Ph.D.





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: the wire protocol
  2019-01-19 13:56 the wire protocol Catonano <[email protected]>
  2019-01-22 03:25 ` Re: the wire protocol John DeSoi <[email protected]>
@ 2019-01-22 08:06   ` Tony Locke <[email protected]>
  0 siblings, 0 replies; 4+ messages in thread

From: Tony Locke @ 2019-01-22 08:06 UTC (permalink / raw)
  To: John DeSoi <[email protected]>; +Cc: Catonano <[email protected]>; [email protected]

Hi, pg8000 is a pure-python implementation of the wire protocol:

https://github.com/tlocke/pg8000

Might be of help.

-Tony

On Tue, 22 Jan 2019, 03:25 John DeSoi <[email protected] wrote:

>
> > On Jan 19, 2019, at 7:56 AM, Catonano <[email protected]> wrote:
> >
> > there's this Python project using the so called wire protocol (as far as
> I understand)
> >
> > https://github.com/MagicStack/asyncpg
> >
> > I'm caressing the idea to create a GNU Guile based project that does the
> same thing
> >
> > But I don't understand how they manage to get the connection to
> Postgresql, their code is too complicated for me
>
>
> Here is a Common Lisp library that uses sockets and the wire protocol to
> work with Postgres.
>
> https://github.com/marijnh/Postmodern
>
> Should be very close to what you want to do with Guile/Scheme.
>
> John DeSoi, Ph.D.
>
>
>


^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2019-01-22 08:06 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-01-19 13:56 the wire protocol Catonano <[email protected]>
2019-01-19 15:16 ` Dmitry Igrishin <[email protected]>
2019-01-22 03:25 ` John DeSoi <[email protected]>
2019-01-22 08:06   ` Tony Locke <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox