<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7391971509741359542</id><updated>2024-08-28T16:26:08.922-07:00</updated><category term="ElasticSearch"/><category term="SOLR"/><category term="database"/><category term="datastore"/><title type='text'>Samant</title><subtitle type='html'>Blogs on my random interests in Software and Stocks.. which might help others...</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://samantstocks.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7391971509741359542/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://samantstocks.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Samant</name><uri>http://www.blogger.com/profile/09167931596259741004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>2</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7391971509741359542.post-80681505930529236</id><published>2014-08-15T00:31:00.004-07:00</published><updated>2014-08-15T00:31:25.751-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="database"/><category scheme="http://www.blogger.com/atom/ns#" term="datastore"/><category scheme="http://www.blogger.com/atom/ns#" term="ElasticSearch"/><category scheme="http://www.blogger.com/atom/ns#" term="SOLR"/><title type='text'> Can we use ElasticSearch or SOLR as a primary database </title><content type='html'>&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 20px; margin-bottom: 10px;&quot;&gt;
Enterprise applications esp. OLTP apps, do not generally use ElasticSearch or SOLR as a primary database but only as a &quot;Search Index datastore&quot; for Fast-Search/Read-Only operations. The intent of using it as a datastore is probably to demonstrate the fast search architecture and mechanism to do so.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 20px; margin-bottom: 10px;&quot;&gt;
If the web application is a use case like data aggregation, analytics, log analysis etc. using &lt;a href=&quot;http://www.elasticsearch.org/&quot; target=&quot;_blank&quot;&gt;ElasticSearch &lt;/a&gt;or &lt;a href=&quot;http://lucene.apache.org/solr/&quot; target=&quot;_blank&quot;&gt;SOLR &lt;/a&gt;as Datastore makes sense.&amp;nbsp;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Having said this -&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Yes, &lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;in general ElasticSearch or SOLR&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt; &lt;u&gt;can be&lt;/u&gt; used as a database.&lt;/span&gt;&amp;nbsp;But some things to consider before doing so are -&lt;/div&gt;
&lt;ul style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 20px; margin-bottom: 10px; margin-top: 0px;&quot;&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;ElasticSearch or SOLR&#39;s most common data access pattern is over http. Its not particularly great for batch querying. Furthermore, ElasticSearch or SOLR does NOT stream data. This means we have to be very thoughtful when we&amp;nbsp;design large scale data access patterns with ElasticSearch or SOLR. Pagination and progressive rendering kind of use cases, needs to be designed carefully, so we don&#39;t run into performance issues. Though there is good support for such use cases in&amp;nbsp;ElasticSearch or SOLR.&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Although SOLR scales horizontally (more machines, more cores, etc..) as well as vertically (more RAM, better machines, etc), its querying capabilities are severely limited compared to those of a mature RDBMS. Though, there are some excellent functions, like the field stats queries, which are quite convenient.&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Developers who are used to using relational databases will often have a steep learning curve for developing the right approach to building an application that uses ElasticSearch or SOLR for its large queries or state-full modifications.&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Enterprise level APM (&lt;a href=&quot;http://en.wikipedia.org/wiki/Application_performance_management&quot; style=&quot;background: 0px 0px; box-sizing: border-box; color: #428bca; text-decoration: none;&quot;&gt;Application Performance Monitoring&lt;/a&gt;) tools that allow for advanced session management and database monitoring are not useful in such cases.However ElasticSearch has its own monitoring tool -Marvel (developer license is free but need to buy Production License ..Approx $500 per year).&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Relational databases are meant to deal with complex data and relationships - and are thus accompanied by state of the art metrics and automated analysis tools. Tools for ElasticSearch or SOLR are still evolving and not yet mature.&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Joins: Relational databases support methods for building and optimizing views and queries that join tuples based on simple predicates. In ElasticSearch or SOLR, there aren&#39;t any robust methods for joining data across indices. This can be done using application level joins or new concepts in ES like Parent-Child relationships which are not quite sophisticated and might not work for all kinds of join scenarios.&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Analytical Functions: Though ElasticSearch or SOLR have in-built analytical functions, they are not as rich as a RDBMS analytical functions library.&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Inbuilt Data Security and Authentication Mechanisms : For a RDBMS schema, there are users-roles and previlages. However, a index in ES or Solr does not have any such concept supported yet. Data security is more driven by OS level security features (since its ultimately file system based ).&lt;/li&gt;
&lt;/ul&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 20px;&quot;&gt;That said - there are plenty of obvious &lt;a href=&quot;http://wiki.apache.org/solr/WhyUseSolr&quot; target=&quot;_blank&quot;&gt;advantages&lt;/a&gt; to SOLR for certain tasks &amp;nbsp;- Schemaless design,&amp;nbsp;&amp;nbsp;loose queries are much easier to run and return meaningful results.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 20px;&quot;&gt;Indexing is done as a matter of default, so most arbitrary queries run pretty effectively (unlike a RDBMS, where you often have to optimize and de-normalize after the fact).&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: 700; line-height: 20px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: 700; line-height: 20px;&quot;&gt;Conclusion&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 20px;&quot;&gt;:&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: 700; line-height: 20px;&quot;&gt;Even though we can use SOLR as an database&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 20px;&quot;&gt;, we may find that, there is ultimately &quot;no free lunch&quot; - and the cost savings of super-cool lucene text-searches and high-performance, in-memory indexing, are often paid for by less flexibility and adoption of new data access work-flows.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://samantstocks.blogspot.com/feeds/80681505930529236/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://samantstocks.blogspot.com/2014/08/can-we-use-elasticsearch-or-solr-as.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7391971509741359542/posts/default/80681505930529236'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7391971509741359542/posts/default/80681505930529236'/><link rel='alternate' type='text/html' href='http://samantstocks.blogspot.com/2014/08/can-we-use-elasticsearch-or-solr-as.html' title=' Can we use ElasticSearch or SOLR as a primary database '/><author><name>Samant</name><uri>http://www.blogger.com/profile/09167931596259741004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7391971509741359542.post-7867119325919825488</id><published>2013-12-25T21:08:00.002-08:00</published><updated>2013-12-25T21:08:48.175-08:00</updated><title type='text'>log4j 2 ... new and improved !  Still beta</title><content type='html'>&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;Apache Log4j 2 is an upgrade to Log4j that provides significant improvements over its predecessor, Log4j 1.x, and provides many of the improvements available in Logback while fixing some inherent problems in Logback&#39;s architecture.

Asynchronous Loggers have 10 times higher throughput and orders of magnitude lower latency than Log4j 1.x and Logback. See &lt;a href=&quot;http://logging.apache.org/log4j/2.x/manual/async.html#Performance&quot;&gt;Asynchronous Logging Performance &lt;/a&gt;for details&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://samantstocks.blogspot.com/feeds/7867119325919825488/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://samantstocks.blogspot.com/2013/12/apache-log4j-2-is-upgrade-to-log4j-that.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7391971509741359542/posts/default/7867119325919825488'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7391971509741359542/posts/default/7867119325919825488'/><link rel='alternate' type='text/html' href='http://samantstocks.blogspot.com/2013/12/apache-log4j-2-is-upgrade-to-log4j-that.html' title='log4j 2 ... new and improved !  Still beta'/><author><name>Samant</name><uri>http://www.blogger.com/profile/09167931596259741004</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>