지난포스팅 에서 실시간검색에 대한 소개를 잠깐했었다. 특히, 트위터같은 SNS(Social Network Service) 검색에서 Real-time의 묘미를 살리지못하면 죽은검색이 되어버린다. 그래서 조사를하다가 루씬을 활용하여 만든 재미있는 오픈소스프로젝트를 찾았다.
zoie ( http://code.google.com/p/zoie/ )
세계적으로 유명한 비지니스 SNS Linked In(http://www.linkedin.com/)에 실시간검색으로 적용한 시스템을 공개한 것.
( http://blog.linkedin.com/2009/12/14/linkedin-faceted-search/ )
현재는 lucene 2.9.x 업데이트하면서 Zoie 2.0.0-rc2를 릴리즈한 상태이다. 기본 아키텍쳐는 아래그림과 같은데, FileDirectory + RAMDirectory 2개로 구성하여 총 3개의 Directory를 검색하게끔 만들어 실시간검색을 구현한 것이다. 더 자세한 설명은 http://invertedindex.blogspot.com/2009/04/zoie-realtime-search-and-indexing.html 특히, 성능에 최적화되어있는듯하다.
Zoie has been running in production at http://www.linkedin.com, in distributed mode, it is handling almost 40 million documents (or user profiles) in realtime and serving over 6 million requests a day with an average latency below 50ms.
소스코드를 분석하면서 차근차근 살펴보아야겠다.
덧1. 실시간인덱싱에서 변경,삭제되는 문서들을 루씬에서 어떻게 다루어야할지에 대한 재미있는 고민도 있구나. :)
http://invertedindex.blogspot.com/2009/08/index-optimization-for-realtime-search.html
덧2. 성능측정자료에서 사용했던 서버가 실제상용인듯한데, 물리메모리가……
http://code.google.com/p/zoie/wiki/Performance_Comparisons_for_ZoieLucene24ZoieLucene29LuceneNRT
