Wednesday, November 25, 2009

The Chinese Democracy Syndrome

I've been working on a paper for the last six moth that has become the Chinese Democracy of research: it keeps on changing and it seams I will never finish it.

What I've learned so far is that working for so long in a paper is very dangerous: ideas keep evolving, some are discharged and some new are added; Experimental results may lead to different conclusions and the justification for the research may shift to alternative usage scenarios.

Therefore, keeping the text in sync with the actual status of the research is difficult. At some point it may well worth to start the article from scratch, with a new approach instead of keep patching the old text. It is possible to "copy and paste" some text, but this should be done with extreme care.

At the end, writing a paper should be more straightforward: from motivation to results, with a description of details in the middle.

Interestingly this seams to be a common problem when developing any product (for example, a software) for too long, adding new features and rising expectations above what can be actually achieved. An it has a name: the Chinese Democracy Syndrome

Friday, July 24, 2009

The power of random

I'd been happyly working in my algorithms, making some steady "progress" improving results,. That was until, following the suggestion of a colleague, I decided to compare results with a completely random "base case".

I was shocked to realize that my results where not much better than the random case! In other words, I was spending some resources to self-organize a network and, at the end, it didn't worth the effort as a randomly organized network had a comparable performance at a much lower maintenance cost.

This lead me to a deeper analysis of my algorithms and more importantly, my assumptions. I found that the problem was that my best case was good, but from this point on, I almost underperformed with respect of a random case, which has a more consistent behaviour.

It is too late for me to go back and reconsider using my self-organization algorithm, I need to re-contextualize the problem looking for those cases on which my approach clearly outperforms the random case and make this explicit in my assumptions.

It is part of the folklore in overlay networks that randomization has interesting properties, but seeing it beat your carefully designed algorithm is a lesson of humility: what seams a cleaver and highly optimized algorithm may be just a marginal improvement.

Therefore, is not a bad idea comparing with a random case when in early stages of development.

Tuesday, April 21, 2009

From here to there and back again

One of the first (if not the very first) advice I got when joining the Phd was to take notes of any research idea I had, so that I could keep a track. Even when obvious, this is very valuable advice indeed, for several reasons.

First, pursuing the PhD is a mid term goal and many things may happen along that process: you can block, found that others have already published a similar work, get disenchanted with your ideas or even forced to change you approach to avoid conflicts (for example, move to another research group, change of your advisor) .

The ideas you record can be a valuable source for any of those situations. I found in the situation to reconsider my research and was able to do it relatively easily just by browsing my notes of "discarded" ideas, those that I recorded just because I would reconsider any time after I finished the thesis. Well, that day came well before I might have thought and thanks to the notes, I didn't have to start from scratch.

Also, at least in my case, I found that those apparently disconnected ideas have a lot of connections. That makes sense as I had them while working on an specific topic. In many cases, they were alternative approaches to the same problem. In others, they were different applications. In others they were entirely new ideas.

But interestingly, thanks to that internal, emergent coherence, now that I have refocused my research to an apparently unrelated topic, I've found I can reuse a lot of the ideas from the previous approach just revisiting them from this new perspective. Therefore, my notes took me from my initial approach to a new one and back allowing me to move on without wasting all the work I've done.

And in doing so, I'm having a lot of new ideas that I'm recording systematically, just waiting for the day I will need them.

I Hope this time it will be after finishing the thesis.

Thursday, April 16, 2009

Focus

Focusing is the single most important thing to do. http://bit.ly/4vzpXu

Friday, March 27, 2009

Asking the right questions

This week I've been working mainly in updating my research proposal, as in the last year I have reoriented my research towards more specific goals.

As part of this update, I had to reconsider the research questions that guide my work. It is impossible to over emphasize the importance of good research questions to drive the research. This is a common topic when talking about the dissertation proposal.

The Dissertation Proposal Workshop Online from the University of Berkley propose the question must be, among other things, Evocative, Timely, Relevant, Make Connections, Clear, Grounded and Researchable. These last two are very important: the question much be in touch with the real objectives of the research and consider the time, competency and resource limitations

My current (main) research question is stated as follow:


Can the overlay self-organization and self-adaptation process be generalized to be entirely driven by an application level utility function that measures its fitness to application's objectives ?

Collateral questions are:

  • Are some application specific actions needed for such adaptation, beyond the communication protocols?
  • What kind of distributed computations are more amenable to this kind of adaptation?

I'm not sure my actual research question fulfill all the above criteria, so I'll be revisiting it during the next couple of weeks to fine tune it.

Saturday, March 21, 2009

