Tuesday, January 19, 2010

IS Google Chrome the Next Firefox

I am a fan of Firefox and I have been using since 2004 end, but I have little concern or thought on Firefox and its future.
Firefox is lacking behind Google Chrome in following area
  1. Javascript speed
  2. Implementation HMTL 5 web form (though opera leads)
  3. HTML5 websocket
  4. More HTML5 related...
Javascript Speed, this is well known fact that V8 javascript engine is leader in this space but actually Safari is king in javascript handling
HTML5 Webforms :
Actually HTML5 did bring new things in many areas but it is split into web forms, protocol etc what matter is "after effect" of html5. For example, in the text field "watermark" like implementation using most concise JQuery needs around 500 lines of JS code and few lines CSS. So what is the problem? My point may be sounds naive but still valid in the Internet scale application.
1. Bandwidth saving
2. Browser performance -- no need to download and it knows how to handle effectively since it is natively compiled into browser engine
3. Development effort --- it is somehow shifted to browser developer but it is one time cost
4. Webforms makes very semantic browser knows what type of input and for ex. iPhone like touch based device may throw relavant virtual keyboard etc
HTML5 Websocket:
Firefox has code in its trunk and waiting to be blessed by reviewer. It is more than an year (I guess) here is the bug ref. So what is happening?
Obviously firefox is lacking for the reason and it is clearly good thing for Google Chrome.
Hm... I started using Google chrome when google debuted its chrome browser. And firefox moved to my second most used browser list and conceding its pole post to Google chrome. But change is necessary to keep things evolve...


Sunday, December 20, 2009

Avatar the must watch movie of life

I have been tracking the Avatar's progress for one reason -- James Cameron, the director of Terminator and Titanic and he was telling that he has been waiting for 15 years for technology to mature. What else you want? This is must watch movie obviously. I wanted to watch in 3D and yes I did it and I just lost in Pandora -- the planet where human invaded and trying to get the precious element. Story, well, you never need one for such a visual treats. You need to watch, watch, watch so many times to enjoy the beautify of characters and places. Wow, its spellbound. I watched on normal 3D and planning for IMAX 3D. Thanks Cameron for such a wonderful movie.
These are the items I liked in the first time....
  1. 9 feet tall humanoids which express emotions cleanly on screen
  2. Beautiful forest
  3. Floating mountain and mountain in general
  4. Big huge tree
  5. Glowing things in the nature which is brilliant
and technology which brings above all.

I some how felt the characters and nature in this movie draws me back to Indian epic Ramayana.

Tuesday, December 15, 2009

Websocket client

I am looking for Websocket client, these are my requirement.
  1. Flash is painful it needs one more server running on port 883 and it will always first hit that port to get the policy file and it is not configurable however it will try to origin port next time to get policy file. What a mess!!! So I don't want Flash based solution.
  2. Java applet --- may be ok and it is also one of the ubiquitous run time and most client machine should have Java installed.
  3. I am targeting just 2 browsers (hmmm... not exactly) IE (7, 8 and 9 -- jus kidding) and Firefox. Is it possible to use proprietary browser API to work around? Safari and Chrome already supports websocket, Safari is expected to support websocket anytime soon.
Please post you comment, if you have any solution in your mind.

Saturday, December 12, 2009

Firefox leaning towards Microsoft

It is well known that Google is contributing 70-80% of the Firefox's revenue but after Chrome browser Firefox became restless. It talked inline with Microsoft about Google's Chrome Frame for IE here is more. Firefox also talked about Bing and telling it is better in terms of handling privacy. Firefox also started slowing down some of the new Html5 features like Websocket and other form elements. Websocket has been completed and lying at the whim of review board. It shows symptom of IE team and leaning towards MS side. Will Firefox be bought over by MS? May be atleast we can expect some movement from Firefox towards MS, smells like MS is enemy of Google and for Firefox?

Friday, December 11, 2009

Erlang Websocket on Mochiweb

After long sleepless night and past two days of continuous work, able to run Websocket on Mochiweb. This is going to be checked into Erlwebsockserver. I really welcome folks to try out on Google Chrome which is the only Browser, apart from Firefox --- which has Websocket in its trunk waiting for review borads blessing.

