Showing posts with label OpenSource. Show all posts
Showing posts with label OpenSource. Show all posts

Saturday, April 4, 2015

Data Sets


Some of the publicly available datasets are listed here.  This is a continuously evolving page, and therefore might not always be 100% up-to-date.  For licensing information, please refer to each datasets’ own licensing page.  I take no responsibility for the licensing/distribution of the datasets.

1. Amazon’s Ratings dataset


2. imdb movies dataset


Thursday, September 30, 2010

my experiments with solr :)

Its a catchy title, but yes.. thats what I am going to talk about...

I came across hadoop, when I was looking for a new solution for one of our in-house projects. The need was quite clear, however, the solution had to be dramatically different.

The one statement we received from business was, "We need an exceptionally fast search interface". And for that fast interface to search upon they had more than a hundred million rows worth of data in a popular RDBMS.

So, when I sat about thinking, how to make a fast search application, the first thing that came to my mind was, Google. Actually, whenever we talk about speed or performance of web sites, Google is invariably the first name that comes across.


Further, Google has a plus point that there is always some activity at the back end to generate the page or results that we see, its never static content. And, then, another point, Google has a few trillion pieces of information to store/index/search whereas our system was going to have significantly lower volume of data to manage.   So, going with that, Google looked like a very good benchmark for this fast search application. 

Then I started to look for "How Google generates that kind of performance". There are quite a few pages on the web talking about just that.   But, probably none of them has the definitive/authoritative view on Google's technology or for that matter the insider's view on how it actually does what it does so fast.

Some pages pointed towards their storage technology, some talked about their indexing technology, some about their access to huge volumes of high performance hardware and what not...

For me, some of them turned out to be genuinely interesting, one of them was the indexing technology. There has to be a decent indexing mechanism to which the crawler's would feed and the search algorithms hit.  The storage efficiency is probably the next thing to come in the play. How fast can they access the corresponding item ?

Another of my observation is that, the search results (the page mentioning page titles and stuff) comes real fast, mostly less than 0.25 seconds, but the click on the links does take some time.  So, I think it has to be their indexing methodology that plays the bigger role.

With that in mind, I sat about finding what can do similar things and how much of Google's behaviour they can simulate/implement.

