由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Database版 - Question 2: distributed database question?
相关主题
帮帮忙query estimation shows cost 900%?
关于Acess的简单问题oracle JDBC thin vs. JDBC OCI
一个SQL query的问题再问个excel问题吧
[转载] question about SQL in Access急,SQL2005, 怎么查过去一小时里run过的所有query?
[转载] Can anyone interpret this simple SQL?Late afternoon 腦不好使
请教一个query请教一个mssql的问题
A sql questionparameterized queries with no inputs
how to make query faster?Re: Recordset - I stuck! Help!
相关话题的讨论汇总
话题: question话题: p2话题: query话题: peer话题: database
进入Database版参与讨论
1 (共1页)
c*****t
发帖数: 1879
1
I am writing a P2P application which involves database query
of peers' data.
Say, P1 (peer 1) has following rows in table "serve"
abc1
abc2
ddd1
...
...
hundreds if not thousands of entries.
Peer 2 (P2) perform a broadcast query to all peers in a group
and expect to obtain the queries. I used a dumb query like:
SELECT * FROM serve
and P1 would return the entire table to P2. However, later
P2 does the query again, since P2 is interested in updates
b***s
发帖数: 14
2
one straight forward solution (probably not the best) would be creating
another table with peer information. Assume each peer has a unique ID,
the table can be as simple as:
peerID LatestTupleSentToThisPeer
===================================
Also, you need to make sure the clocks on each peer are synchronized
(google "lamport clock").

【在 c*****t 的大作中提到】
: I am writing a P2P application which involves database query
: of peers' data.
: Say, P1 (peer 1) has following rows in table "serve"
: abc1
: abc2
: ddd1
: ...
: ...
: hundreds if not thousands of entries.
: Peer 2 (P2) perform a broadcast query to all peers in a group

t***y
发帖数: 22
3
I am not so clear about your problem.
But I know there is a mechanism about cache coherent problems
If any P want to update, it should send a request to owner of the data, the owner
will invalid any other peers' copies and send "Yes or No" to P.
then P update it locally. If any p query the data from the owner, the owner then
will update the copy first and then send out the updated information..
It is similiar as the snoopy cache coherent problem.

【在 c*****t 的大作中提到】
: I am writing a P2P application which involves database query
: of peers' data.
: Say, P1 (peer 1) has following rows in table "serve"
: abc1
: abc2
: ddd1
: ...
: ...
: hundreds if not thousands of entries.
: Peer 2 (P2) perform a broadcast query to all peers in a group

t******t
发帖数: 51
4
This kind of queries are called 'continuous queries', search by this keyword
you can find a ton of information from the web.

【在 c*****t 的大作中提到】
: I am writing a P2P application which involves database query
: of peers' data.
: Say, P1 (peer 1) has following rows in table "serve"
: abc1
: abc2
: ddd1
: ...
: ...
: hundreds if not thousands of entries.
: Peer 2 (P2) perform a broadcast query to all peers in a group

1 (共1页)
进入Database版参与讨论
相关主题
Re: Recordset - I stuck! Help![转载] Can anyone interpret this simple SQL?
A SQL query never stop running is bothering me: help needed (转载)请教一个query
能不能用一个query 显示最高和最低A sql question
请教怎么来log duration of a MYSQL procedure?how to make query faster?
帮帮忙query estimation shows cost 900%?
关于Acess的简单问题oracle JDBC thin vs. JDBC OCI
一个SQL query的问题再问个excel问题吧
[转载] question about SQL in Access急,SQL2005, 怎么查过去一小时里run过的所有query?
相关话题的讨论汇总
话题: question话题: p2话题: query话题: peer话题: database