Thursday, December 03, 2009

Google and it's DNS

Google public DNS
Google is known for making things (read web) fast. It tried with Google Chrome and it worked well. It’s minimalistic design in it’s various application also helps its peculiar but good indent of making web fast. Today I came to know about its public DNS, it good idea. I configured my Macbook to Google public DNS (8.8.8.8 & 8.8.4.4) after that I try to ping google itself to seek out how quick their domain name service. Before the google DNS, my ping latency was 27-35 msec, after I changed to goole DNS it became 80-120 msec. There are other factors which influence the ping latency basically I can’t trust AT&T’s U-Verse connection. I had many a times issue with slow speed and latency in the past. These are the minor thing but my major point of this posting is “How Google is going to exploit its DNS service?”,
Here is what I think,
Google is going to track which site user is actually visiting by logging DNS resolution request
It was initially the search being tracked, I once talked about URL is dead, but people still used to go to site which they frequent every day like twitter/facebook/yahoo etc and it also gives google opportunity to track everything. Yes everything and it is “the” data which is precious element to target adds and augment their application
On the otherside,
Google can identify fishing site and warn user
Track the profile of the web site and rank it based on multiple factors
Track the information which user is hunting through visiting the website
Can provide tiny url kind of service easily
It can provide application developed on google cloud (google app engine) a public access through its DNS and make cost effective etc
So Google is everywhere.

Friday, November 06, 2009

Load testing using tsung

I am trying to use tsung as load testing tool. It is written in Erlang and got advantage of spawning concurrent process easily and so it is best fit for this kind of simulation.
1. I wanted to test CouchDB Multimaster setup and to know how replication can be used reliably in real world scenario.
2. I also want to test HA proxy's TCP based load balancing using CouchDB's native client

Saturday, October 31, 2009

running erlang emulator shell as root on mac

I wanted to run couchdb under emulator but the problem with erl emulator is, it is not inheriting or obeying sudo command. I didn't plan well before installing couchdb so that it could run as logged in user. So I tried something like below to make it work on my macbook OS X (10.5.8)
1. sudo bash
2. set ERL_LIBS
3. export it
4. erl
Actual steps are
1. sudo bash (OR) sudo su
2. ERL_LIBS=/usr/local/lib/couchdb/erlang/lib --- path where couchdb is installed
3. export ERL_LIBS
4. echo $ERL_LIBS --- to verify the var is set properly
5. erl It worked finally...

Saturday, October 24, 2009

Native Erlang Interface to CouchDB

Http Client
In my application I am using couchbeam as erlang client utility. It is under heavily developed and improved by benoitc. It is one of the excellent http based couchdb erlang client.

