Monday, April 30, 2012

Build and Run MaidSafe-DHT on Mac OS X

1. Install command line tools for Xcode
Xcode -> Preferences -> Downloads -> Components, Click “Install” behind “Command Line Tools”.

2. Install MacPorts
Download dmg from, and install.

3. Install Boost with MacPorts
sudo port install boost

4. Install gcc-4.6 with MacPorts
sudo port install gcc46

5. Making and Installing MaidSafe-Common
VERY important: to make cmake to use gcc 4.6:
$ export CC=/opt/local/bin/gcc-mp-4.6
$ export CXX=/opt/local/bin/g++-mp-4.6
$ cd MaidSafe-Common/maidsafe_common_lib/build/OSX/Release
$ cmake ../../..
$ cmake --build . --target install

6. Making and Installing MaidSafe-Transport
$ cd MaidSafe-Transport/build/OSX/Release
$ cmake ../../..
$ cmake --build . --target install

7. Making and Installing MaidSafe-DHT
$ cd MaidSafe-DHT/build/OSX/Release
$ cmake ../../..
$ cmake --build . --target install

8. Run it!
We need to run at least k (defaults to 4) nodes. The first node must be run with -f (--first_node) flag. The other nodes should be run with “-b bootstrap_contacts”.
Now we can use the available commands to store and retrieve values.

Friday, April 27, 2012

Kickstarting Android Development

Here are some tips for those beginning Android development, specially at Umit Google Summer of Code '12/

0. Its important that you develop your application on a real phone. The emulator works good for most of the simple tasks but you will not get a real understanding of the performance of your application. Also, its important to test against the real world WiFi and 3G network. Networking is not the best parts of the emulator. You dont want to waste time on that.

1. Use the MOTODEV studio - its a customized Eclipse specially for Android development. It has built in support for both SDK and NDK. You can get it by creating an account here.

2. If you are writing native code and have segfaults or crashes, you can get the stack traces from /data/anr/traces.txt For applications already out in the market, you could use remote-stacktrace to collect the logs from the users.

3. Build your app for Android 2.2 and up. But make sure you test it on Gingerbread and Ice Cream Sandwich as well.

4. Just for the kicks, grab the android source code, and build it on your machine.

5. Android devices are getting really powerful - think 1.5GHz dual-core ARMv7 devices as becoming everyday phones. So you can actually think of porting any popular Linux tool to Android. There are lots of tools that Android is still missing.

6. If you want to do automated testing, you can write shell/perl scripts and run it from your computer that calls various activities (intents) in your app using adb. You can pass parameters to intents and build a complete testing suite for all your activities. More information on this coming soon.

7. Build fast, Release fast. Users are the best testers.

8. Use the inbuilt tcpdump to view raw packets.

9. To profile your application use the Android traceview 

Nmap for Android

We are planning to use Nmap as a major component for the Android Network Scanner. With last year's Google Summer of Code, I had started writing my own host discovery and port scanning methods. Since Nmap covers almost all functionalities that we want in a Network Scanner, it is a better idea to integrate Nmap into the Network Scanner.

Previously, I was using a cross-compiled binary using the method described on the Nmap website by Vlatko Kosturjak.
Here is another script for cross-compiling Nmap for Android. It downloads the arm toolchain from Sourcery, Nmap source and builds Nmap using the arm compiler. Currently tested on Ubuntu 11.04.

Wait for the next release of the Android Network Scanner this summer!

P2P Routing in OpenMonitor : GSoC 2012

As April approaches, the adrenalin level rises in every students’ body for one reason - The Google Summer of Code aka GSoC. GSoC is getting bigger every year and I am proud to be part of it this year.

My name is Narendran Thangarajan and I am implementing the P2P routing algorithm for the OpenMonitor project as part of GSoC 2012. This blog will give a short description of the process I went through to make it to coding for OpenMonitor project through GSoC 2012.

I chose Umit as my organisation. Why? Take a look at their list of interesting projects and you would understand the reason. Among all these projects, the relatively new "OpenMonitor" project is my favorite. I loved their idea. As it sounds, its a Monitor for the Internet. It keeps track of all the connections on the Internet and has the ability to trace back the reason of a network blockage or blackout during crises. Simply put, it frames a nervous system of the Internet by implementing a peer-to-peer topology of nodes scattered around the globe. And that’s totally awesome! I really wanted to be part of this wonderful project. So, when did I start to get involved? It was last year (2011) May. I worked with Luis A. Bastiao Silva, who is a mentor at Umit. He was really, really helpful. He guided me right from basics of git and helped me out at every stage of the project. I hacked a bit on Umit Network Scanner, Packet Manipulator and OpenMonitor then. I even made a talk on Umit Network Scanner at Pycon India 2011.

Then came the news of GSoC 2012. And Umit made its way to the selected organisations list this time too! My joy knew no bounds to know that I had the chance to work on my favourite project as part of the legendary Google Summer of Code.

