Skip to main content

Posts

One Year Since Returning to Sri Lanka...

It's a year since returning to Sri Lanka. Looking back, buying a car was perhaps the only positive event. So many minor problems, some are caused by my own ignorance, some are by others, and rest by the environment around us. I'm simply overwhelmed & lost trying to cope with them. Any advice???

HPC Lab Website Launched

As our 1st step towards formally establishing the HPC Lab in the department, we launched the website last week. We will add more content with time. Next step is to physically set up a lab once we get a room (currently our resources are spread around).

Distributed Systems Mind Map

Though distributed systems are inherently distributed, autonomous, and parallel, all textbooks that I have read so far are boring & serial, going from one topic to another as they are independent topics. Wondering about how best to present all related topics and their relationships in my class, I came up with the following mind map. I was able to explain most of the key concepts using a single example of a web-based business that started selling flowers. It was a student who suggested that we consider selling flowers. It turned out to be a good example, as there had to be a connection to the physical world where the business also needed a geographical distributed delivery system. Taught of sharing the mind map. Though most of those branches can be broken down further this level of detailed was sufficient for my class (by the way it took 1 hour to finish the discussion on this slide). Distributed Systems Mind Map

6 months since returning to Sri Lanka...

It's 6 months since returning to Sri Lanka. In simple words "we are confused, but hopeful" Though I spent 82% of my life in SL, it is not easy to adapt. Last 6 months have been tough for all 3 of us. Health & quality of life have been bad. It's not the country that we expected. While materistically country has gone ahead, sprit of the people has gone down. In a way can't blame people, I think they are confused too. Heat & humidity are not helping them either. However much I earn, it looks nothing. I just keep running from one thing to another to earn whatever I can. In a way, now I feel it was a big mistake not to earn something while in US after finishing PhD. All this running around not helping our family & parents either (one of the key reasons for returning). If friends in the US may wonder why we are so hard to get in touch, this is why. Given the current school system in the country & how it is messed up, we have to worry about son's fut...

Python Code to Calculate Gini index/coefficient, Robin Hood index, & Lorenz curve

Following Python code can be used to calculate Gini index, Gini coefficient, Robin Hood index, and points of Lorenz curve. Lorenz curve can be also plot if matplotlib is installed. It's based on the steps given by Peter Rosenmai . Download from git repo Other online tools: http://www.wessa.net/co.wasp http://www.poorcity.richcity.org/calculator.htm

Ginger - Content-aware Spelling & Grammar Checker

I have being using Ginger for the last 4 weeks & loving it. It's so good at finding minor mistakes (specially words that are spelled correctly but not the correct word to use) & many missing a's & the's. It walks you through the text pretty much line-by-line as a proofreader. While this is really good, it takes time so run Ginger only on the final version of your document. It doesn’t replace spell checker in Word but a really good addition. Moreover, its free & works with most of the programs we use day-to-day...

StumbleUpon Algorithm

count = 1 while True : //Keep Stumbling     click on "Stumble!" button     if happy with what you see:         break //Stop Stumbling & browse that page or website     if count == 4: //Click 4 times.         break //No point in trying again you'll be disappointed again. Go & do something else.     count += 1 //Keep trying This work for me most of the time. May be It'll work for you...

BitTorrent Search Engine/Site Survey

We are conducting an academic research study on use of BitTorrent search engines/sites. Please help us by:   * Completing the survey    * Sharing survey link with your friends on Facebook, Google+, Twitter, blogs, e-mails, etc. for wider participation Link - http://www.cnrl.colostate.edu/Projects/CP2P/BTSurvey/ Time - ~3 minutes This survey is conducted by the Computer Networking Research Laboratory (CNRL) of the Colorado State University, USA.

OverSim vs. Overlay Weaver

Quick comparison on OverSim & Overlay Weaver OverSim Overlay Weaver Simulator Emulator OMNet++ based Stand alone package C++ based. Some parts of the code is expected to be use for production Java based. Code is expected to be use for production GUI for demonstrations - more features GUI for demonstrations No documentation - High learning curve No documentation - High learning curve Statistics, visualizing tools, vectors (time series) Some statistics Many built in overlays - Chord, Pastry, Bamboo, Koorde, Broose, Kademlia, GIA, NICE, NTree, Quon, Vast, & Publish-Subscribe Built in overlays - Chord, Kademlia, Koorde, Pastry, Tapestry & FRT-Chord Built in routing modes - Recursive, iterative, semi-recursiv, exhaustive-iterativee Built in routing modes - Recursive, iterative Built in applications - DHT, i3, scribe, P2PNS, KBRTestApp, DHTTestApp, & SimpleGameClient DHT & multicast Relatively Fast - Up to 100,000 nodes Several thousand. Underlay - simple ...

Discrete Event Engine - Python

Following Python Discrete Event Engine (DES) can be use to build many discrete event simulators. It supports any data type or object and is capable of handling large event lists (use binary search to sort events). See source code for details. Download from git Repo Usage: from DES import DES events = DES() #Add set of events #event time, event type, node/customer/server ID, data events.addEvent(5.5, 'Type1', 1, 'Test data 1') events.addEvent(3.3, 'Type2', 2, [1, 2, 3, 4]) events.addEvent(1.5, 'Type3', 3, 567890) events.addEvent(9.9, 'Type4') events.addEvent(8.6, 'Type3', 1, 'Test data 5') #remove event #Provide at least event time & type events.removeEvent(3.3, 'Type2', 2) #Get remaining events in chronological order event = events.getNextEvent() print event.startTime, event.eventType event = events.getNextEvent() print event.startTime, event.eventType event = events.getNextEvent() print eve...

Yes, I hail starting private universities. But! - A Lecturer's Perspective

We are proud and privileged to teach the cream of the crop. We cherish when those students succeed in their endeavors. Most of us continue to stay in public universities mainly because of the intellectual challenges that these students present even at the expense of many monitory benefits. We hail them not only for their academic success but also for their all round abilities. This is about to change and what can we do about it? I personally believe expansion of either public or private higher education is a must for any country. Anyone should be able to get the education they desire regardless of their performance in school, work, age differences, geographic location, economic, or ethnic background. Technological advancements are breaking these barriers and enabling everyone to learn at their own phase. Like it or not, it is the way forward. I see far more benefits in starting private universities in Sri Lanka. If a private institution can offer an undergraduate degree under Rs....

Framework, Architecture, vs. Solution

I always struggle to figure out whether to use the word framework, architecture, or solution while trying describe what we developed/designed. Here's the difference among those terms based on several sources: Framework Underlying set of ideas : a set of ideas, principles, agreements, or rules that provides the basis or outline for something intended to be more fully developed at a later stage - Encarta World English Dictionary Context : the general background to, or context for, a particular action or event, e.g., legal framework - Encarta World English Dictionary System of interconnecting bars : a structure of connected horizontal and vertical bars with spaces between them, especially one that forms the skeleton of another structure - Encarta World English Dictionary A set of theories widely accepted enough to serve as the guiding principles of research within a particular discipline - Wikipedia Architecture Building design : the art and science of designing and co...

OverSim - Messages

Messages could be used to communicate in application & overlay layers as well for RPC communication. A message file could contain one or more messages and end with .msg. Relevant header & source files will be automatically generated when you compile.  All messages are inherited from cMessage class & RPC calls - inherited from BaseCallMessage class. Message name must end with word 'Call', e.g., MyRPCCall packet MyRPCCall extends BaseCallMessage RPC responce - inherited from BaseResponseMessage classes. Message name must end with word "Response', e.g., MyRPCResponce