1. Architect : Do not reinvent technologies or infrastructure what you need is already available here
http://aws.amazon.com/architecture/Youcan launch an enterprise e-commerce justinone day,All you
have to do is just spend some time to know about AWS. If you are brand new start or your don't have
sufficient cash flow then again go to http://aws.amazon.com/architecture/ and implement the same in
godaddy or any dedicated server or VPS that's all.
Here is the tips to launch a high scaling enterprise web application or high traffic web site.
Front end:
Use any HTML5 don't break your head on choosing which framework like Angular, backbone or
Bootstrap(recommend) everything depends on how you design and architect and code.
Storage folder:
To place all your staticcontentlike image,js,css,html,etc.AWScall it as S3 http://aws.amazon.com/s3/
Caching:
Without caching if you plan to run your application which is expected to have high traffic then you will
endupin payingall yourprofittocloudorhostingcompany.Use asmuch as clientcachingoredge server
caching. But you have to be careful on what to cache and what not.
For caching use http://aws.amazon.com/cloudfront/ just point your cloud-front to your S3 folder it will
pick up the contentand distribute tovariousgeographicforexample if youare runningbusinessinIndia
thenit doesnot make sense to setupcachingserverin US region, you have to choose nearestoriginfor
example Singapore.
Object and data base result caching:
Thisisveryimportantforall highscalingwebsitewithoutcachingyourobjectsordatabase resultsetthen
youwill endupinloadingyourdatabase heavilyandif youare usingautoscalinggroupthenyourdatabase
will keep on scaling and your money will burn easily.
So whatis this?
2. For example in a travel website assume that they have a deal for Buy one and get one free offer for
Chennai toSanFrancisco.Sopeoplewill startfloodingthe travelsiteandkeeponqueryingthe samedeals
again and again. So for each query your program (Java, PHP, Groovy or anything) will generate a SQL
statement on fly and establish a database connection or reuse and execute the same query again and
again and get the result set and those result sets are iterated by the same while or for loop and then
rendered through the browser through JSP/JS or any technologies.
Imagingif you achieve thisinthe time of O (1) and avoid SQL statementgeneration, Database execution
and iterations.Here isthe solutionjustcache the particulardeal orhighconsumingqueriesincache with
key value structure.
Chennai-SFO(KEY) = Couponcode AAAAAAA (Value)
So do youwantto write hashmapfor eachdeal?Nope thenitwill loadyourmachine RAM.Use
distributedcache server.Ilike Rediswhichissuperpowerful andsupportall datastructures.
http://aws.amazon.com/elasticache/
http://redis.io/commands Knowthe powerof Redisandknow what and all youcan do it.
Application server / EC2:
Thisis virtual machineswhichrunsyourapplicationserverlike tomcatorGeronimoserver.Imagine your
local laptop available in public internet withyour desired application that’s all, so don’t think too much
about cloud server or clusters it’s just fancy name.
Onlymaindifference isimagingif yourlaptopisnotabletoserve morethan100userthenyouwill borrow
your friend laptop and do the same setup and start serving to customer by distributing loads to your
laptopas well as to your friendslaptopandonce you done withservingyouare goingto stop usingyour
friendslaptopanduse onlyuser.The same thinghappenincloud and that iscalledauto scaling.Youcan
do this just in 5 minutes.
http://aws.amazon.com/ec2/
Last part is Database.
Thisis the place where youare goingto store your data. Youcan bringyourdesireddatabase like Oracle,
MySQL, Postgresql justgoto thislink http://aws.amazon.com/rds/ andlaunchan instance (machine)of
your desiredDBjustinfewclicks.
Notes:Backbone for all the ecommerce,Matrimony,Real estate,travel andmanymore webisSearch
whichwill be servedbyApache Solr(http://lucene.apache.org/solr/)and
Elastisearch(http://www.elasticsearch.org/)
All the autosuggestionandfilterswhicheveryouare seeingintopecommerce companieswill be done
usingsearchserversonlybecause all the dataare indexedanditwill verywellpackedwithpermutation
and combinationalgorithms.Thisisthe way youare seeingautorecommendationwhenyoutype first
three letterof yourdesiredproduct.Thisalsoyoucan getit setupin5 minutesusingAWS
3. http://aws.amazon.com/cloudsearch/ if youplanningtodobyownthenyou have to syncyour database
well withsearchserverandyouhave to use toolslike Zookeeperetc.
Nowyouare good to go to runyour applicationoncloud.
Startup CEO’s if you get any technologysuggestionwithfancyname from your CTO or architect for new
implementation, thenfirstaskwhytheywant thatandwhatisnotavailableinmarketreadytouse instead
of reinventing, maintenance based on cost and learning curve . Also when you are hiring managers be
careful they are passionate to take complete ownership and deliver result without bringing good
reasons/excuses or escalation for not delivering.