Then I found Hadoop project on apache (http://hadoop.apache.org/) which to a large extent reflects the way Google kind of system would work. It provides distributed computing(hadoop core), it provides a bigTable kind of database (hbase), provides map/reduce layer, and more.  Reading into it more, I figured out that this system is nice for a batch processing kind for mechanism, but not for our need of real time search.

Then I found solr(http://lucene.apache.org/solr/), a full text search engine under Apache Lucene.  It is a java written, xml indexing based genuinely fast search engine.  It provides many features that we normally wish for in more commercial applications, an being from apache, I would like to think of it as much more reliable and stable than compared to many others.

When we sat about doing a Proof of Concept with it, I figured out a few things –

•    It supports only one schema, as in, rdbms tables – only one. So, basically you would have to denormalize all your content to fit into this one flat structure.
•    It supports interactions with the server interface only through http methods be it the standard methods get/put etc or be it REST like interfaces.
•    It allows you loading data in varying formats, through xml documents, through delimited formats and through db interactions as well.
•    It has support for clustering as well. Either you can host it on top of something like hadoop or you can just configure it to do it within solr as well.
•    It supports things like expression and function based searches
•    It supports faceting
•    Extensive caching and “partitioning” features.

Besides other features, the kind of performance without any specific tuning efforts made me think of it as a viable solution.

In a nutshell, I loaded around 50 million rows on a “old” Pentium-D powered desktop box with 3 GB RAM running ubutnu 10.04 server edition (64 bit) with two local hard disks configured over a logical volume manager.

The loading performance was not quite great. Though its not that bad either. I was able to load a few million rows (in a file that was sized about 6 GB) in about 45 minutes when the file was on the same file system.

In return, it gave me query performances in the range of 2-4 seconds for the first query. For subsequent re-runs of the same query (within a span of an hour or so), it came back in approx 1-2 milliseconds.  I would like to think that its pretty great performance given the kind of hardware I was running upon, and the kind of tuning effort I put in (basically none – zero, I just ran the default configuration).

Given that, I wont say that I have found the equivalent or replacement of Google’s search for our system, but yeah, we should be doing pretty good with this.

Although there is more testing and experimentation that is required to be able to judge solr better, the initial tests look pretty good.. pretty much in line with the experiences of others who are using it.

Sunday, September 12, 2010

Business & Open Source - How both can benefit

I had the opportunity to scout for a new technology/solution for one of our in-house projects.  Quite a few of the options that I looked for were from open source arena.  And amazingly, the products were far more capable from our expectations, just that we'd have to pitch in with some effort to get it working for us.

I have always felt that for open source projects/products to become commercially viable for a business enterprise, the enterprise has to come up and spend some resources to it to get the actual value out of it.

In other words, if an organization wants to use an open source product, which has an equivalent competitive commercial product available in market, they should be open enough to have their own in-house people who can take ownership of the installation. The organization shouldn't completely rely on the support available from the community forums and such.

I have seen more than one manager complain about the lack of support on the open source products.  Had there been proper support system for each of the open source products, we'd see a lot of stories similar to mysql's model or pentaho model.

What I would like to see perhaps is that the organizations' becoming mature enough in their adaptation of the open source products. By that, I expect them to have a open vision, have people who understand and like and own the product, and at the same time tweak and tune the product to suit the organization's business needs.

In the process, the organization should contribute to the product's development cycle.  This could happen in many ways, bug fixes, contribution of new features, the employees could contribute on community forums and such.  Using the terminology from peer to peer sharing, only leechers dont help a torrent, people need to seed to it as well. Same way, unless organizations contribute to an open source product, they would stand to become only leechers.

Only after we have a decent balance of organizations using and contributing to the open source products, we'd see the ecosystem flourishing...

Thursday, March 18, 2010

Explain plan of Infobright

We all knw that Infobright is based on MySql. However, when I started with Infobright, I was equally unaware of both.

Today I got to know about Infobright's explain plan collection technique, and realized how different it is from Oracle's.

A typical explain plan from oracle talks about the path it follows to retrieve the data, and somehow makes common sense to read a plan.

On the other hand, an explain plan from Infobright looks nothing like the Oracle's plan. Its a set of cryptic rows put together. An example of such a plan -

2010-03-18 01:31:01 [4] T:-1 = TABLE_ALIAS(T:0,"myTableName")
T:-2 = TMP_TABLE(T:-1)
VC:-2.0 = CREATE_VC(T:-2,PHYS_COL(T:-1,
A:20))
A:-1 = T:-2.ADD_COLUMN(VC:-2.0,AVG,"
avg(col1)","ALL")
A:-2 = T:-2.ADD_COLUMN(VC:-2.0,MAX,"
max(col1)","ALL")
A:-3 = T:-2.ADD_COLUMN(VC:-2.0,MIN,"
min(col1)","ALL")
A:-4 = T:-2.ADD_COLUMN(,COUNT,"count(
1)","ALL")
VC:-2.1 = CREATE_VC(T:-2,PHYS_COL(T:-1,
A:2))
A:-5 = T:-2.ADD_COLUMN(VC:-2.1,GROUP_
BY,"col2","ALL")
VC:-2.2 = CREATE_VC(T:-2,PHYS_COL(T:-1,
A:5))
A:-6 = T:-2.ADD_COLUMN(VC:-2.2,GROUP_
BY,"col3","ALL")
VC:-2.3 = CREATE_VC(T:-2,PHYS_COL(T:-1,
A:7))
A:-7 = T:-2.ADD_COLUMN(VC:-2.3,GROUP_
BY,"col4","ALL")
VC:-2.4 = CREATE_VC(T:-2,PHYS_COL(T:-1,
A:11))
A:-8 = T:-2.ADD_COLUMN(VC:-2.4,GROUP_
BY,"col5","ALL")
VC:-2.5 = CREATE_VC(T:-2,PHYS_COL(T:-1,
A:12))
A:-9 = T:-2.ADD_COLUMN(VC:-2.5,GROUP_
BY,"col6","ALL")
VC:-2.6 = CREATE_VC(T:-2,PHYS_COL(T:-1,
A:13))
A:-10 = T:-2.ADD_COLUMN(VC:-2.6,GROUP_
BY,"col7","ALL")
VC:-2.7 = CREATE_VC(T:-2,PHYS_COL(T:-2,
A:-1))
T:-2.ADD_ORDER(VC:-2.7,DESC)
RESULT(T:-2)


And, guess what, to generate a plan, you have to change a setting in the initialization parameters file, and then bounce the db. I wonder if there have been any instances when someone had to look into production database's performance and therefore needed to look at some plan.

Being as new a system as it is, I cant really complain, since such things of maturity will slowly creep in. The focus right now is probably elsewhere, building the functionality, and probably performance.

in reference to: Infobright.org Forums | Enable MySQL Logging (view on Google Sidewiki)

Thursday, January 21, 2010

availability of native drivers !!!

As I mentioned earlier, I was busy experimenting with a columnar database, InfoBright.

The experience till now is mixed, in some scenarios, the data loading is very good, as much as 40k rows per second, whereas through other channels its a poorer 500 rows per second. When I go with their built in loader, its lightening fast, but when I try from Pentaho or Informatica, its measly.

Apparantly, the drivers and the compatibility of the third party tools do play a role in attaining the performance.

The fact that they dont have any native driver published, is a huge bottleneck. Informatica dont even have a native connector for MySql, the more known cousin of InfoBright (being open source, the core engine of InfoBright is based on MySql only).

One thing came out of this experience for sure, the liking for open source got better and better. During the hunt to see the reason for slow performance from Pentaho, I even tried and managed to get the source code of the plugin (transformation) that pentaho uses for Infobright. Its pure java and it was a very powerful and awakening feeling to see the code of the item. I felt as if I have the power, the choice to make a difference, make it better. :)


I am currently exploring other options, one of them includes creating a dump file (read : csv) of the data, and then launching the command line tool to load the data into target db. I dont like it, but lets see if there is any better (read:faster) way around...

Friday, March 7, 2008

Flock : The Social browser

I was just checking Firefox 3 beta 3 today, when I found about this new browser called Flock.

Its a great browser for people using services
  1. Blogging
    1. Blogger
    2. Wordpress
    3. Blogsome
    4. Typepad.. etc..
  2. Photo Mgmt
    1. Flickr
    2. Picasa
    3. Photobucket etc..
  3. Social sites
    1. Facebook
    2. Twitter
    3. etc..

The browser provides amazing functionality for different sites built right in. Many a tasks you would have done manually are now completely automated, thanks to new browser functionality.

Powered by Mozilla, I found it to be a very interesting browser option against Firefox.


  1. Picasa on Web

Wednesday, February 27, 2008

Another Open source initiative...

I am starting to think of joining another open source project on RoR. Its basically a helpdesk and workflow management solution, which would be totally web based.

I have used Peregrine for quite sometime now, and therefore have a view. I feel that there are some things in the tool that can be improved and therefore the idea. Another guy in US is also working on the topic.

Currently its hosted at rSupport.googlecode.com

Friday, February 22, 2008

Registered at Ruby forge

The Library Mananagment System project has been registered at RubyForge. You can access the default project page at http://rubyforge।org/projects/lms
.

In coming days, I am going to explore more about the project setup on ruby forge and then update accordingly. Right now, the default virtual host that we have got is called http://lms.rubyforge.org, but it really is the default page.

Would update more, perhaps post the few pages that I have thought of on the wiki there.

Thursday, February 21, 2008

Classes for Library...

More on the Library Project

Was thinking further on this and found a basic idea of the classes I would see..

  1. Book
    1. Properties
      1. Id
      2. title
      3. author1
      4. author2
      5. author3
      6. isbn no
      7. language
      8. type
        1. printed matter [default]
        2. dvd
        3. CD
      9. meta tags [comma delimited]
      10. year of publishing
      11. edition #
      12. issue cycle (days)
      13. No of copies
    2. Methods
      1. add
      2. remove
      3. update
      4. add a copy
  2. Lib Transactions
    1. Properties
      1. date of issue
      2. member id
      3. book id
      4. date of return
    2. Methods
      1. issue book
      2. return book
  3. Member
    1. Properties
      1. Name
      2. age
      3. address
      4. sex
    2. Methods
      1. Add
      2. delete
      3. update
Would update more...

DataWarehouse with Ruby on Rails

Recently joined www.rubyforge.org. Wish to join a few projects on similar direction.

While browsing through I found a project they call "ActiveWarehouse" using Ruby on Rails. Pretty interesting for me, since I come from Warehousing background myself.

I guess, I am going to read more about it and probably join the project. See if I can contribute something.

Wednesday, February 20, 2008

Library Management System : Ruby on Rails

Well, I want to learn some more of rails and ruby (as much comes along).

And so I thought of building a tiny little web application to build a library management system based on rails and mysql.

The idea is that, it would be a web based application to manage the library from an staff member's point of view. At a later stage, there would be an additional viewpoint from the library visitor, to search for books, request for issue etc...

I also intend to build a page which could be used to issue out or receive books (as a library transaction).

Here is a summary of what I have thought this application would do.. to start with...
  1. Keep stock of books
    1. multiple copies of book allowed
    2. Allow searching for books in library
    3. search on meta tags
      1. Title
      2. description
      3. author
  2. allow books to be issued out.
    1. keep track of date of issue
    2. Expected date of return
  3. Administration
    1. Allow to add books
    2. Rename, replace, add remove copies etc.
  4. Reports
    1. Books overdue on a given date
    2. Members with overdue books
    3. Books that are most probable to go overdue
    4. Members most responsible for overdue books
    5. etc...

Well, thats the very first stage of requirement thinking that has been done.

Thursday, July 12, 2007

Order for installing ruby gems locally

For installing ruby on rails basic framework when u dont have access to internet, you could follow the following order of installing gems...

Install Ruby

Install RubyGems

Install different gems

  1. Rake
  2. ActiveSupport
  3. ActionPack
  4. ActionMailer
  5. ActiveRecord
  6. ActionWebService
  7. Rails

Also found some more info on installation of rails when internet connection is actually available. Here's the source of info, the rails wiki site

  1. Installing Ruby
    1. sudo apt-get install ruby irb ri rdoc ruby1.8-dev build-essential
  2. Installing Ruby Gems
    1. sudo apt-get install rubygems
  3. Installing Rails
    1. sudo gem install rails -y
  4. Installing MySql
    1. sudo apt-get install libmysql-ruby mysql-server libmysqlclient15-dev
    2. sudo gem install mysql
Some more documentation on Ubuntu site