Look mom, no hands! Automating experiments.

This week I devoted most of the time to improve the modeling framework to make easier the realization of experiments and the gathering and analysis of of results. Now I'm doing and planning some serious experiments and have a clearer idea of what it will take to produce "paper ready" results. I prefer to invest time doing this for once that doing it by hand every time I need some results.

First I added some new features to obtain not only raw counters from models (for example, number or messages sent and dropped) both also calculated (the ratio of the dropped with respect of the total) and time series of those values along the execution of the experiment. I had all the pieces already, but now they fit nicely and also with the charting tools.

I'm now working on the controlling the execution of multiple runs of the same experimental setup and gathering both the information from each experiment and a summary. I've found that thanks to the data analysis features I already have implemented in the simulation engine, this will be quite easy.

Sometimes I wonder if it had been a better idea to go further with Repast, a widely used agent based simulation framework. However, when I see how clean my code is, all doubts disappear. Repast's model (or lack or, thereof) leads to very messy, hardly reusable code. I will post in the near future about that makes my framework different.

I also made some modifications is the Jung based topology display, to accommodate different display layouts like force based, which will be important to reflect how the nodes of the topology actually reorganize. I notice that I need some way to change the zoom level of the display if I want to work with more than some hundreds of nodes.

This is the good thing about frameworks: they serve to purposes you didn't even considered while you were designing it. The hard part is to keep working on the framework without evident progress (just a bunch of classes and interfaces) .

It is "easier" to take a short cut, do a dirty implementation and have something to show. But the problems came later, when you need to make changes in the simulation and start patching the code with the risk of introducing errors in the simulation. I personally prefer clean code because it gives me more confidence.

The next big change I need to implement is to improve the efficiency of the code. Because I use reflection a lot, the simulation time grows almost exponentially with the number of agents. I haven't made a profiling of the simulator (even when this would be a good idea), but from what I read in the Internet, most of the overhead of reflection is in the "discovery" part. That is, in locating the right method to call. Therefore. I'll try with a cache of the reflection information.

Tuesday, March 17, 2009

The starting point

It has been a long journey to get where I'm now, the beginning of the "last mile" to complete my PhD thesis.

In this first post, I want to describe what the starting point of this journey is and how it looks the the road ahead. So far I have define in a very precise way the objective of my theses, I have a road map to completion and I have all the necessary tools.

The objective is to develop a set of abstractions and its realization in a framework to support self-adaptive distributed computations using an application-driven overlay level adaptation. Let's dissect this in parts.

A distributed computation is a set of components distributed over a set of network nodes, which communicate to achieve a common goal. One simple example is a group of tasks that form a parallel job, which process a group of datasets to produce a result, much like a MapReduce process.

The overlay is the logical communication topology and the communication protocols used to communicate the components of the distributed computation. The topology determines the (potentially dynamic) location of each component in the network and the "neighbors" or preferred nodes to communicate with. The protocols define how information flows across the topology.

The idea is that this overlay's topology adapts to the requirements of the distributed computation expressed as a metric (for example, the throughput) using an application supplied function that evaluates alternatives and gives a valuation based on some application specific criteria (for example, prefer fast processors, but maintain tasks that share some data close) .

The key challenge here is to find a generic set of abstractions and algorithms that allows such adaptation in general cases. So far this has been achieved either in very particular cases (for example, key based routing in a DHT) or using hand crafted solutions that are not easy to generalize.

I have already come to a set of basic abstractions, which are the Collectives framework and its Application Aware Adaptive Overlay (A3O). the framework is implemented in a 80% (the thoughtest part, corresponding to the overlay).

The roadmap to completion can be summarize as
  1. Prove the generality of the A3O's concepts by applying it to diverse scenarios. The key based routing is done. I'm considering alternatives, like semantic search using bloom filters and a gradient information collection for sensor networks.
  2. Apply the Collectives+A3O to address two specific cases of distributed computation: bag of tasks (large groups of independent tasks) and parallel jobs that have dependencies and also share data.
  3. Wrap this all in the final publication/theses.
To help me in doing so, I have developed a powerful simulation framework to speed up the definition and execution of experiments. I just validated the bold idea reproducing a self-adaptive routing algorithm in this simulator and it took me a couple of days, including the debugging of the framework itself.

From this point on, I'll be keeping a record of my progress (or lack of, thereof), troubles I found, solutions, side-ideas, my "internal weather" report (a.k.a emotional state) and insights about both my theses' subject and the process of completing it.

I leave this trace mostly to myself, but I hope others enjoy it and found it interesting.

The long walk of the last mile beings.