Thread: FE/BE Protocol, Tom?

FE/BE Protocol, Tom?

From
pgsql@mohawksoft.com
Date:
I just had an idea today, sort of inspired by some work I am doing and by a
patch to bind which uses an external database.

You'll think I'm nuts, but hear me out.

What if the BE protocol was constructed as a loadable plugin?

The plugin handles the "front" of the PostgreSQL backend. It reads from a
socket and handles a request. There should also be the ability to have
multiple BE protocols loaded at once. Each on their own port, of course.

So the postmaster process listens to a number of sockets for connections,
when a socket is accepted, its protocol handler is pulled out of a hash
table or array, a new backend is spawned (or perhaps a new thread is created
in some unlikely future PG), and control is passed to the BE protocol handler.

It is the job of the BE handler to read a socket and write the results. The
postmaster process need not care about what the backend handler does. The
only issue would be to try to document a process for creating a custom BE
protocol handler.

This would allow PG to incorporate a web services protocol. It would allow
servers like email, DNS, etc. to be constructed from within PostgreSQL.

What do you think?



Re: FE/BE Protocol, Tom?

From
Rod Taylor
Date:
> This would allow PG to incorporate a web services protocol. It would allow
> servers like email, DNS, etc. to be constructed from within PostgreSQL.
>
> What do you think?

While I could see PostgreSQL being used as a Soap server, I think it
needs to be independent of the backend itself.  Perhaps a lightweight
frontend daemon with connection pooling, etc. capabilities and
translates to the standard protocol.

--
Rod Taylor <rbt@rbt.ca>

PGP Key: http://www.rbt.ca/rbtpub.asc