p2p search engine 'orbis

Post on 08-May-2015

996 Views

Category:

Technology

3 Downloads

Preview:

Click to see full reader

TRANSCRIPT

P2P検索エンジンORBISについて

Dec. 19, 2011@ceeflyer (Yusuke FUJISAKA)

CyberAgent, inc.

ORBISとは

• リアルタイム検索エンジン

• 自律分散検索エンジン• Peer to Peer

制作の経緯• もともとはTwitter-like serviceの検索

• リアルタイム

• スモールスタート・スケーラブル• ある種の割り切り

• 分散型

• P2Pの考え方

ORBISのapplicationHTTP Servlet

Morpho-parser

P2P Server

Indexing Memory

Index/Search Queue

ノード構成• 比較的小規模(~1,000台程度)を想定

• フルメッシュネットワークを構成

• Master-Slaveの差なし

• ノード間の通信はMessagePack-RPC(http://msgpack.org)を利用

ノード構成

Node 310.0.0.6

Node 110.0.0.4 Node 2

10.0.0.5

ノード追加

New comer10.0.0.7

connect?node=10.0.0.6

ノード追加

ノード追加

生存確認

Beacon

生存確認

?

生存確認

×

復帰○

Beacon

復帰

インデックスフィールド:Content (形態素解析対象)

xxx...

Appendix (形態素解析しない)yyy...

Flag (属性)zzz...

インデックス

IndexTitle: xxxxxxxx

Text: xxxxxxxx...

インデックス

Hash: 0x51234567

0x61234567

0x77654321

0xFA000123

0x54400000

IndexTitle: xxxxxxxx

Text: xxxxxxxx...

インデックス

Hash: 0x51234567

0x61234567

0x77654321

0xFA000123

0x54400000

IndexTitle: xxxxxxxx

Text: xxxxxxxx...

インデックス

形態素解析

Title: xxxxxxxText: xxxxxxx...

Hash: 0x51234567

IndexTitle: xxxxxxxx

Text: xxxxxxxx...

Content

インデックス

ContentContent ContentContentContent ContentContentContent ContentContentContent ContentContentContent

Term Term

Index IDIndex IDIndex ID Index ID Index ID

Content

インデックス

ContentContent Content ContentContentContent ContentContentContent Content

Term Term

Index IDIndex IDIndex ID Index ID Index ID

max: 100

Content

インデックス

ContentContent Content ContentContentContent ContentContentContent Content

Term Term

Index IDIndex IDIndex ID Index ID Index ID

転置インデックスを一定数で固定する

max: 100

インデックス

• 直接インデックスデータに変換

• 各単語に対して転置インデックス数を一定数で固定• 「投稿日時が新しいものだけ検索」という割り切り

インデックス

• 一定のレプリケーション数で分散保存• Hashing replication

検索

SearchQuery: xxxxxx

From: 1 Length: 10

検索

Result

Intersection

検索

SearchQuery: xxxxxx

From: 1 Length: 10

?

検索

Result

あるだけ返す

検索

• 既知の利用可能な全ノードから検索結果をとりまとめる

• フィルタをかけて結果出力

オープンソース

• Written in Java• Google code:

http://code.google.com/p/orbis

top related