I studied the code of Desktop Agent and Mobile Agent of OpenMonitor and I found that the inter-peer routing was in a prototype-like stage and it really needed to be tweaked up for further enhancements to happen. Thus I started discussing the problem with Zubair Nabi, Luis and Adriano and finally settled with implementing a Kademlia based P2P implementation for the inter-peer communication among the desktop agents, mobile agents and the aggregator. We initially planned to make our own implementation from scratch in Python, but later planned to use C++ Kademlia libraries and writing wrappers in Python and Java.

And after all the discussions, I was able to fine tune my project proposal and submit my proposal. The list of accepted proposals were out by GMT 1900 hours on April 23rd, 2012 on the Google melange site and I was glad to see my name on the list. Now, I am going to work in one of the coolest projects in the open source world as part of the Google Summer of Code. I am really proud and happy to be at this place.

Monday, April 23, 2012

Selected students for Google Summer of Code 2012

This year, Umit Project have a record amount of proposals covering several of our proposed (a not proposed) ideas!

Google is being extremely generous with Umit, and allowed us to accept 9 students this year. Seriously, it felt like Christmas time! THANK YOU GOOGLE!

Please, join us welcoming the 9 brilliant students that will be coding like crazy this summer:

Narendram Thangarajan (India) - OpenMonitor Inter-Peer routing mechanism

Narendram was so committed to this GSoC, that he just started working on code since after sending his proposal. I've got the feeling that if we rejected him, he would still do this work no matter what! Of course he more than earned his slot, and he'll be working on adapting the Desktop and Mobile agents to communicate using a DHT protocol.

Tianwei Liu (China) - OpenMonitor Desktop Agent

Tianwei will be taking the Desktop Agent to the next level, and guarantee it works on all our platforms, shows useful connectivity stats for our users and that we have a strong release by the end of this Summer, as well as releasing an alpha pretty soon!

Zhiwei Dai (China) - OpenMonitor iOS Mobile Agent

If you were sad you couldn't run the Mobile Agent because you own an iPhone, iPod Touch or iPad you now have a reason to rejoice! iOS users will soon be able to report and verify internet connectivity in their regions with the same ease of use of the android version, but with the Apple mojo ;-) Zhiwei will make sure this agent will also support the DHT protocol so it can communicate with all other nodes and the aggregator.

Orçun Avsar (Turkey) - OpenMonitor Aggregator

This is how we call our main OpenMonitor site, from where people can freely check on internet connectivity status in anywhere on the globe. Orçun is a got an extremely important task of making sure aggregator is scalable, resilient and useful to our users. He's also going to invest on developing new maps and perspectives on connectivity issues so that the world can get an accurate perspective of what is going around the world.

Gautam Bajaj (India) - OpenMonitor Android Mobile Agent

Zubair managed to develop an awesome Android Mobile Agent for us last gsoc, and now he'll be mentoring Gautam to make an even better version of that agent and provide a nice interface for users to easily check on connectivity in their region without having to resort to the aggregator. Gautam was a successful Umit Summer of Code student from last year, when he managed to pull off the Mobile Sniffer for Android from scratch!

Alin Predoi (Romania) - Site Status

Whoever runs a company, with a site and several servers knows how hard it is to keep track of availability, and making sure that eventual (or even frequent) site or service crashes don't drive away users with a bad impression. Site Status is an attempt to provide a site with an availability status page just like the one on twitter and google app engine, and help users defer traffic to that page whenever site goes down so that users don't face an ugly error page and understand that site is going through difficulties and is going to be back in a few. That's going to be all about Alin's Summer this year, and I'm sure he's going to deliver a stunning app for Google AppEngine that people will love to use with their websites.

Amit Pal (India) - Network Administrator Improvements

Amit is another of these students that doesn't care if they're in or out of GSoC. He's just so eager to contribute, that he can't hold his fingers. He was another successful Umit Summer of Code student from last year, and even after summer he just kept contributing code non-stop. Hey Amit, I think you're going to have a lot of fun with Network Administrator this year, but make sure you find some time to get a tan, ok?

Gorjan Petrovski (Macedonia) - Umit Network Scanner for Android Improvements

Last year, Angad managed to deliver a very nice network scanning app for Android and we even published to Google Play. It is being a reasonable success so far, with nice amount of downloads, and no complains so far! Gorjan, will bring this app to the next level, by cross compiling Nmap for Android and revamping the interface to make you feel like you're scanning from your desktop. Make sure you don't miss this handy and useful tool in your Android!

Serdar Yigit (Turkey) - Packet Manipulator / Network Scanner

The Umit Network Scanner and the Packet Manipulator are the "senior" apps in our organization, and there is being a while since last release. Serdar is going to put an end to this fast and will make sure we deliver some good new features and release a stable version of each of these applications during his Summer of Code.

Welcome to the team guys! We're looking forward for a great Summer with all of you!