FE/BE Protocol, Tom? - Mailing list pgsql-hackers

From pgsql@mohawksoft.com
Subject FE/BE Protocol, Tom?
Date
Msg-id 1168.68.162.220.216.1050602129.squirrel@mail.mohawksoft.com
Whole thread Raw
Responses Re: FE/BE Protocol, Tom?
List pgsql-hackers
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?



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: For the ametures. (related to "Are we losing momentum?")
Next
From: Rod Taylor
Date:
Subject: Re: FE/BE Protocol, Tom?