Need help for our thesis.

Lists: pgsql-hackers
From: MIka Santos <only_mhe(at)yahoo(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Need help for our thesis.
Date: 2003-07-05 01:56:10
Message-ID: 20030705015610.39003.qmail@web60004.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Gud day! We are currently having our thesis for our undergarduate course and this involoves the code of PostgreSQL. Basically, our thesis needs a modification of the existing code of the said database. As of now, our University has an existing online registration system which uses Postgre as their back end. But the problem is the existing one is not a distributed system. Our thesis adviser would like us to deal with the load balancing of the said online registration. He wanted a multidatabase querying. For example, we knew that the following statements are posible,
select *
from t1, t2., t3;
provided that t1 and t2, t3 are tables from a single database.
Our thesis is to make the following satatement legal
select *
from d1, d2, d3;
provided that d1 and d2, d3 are separate databases.
We are currently having our research about this problem and as beginners, we surely need help from experts like you. Any form of comments and suggestions will surely be appreciated by the group.
Thank you very much and hope to here from you.

---------------------------------
Do you Yahoo!?
Free online calendar with sync to Outlook(TM).


From: Richard Schilling <rschilling(at)nationalinformatics(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Need help for our thesis.
Date: 2003-07-06 06:26:44
Message-ID: 20030706062644.GC785@foghorn.rsmba.biz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

As luck would have I've put some thought into this problem before as
well. Having reviewed the code quite a bit, and played around with the
backend, my intuition tells me that the following would work.

Write a custom "cluster-aware" postmaster so it distributes queries to
various machines. Of course each machine would have to be running a
normal postmaster to receive the queries. And, the cluster-aware
postmaster would need to be informed of which machines to submit
queries to (e.g. listed in a configuration file). Queries could be
processed in the following ways:

* database management queries (e.g. create database, create
table, alter table, etc. . . ) would be distributed to every machine
* select queries would be distributed to every machine. The
cluster-aware postmaster would merge the results before delivering them
to the client.
* an insert query would go to one machine only, and the
cluster-aware postmaster could switch between the designated machines
after each insert. For example, given two machines, the first insert
would go to machine A, the second to machine B, etc . . .

Don't know if that's been tried, but that's where I would start.
Postgres' modular design of a postmaster and a backend would make this
relatively easy to do, because the only thing you might end up writing
is the one cluster-aware postmaster. If you end up doing this let me
know and if I have time I'll help out with the design/coding.

Richard Schilling
Lake Stevens, WA USA

On 2003.07.04 18:56 MIka Santos wrote:
> Gud day! We are currently having our thesis for our undergarduate
> course and this involoves the code of PostgreSQL. Basically, our
> thesis needs a modification of the existing code of the said database.
> As of now, our University has an existing online registration system
> which uses Postgre as their back end. But the problem is the existing
> one is not a distributed system. Our thesis adviser would like us to
> deal with the load balancing of the said online registration. He
> wanted a multidatabase querying. For example, we knew that the
> following statements are posible,
> select *
> from t1, t2., t3;
> provided that t1 and t2, t3 are tables from a single database.
> Our thesis is to make the following satatement legal
> select *
> from d1, d2, d3;
> provided that d1 and d2, d3 are separate databases.
> We are currently having our research about this problem and as
> beginners, we surely need help from experts like you. Any form of
> comments and suggestions will surely be appreciated by the group.
> Thank you very much and hope to here from you.
>
>
> ---------------------------------
> Do you Yahoo!?
> Free online calendar with sync to Outlook(TM).


From: "Shridhar Daithankar" <shridhar_daithankar(at)persistent(dot)co(dot)in>
To: pgsql-hackers(at)postgresql(dot)org, MIka Santos <only_mhe(at)yahoo(dot)com>
Subject: Re: Need help for our thesis.
Date: 2003-07-06 09:45:03
Message-ID: 3F083CF7.14475.7F644@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 4 Jul 2003 at 18:56, MIka Santos wrote:
> said online registration. He wanted a multidatabase querying. For example, we
> knew that the following statements are posible,
> select *
> from t1, t2., t3;
> provided that t1 and t2, t3 are tables from a single database.
> Ourthesis is to make the following satatement legal
> select *
> from d1, d2, d3;
> provided that d1 and d2, d3 are separate databases.

Would schema help you in anyways?

Bye
Shridhar

--
Van Roy's Law: An unbreakable toy is useful for breaking other toys.


From: Hans-Jürgen Schönig <postgres(at)cybertec(dot)at>
To:
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Need help for our thesis.
Date: 2003-07-06 09:47:48
Message-ID: 3F07F044.3080203@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hello Mika

Currently you can use dblink which queries a remote database and returns
the data as a table. This works nicely for PostgreSQL. There is also a
JDBC version in progress.
We have writte an Oracle version of dblink.

SELECT * FROM dblink('connectstr', 'SELECT ...') AS some_type;

This works nicely.
Still, this is not a full implementation of distributed queries - this
would be a huge project. There has already been some discussion about
that on the hackers list.

Regards,

Hans

Richard Schilling wrote:
> As luck would have I've put some thought into this problem before as
> well. Having reviewed the code quite a bit, and played around with the
> backend, my intuition tells me that the following would work.
>
> Write a custom "cluster-aware" postmaster so it distributes queries to
> various machines. Of course each machine would have to be running a
> normal postmaster to receive the queries. And, the cluster-aware
> postmaster would need to be informed of which machines to submit queries
> to (e.g. listed in a configuration file). Queries could be processed in
> the following ways:
>
> * database management queries (e.g. create database, create table,
> alter table, etc. . . ) would be distributed to every machine
> * select queries would be distributed to every machine. The
> cluster-aware postmaster would merge the results before delivering them
> to the client.
> * an insert query would go to one machine only, and the
> cluster-aware postmaster could switch between the designated machines
> after each insert. For example, given two machines, the first insert
> would go to machine A, the second to machine B, etc . . .
>
> Don't know if that's been tried, but that's where I would start.
> Postgres' modular design of a postmaster and a backend would make this
> relatively easy to do, because the only thing you might end up writing
> is the one cluster-aware postmaster. If you end up doing this let me
> know and if I have time I'll help out with the design/coding.
>
> Richard Schilling
> Lake Stevens, WA USA
>
>
>
> On 2003.07.04 18:56 MIka Santos wrote:
>
>> Gud day! We are currently having our thesis for our undergarduate
>> course and this involoves the code of PostgreSQL. Basically, our
>> thesis needs a modification of the existing code of the said database.
>> As of now, our University has an existing online registration system
>> which uses Postgre as their back end. But the problem is the existing
>> one is not a distributed system. Our thesis adviser would like us to
>> deal with the load balancing of the said online registration. He
>> wanted a multidatabase querying. For example, we knew that the
>> following statements are posible,
>> select *
>> from t1, t2., t3;
>> provided that t1 and t2, t3 are tables from a single database.
>> Our thesis is to make the following satatement legal
>> select *
>> from d1, d2, d3;
>> provided that d1 and d2, d3 are separate databases.
>> We are currently having our research about this problem and as
>> beginners, we surely need help from experts like you. Any form of
>> comments and suggestions will surely be appreciated by the group.
>> Thank you very much and hope to here from you.

--
Cybertec Geschwinde u Schoenig
Ludo-Hartmannplatz 1/14, A-1160 Vienna, Austria
Tel: +43/2952/30706; +43/664/233 90 75
www.cybertec.at, www.postgresql.at, kernel.cybertec.at