Skip to main content

Posts

Showing posts from April, 2016

Sonic MQ

Load Balancing load balancing allows a broker to be redirected to another broker for the purpose of redistributing the load. this will help getting rid of overloading a single broker. Load balancing algorithm is connection count load balancing algorithm. the gateway broker maps the client specified url to acceptor socket. acceptor socket is mapped to a broker. load balancing agent uses acceptor name to redirect the connection. the gateway broker is the controller of broker group for round robin load balancing. the gateway broker is where client initially connects. Backup Broker A backup broker is deployed to provide failover if its primary broker fails. private and backup broker will communicate to replicate data and monitor each others status and detect failures.

Lucene Indexing

Lucene is rich and powerful text search library written in java. Lucene provides full-text indexing in databases and various other objects. lucene will add content to a full text index, then we can perform queries on this index . lucene is able to generate fast results because, it will search an index instead of searching a text directly. this is similar to searching a book and getting a page number, using index number at the end of the book unlike searching each page. In Lucene document is the unit of index. index contains one or more documents. document contains one or more fields. for example set of users can be considered as an index. a single user record will be a document and user name address can be fields. Indexing is adding documents to Index via an IndexWriter. Searching is retrieving documents from an Index via an IndexSearcher. A searching query will be passed to IndexSearcher. Queries can be performed via Lucene Query Language.