FE/BE Protocol, Tom?

From: pgsql(at)mohawksoft(dot)com
To: pgsql-hackers(at)postgresql(dot)org
Subject: FE/BE Protocol, Tom?
Date: 2003-04-17 17:55:29
Message-ID: 1168.68.162.220.216.1050602129.squirrel@mail.mohawksoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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?

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Matthew T. O'Connor 2003-04-17 19:46:44 Re: For the ametures. (related to "Are we losing momentum?")
Previous Message Rod Taylor 2003-04-17 17:45:25 Re: FE/BE Protocol, Tom?