Native Client
There is an interface which sits along with couchdb binaries called hovercraft. It looks like not maintained by its developer and it was not working as it is not retrofitted to new couchdb changes. I fixed those things by forking it (http://github.com/sendtopms/hovercraft).

Performance difference
It is native erlang client. So compare to any other http based erlang couchdb client it has advantage of talking to couchdb using erlang terms. So erlang->json ->erlang serialization is avoided. In my ad-hoc testing, I just had a document in couchdb and created view and accessed it through above client.
Couchbeam took 6472microsec - 7331 microsec
Hovercraft took 994 microsec - 1057 microsec.
Will this # matter? It is not humanly noticeable to find the difference but when no of request increases throughput will increase with native view but need to deal with Erlang.

Http client has advantages over native as
1. Easy to loadbalance using HAProxy or nginx or Apache
2. it is dead easy to set up Master to Slave configuration as Load is balanced in the DB request layer so Create/Update/Delete (CUD) can easily be routed to master, in case of native client, LB can be done at front end or presentation layer, but routing to master for CUD is quite complicated if it has session association and state management, but if it is designed and architected from the start it is quite simple to model. After all, native client is 6-7 times more efficient to http based client.

Saturday, September 12, 2009

Internet Scale Data Storage

Last week I read a blog from BackBlaze about their custom made peta byte storage system. It drew lot of attentions from the geek community. It is really interesting to see how they made component choices and design decisions for their storage requirement. Here is the link to the blog posthttp://blog.backblaze.com/2009/09/01/petabytes-on-a-budget-how-to-build-cheap-cloud-storage

Cost comparison from various vendors is




































Case design is quite interesting....




My Thoughts:
Google popularized commodity hardware and Amazon popularized low cost elastic storage and computing infrastructure. They brought in lot of real world confidence that "this kind of bold move will definitely work", Having boosted confidence by looking out those companies lot of new player going to come up with new refined low cost ideas and which will create enough trouble for big storage and other server vendors.

Sunday, September 06, 2009

Internet scale Operating System (OS)

Os should evolve from running on single system to fabric of multi system nodes. It should marry network give a seamless scalability. Virtualization is just opposite of what I am mentioning here. But OS should do virtualization too natively.
I am just thinking of intel's turbo boost (http://www.intel.com/technology/turboboost/) which scales based on single or multi thread capabilities and needs.

Basic building block for network for fabric nodes + network management built in will help scale commodity hardware well.

My usecase is "buy N no of system and tell the OS that these are your siblings, children and clone", it will integrate natively with them. It might be useful to have patterns or strategy for specific use cases -- may be i term it as siblings/children/clone -- will share the load evenly/take over on non-availability/bring into work on demand etc and few other things like monitoring health of individual components should be there. With these things, OS really will ready for Internet scale. I don't know if Linux is going to go in this direction. I also read about how Google scales its infrastructure. But if Google open sources its customized Linux server used in its data center or contribute it back to linux it can happen over night. I expect this from Google and also revet its position as don't do evil. I still think if whole world can do better by exposing some of the innovative idea, it should be done immediately.

It also sounds like peer-peer built into OS -- p2p OS.


Friday, September 04, 2009

OpenId and oAuth

I am planning to implement the openid and oAuth in Erlang. There are couple of modules already there which I am going to look into however I am interested in Attribute exchange and policy extension for multi factor authentication. Current incarnation of openid has UX (User experience) issue due to URL redirections. It is addressed in Openid UI extension, So possibly the popup based solution would come into practice.
I will update this post when I figure out the issues and possible solutions.
I am interested in oAuth enforcing standard mechanism to share different resources (http).

Tuesday, September 01, 2009

Opera and Html5

Opera is really great browser but it lacks great brand value. May be because it is started its life as paid browser. I am trying opera 10, it has most of the html5 thingy like all the "input" types including "date" nice date widget is incorporated. I am not able to find "datagrid" which is discarded from html5 but I do find datalist tag is implemented in opera10. So for html5 lovers opera 10 would be the best home ground to play with new tags. Thank you opera for being industry leader to complaint with new standards. This is great effort because google chrome or apple safari -- 2 big guys behind html5 is still lacking with respect to opera. hm... most of the revenue for opera coming from Google. Did I say Google?

Is Java/C# dead?

Is Java Dead?
Almost a/an year or more back I read about "java is dead, long live java" I felt angry. I felt the author is really lunatic. But ... now I have a reason to say it should die. If you work with Java and struggled to scale for few 100 users... not even for Internet scale you will wish java should die. It looks like "Yes" for web application development. But I differ from original author. Java should die not because its bloat or not SOA ready (SOA is also declared dead by Anne Thomas Manes) but because it inherent issue with Thread and shared model. It can't even be resurrected by models like Ejb to help scale application. It is like mercury and it is hazardous to environment as you need more servers to do the same scale. May be thats the reason IBM left buying SUN.

Who is playing the Game?
Java in late 90s and till 2003 is really good as hardware vendors like Intel focused more on clock speed and tailing directly with moors law. But suddenly they realized that that route won't work and changed the rule. So rule of the game now shifted to multi core. This is the reason software developed for single core with high clock is struggling to cope up with low clock speed with multi cores.

What others Think about Java?

I also found some where in the Internet, I guess it is Steve Yegge, quoted "Java proved even pig can fly". Yes I still felt IBM and other anti MS guys made and give java a Star status. It grown to 800 pound gorilla and become useless in modern Internet scale application. Earlier I was looking to see any of the internet scale companies use Java as their underlying platform. hm... they know what they want.... No where I found a Java in use. I know how complex an Ejb is. But how much it can scale? It is worthless to provide hardware, though it is cheap, to produce sub optimal results -- even cheap will become very costly in the long run. But it is good at certain aspects. I pity on guys like Gavin King who contributed Webbeans and Seam framework which will kneel down and burry itself when 100 concurrent user access it. JCP is useless and they come up with standards when even after somsthing is obsolete, for ex, JSF came and AJAX destroyed it, JSF 2.0 finalized and Websocket and comet or more specific JQuery, Dojo, YUI/Ext Js already doing heavy lifting in the client side. So why we need to do page construction in the server side?

So what is the alternative? Yes there is emphatic answer. It is Erlang. We are in the modern world. We know how Json and REST is useFull and Soap is there to cleanse us from multi language hell. So it Amazon, Facebook, meebo and others enjoyed the power of Erlang. It is like nuclear bomb and it is so powerful concurrency and message passing actor model will help scale.

HTML5 user defined tag

One of the item lacking from html5 is defining custom tag. It should have provision to make custom tag. Tags are bound by certain parameters. It needs style to render. It needs events to react. So it is possible to provide option to create custom tag and those info related to style and events can be handled (cache etc) by browser.

Secondly,
Html5 should define browser contract. It already does. It have sections for UA aka user agent. So why can;t we define background process for browser? it is possible similar to iphone push notification but here each website can optionally provide API for dealing with "Push" call. Once this is ready, email app like Gmail expose API for new message. So once thats enlisted in browser -- may be by creating html application, new message will be shown similar to how out look shows in task bar but now with application short cut. Google chrome went in this direction but not with what I expected. This will make web application feature complete and compete with desktop application. This is possible as we are again into Browser war. So how is going to come up or going to complain with new standards going to win.



Saturday, August 29, 2009

HTML5 and Page Size reduction - My Perspective

AT&T network serving 16 petabytes of Data each day http://en.wikipedia.org/wiki/Petabyte
This is not 100% HTML content it includes video/audio other media type content. I found based on html5 new tags, the size of the page can be reduce upto 50% of the total mark up size. What it means is using concise tags eliminate unnecessary markup like extra html tags and CSS and otherstuffs. And also two important media tags Video and Audio would reduce plugin code (it may be one time + some other extra stuffs) It would be huge boon to network. Websocket will enable easy push feature and binary data transfer which also will play friendly to payload. So ultimately new version html (html5) will need less mark up to achieve same effect and also some time less extra enabler code. Size reduction is mainly due to as I said above, Since reduction in html code to achieve same look and feel will ease the Search engine parsing -- it also saves power cost and hence environmental friendly --- connecting loose ends. One more side effect would be performance improvement on the browser as browser needs to parse, understand and apply style etc to only few elements.
  1. New html tags so less mark up
  2. New media tag - video and audio so less dependency need for using media
  3. Websocket -- duplex communication eliminates unnecessary round trip and concise data transfer
  4. Improved browser performance
  5. Search engine friendly -- less markup to parse and no proprietary plugin to understand
  6. Less power usage - markup generation and Search engine content parsing

Thursday, August 20, 2009

Erlang - Fileupload

I have been playing with ewgi --- wsgi equivalent of Python. It is spec which is above and top of particular application server likes (YAWS or Mochiweb or inets or misultin) so the application developed for ewgi can run on any server without any modification, ideally.
I have been playing with mochiweb and couchdb and using beepbeep as my application framework. Beepbeep has integration with ewgi and so for good for simple usecase. But I was not able to do file uploading. I added missing fileupload piece to beepbeep but theoretically it should work for any application running on EWGI and Mochiweb. So I forked beepbeep and added my file upload module, you can get it from here http://github.com/sendtopms/beepbeep/tree/master

Thursday, July 16, 2009

Apache's [HTML5 Websocket] Conundrum

Setting the Context:

I think, few days back I created a enhancement request (bug) in apache bugzilla to add new Websocket feature. I got a couple of boisterous comment and I wanted to share that to the other folks. Here is more on the issue https://issues.apache.org/bugzilla/show_bug.cgi?id=47485.

Here is what I felt.

Death of the product is not because of the product itself but because of the people behind them, it is because of lacking foresight and shortsighted decision making. I saw death of Netscape and Fall of IE and much more. It is not because of IE is bad but because other alternatives which are too good to omit. If anything fails to catch up with competitor quickly, it means it is manhandled by those aforementioned folks. I am able to smell that in Apache. HTML5 is huge force, it can’t be omitted. I am able to play video in iPhone Safari (without Flash), Firefox 3.5, Opera (Version 10 has more than 95% HTML5 feature implemented), Webkit is in full throttle and it carries easily Safari and Google Chrome browser future forward. HTML5 also comes up with enhancement for Server. Now ball is on Server provides’/Apache’s court. So, Apache should wake up –Why? Websocket is the next driving force for the future Web platform. I don’t want to see Apache’s omission only because of Websocket support. I am able to see quite a lot of web servers are popping up. They are expecting break through – late to market is again going to be big break through for new players (server providers) who has product with those features.

I am also able to see few websocket servers. Googling will atleast give basic minimal knowledge or Answers for the questions like “why?”. I never anticipate all folks who stalk apache are Einstein but my only concern is they should not cause trouble to Apache.

I also found another comment, quite interesting. Websocket is proposed by single guy. I am not able to understand why this is matter. If million folks come up with crappy thingy doesn’t mean that – it is good. But websocket is backed by All the heavy weights – (Google, Apple, Mozilla, Opera and Microsoft (not yet sure)) So Apache’s challenge is to track these naysayers out and shift their focus on impending standards which makes them or keeps them as leader.

Adhoc Browser Performance Testing (IE8, Google Chrome2, Firefox3.5) - Round 2 (with SSD)

This time I tried with IE8 and entirely different system again I used the same link to see the performance http://ideamill.synaptrixgroup.com/jquery/tablefilter/largetabletest.htm
(I also open/close the borwser few times to bring all the moving parts close to the heart of OS -:) )


Chrome2

IE8

Firefox3.5

Loading the above link button – iteration 1

0.5 sec

1.6 Sec

1.2 Sec

Loading the above link– iteration 2 (Close the browser, reload it again)

0.5 sec

1.7 Sec

1.1 Sec

Clicking GO button – iteration 1

1.9 Sec

Broken and it took 5.5 Sec to hide the table and stopped rendering the table below “Go” button. I tried compatible mode but it also didn't help.

4.3 Sec






For the kick, I checked with iPhone OS3.0 safari, It took 0.5 sec to show few rows and tool almost 3.5 minutes to render the entire page. I also checked it render all the rows. I tried to click the "Go" button, It did not work. Though it is not bad as it is not meant for this kind of load.


System used:

Core2Duo 3 GB DDRII RAM

Gskill Falcon 128GB SSD

All the test ran on the same system.

Disclaimer:

I considered Network latencies, Network congestion etc would be same for all the browser

as it is tested on the same system. You can still use the given Link to try it yourself.

Adhoc Browser Performance Testing (IE, Google Chrome, Firefox)

I came across complex requirement. Here is that,

It is huge grid table with context menu, filter, sorting etc, no of rows goes beyond 1000 and column is more than 16. I found Ext JS’s Grid is used. It is taking almost a while to load completely. It is really slow and it feels as if CPU 100% utilized and no memory is available. I wanted to picture the problem; here is the test something similar to my requirement http://ideamill.synaptrixgroup.com/jquery/tablefilter/largetabletest.htm

Chrome2

IE6

Firefox3.5

Loading the above link button – iteration 1

1.6 sec

2.3 Sec

1.8 Sec

Loading the above link– iteration 2 (Close the browser, reload it again)

1.5 sec

1.8 Sec

1.9 Sec

Clicking GO button – iteration 1

3.1 Sec

25.5 Sec

6 Sec

Clicking GO button – iteration 2

3 sec

25.2 Sec

6.1 Sec

Note: I used iPhone stop watch to test it. Though it is not fair to compare when IE 8 is out, but I have to work with IE6. I am interested in last 2 rows. Even with the margin of 0.5 sec error, Google chrome and to some extend the firefox3.0 gouged the IE.

System used:

Pentium D 3.0 GHz, 2 GB of RAM

All the test ran on the same system.

There are 2 things should happen,

IE should die including IE8 or it should reinvent itself for betterment of community. Microsoft should not punish the community and enterprise. Please do Microsoft....