Skip to main content

Posts

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

Are graduate studies making us over qualified???

When it clicks, a post graduate degree can carry us to new hights. But when it fails, we are over qualified & no one wants us... There is no gurantee that 4-6 years of scarifies will pay off. Read They're Mad as Hell by Leonard Cassuto for a debatable discussion on reality. Read Comments as well. A must read for anyone thinking of becoming a graduate student...

Should I Quit Before I Get Fired?

I always thought it would be good to resign than getting fired (it has not happen to me so far & hope will never happen) because you can go to the next employer with your head up. But Job Journal recommends to hang in until you find a new job or get fired. Read more...

The Innovation Delusion

" The Innovation Delusion " is a reminder that a country can't survive only through knowledge & innovation. I do realized this within few weeks that I came to USA. Yet unfortunately many people (both US & international) don't think it's probable. Only time will tell... Read more at...

Macro to Search Typos in Microsoft Word

A new version of tool that works with both Word and PDF files is available at https://github.com/dilumb/Typos Most of us tend to type some funny words or break a word into multiple words which are not captured by the spell checker. Inability of the spell checker to understand the context leads to this issue. Here is a Word Macro to detect such errors which I developed while writing my PhD proposal. Macro searches for each word in the 'terms' array and move the cursor to the first occurrence allowing you to manually edit the word(s). It doesn't correct errors as some of the words are context sensitive and depends on the position of a sentence. You can always extend the to code to deal with common mistakes like writing 'in to' instead of 'into'. After each correction you need to rerun the macro. Simplest way to rerun is to assign a shortcut key to the macro. When all the words are searched you will see a message saying "Double Check Compete...!...

Response on OverSim

Thanks everyone for the encouraging words on my OverSim tutorials. I got several positive blog comments & direct e-mails. It's seems time is right for a more formal tutorial. I'll try to expand the existing topics & add new ones within next couple of weeks. Please contribute by sending sample codes & suggestions that will help all of us.

SnapIt Screen Capture

Recently I was asked to reviews a screen capture utility called SnapIt 3.7 . I was bit skeptical as I was happy with screen capture feature in Microsoft OneNote. I'm happy to realize SnapIt provides much more features than OneNote. It's small & doesn't add any noticeable overhead, though I hate to add another icon to the task bar. To summarize it: supports hotkeys, auto-saving, clipboard, etc. copies screenshots to the clipboard so works with any app tracks capture history, auto-saves captured images auto-names captured images  can save in many formats, e.g., BMP, GIF, JPEG, PNG & TIFF If you write a review & post it on your own blog/twitter/FB SnapIt may give you a licensed copy. So hurry up & contact Julia Taylor or visit SnapIt site.

Oversim - Key Overlay Functions

Constructor Can be use to set message to NULL.Better not to skip defining the constructor. Destructor Clear/delete messages in destructor using cancelAndDelete() . New version seems to be motivating to use a destructor so better not to skip. void initializeOverlay(int stage) Can be used to initialize the overlay node, read parameter values, set key, set statistic collectors, start timers, etc. stage -  can be either MIN_STAGE_APP (this module is being created) or MAX_STAGE_APP (all modules were created). We typically need MIN_STAGE_APP to i nitialize application functions & variables. void finishOverlay() Called when module is terminating. Can be used to summarize stat. New OverSim version seems to be motivating us to delete messages in the destructor. void joinOverlay() Define what to do when a node is added to system. Can be used to establish connections with successor/predecessor & identify fingers in Chord. Also indicate to the simulator that overl...

4. DHTTestApp & DHT

DHTTestAPP & DHT work together where DHTTestAPP utilizes the DHT to store & retrieve (key, value) pairs. DHT utilize the underlying overlay to route queries. DHTTestAPP Is a Tier2 application that periodically issue DHT put, get, & modify queries. The implementation consist of 2 modules: GlobalDhtTestMap - Provides a data structure & functions to maintain a global list of (key, value) pairs. Random keys are taken from this list to issue DHT get & modify queries. DHTTestApp - Issues DHT put, get, & modify queries after some delay derived from a truncnormal distribution.  Put messages - Use to add a random (key, value) pair into the DHT. A put message (represented as DHTputCAPICall ) consists of a random key, random value, expiration time ( ttl ), & whether (key, value) pair can be modified. Then the message is send to the Tier1 application using sendInternalRpcCall() method, which will store (key, value) pair in the DHT. When a successful re...

3. KBRTestApp

After developing your own application & overlay next you should play with the KBRTestApp. KBRTestApp is a Tier1 application that tests 3 operations: OneWayTest - Route an overlay message to a random key & measure one-way hop count & latency. When a message reaches the destination, receiver call a method in the sender to collect statistics (not over the network). A sequence number is attached to a message to prevent collecting statistics of duplicate ones. Intermediate nodes append their addresses to a message while it's being forwarded. RPCTest - Send RPC call to a random key, wait for response, & then measure one-way hop count & latency. RPC context is used to keep track of destination & whether a message should be considered for statistics. LookUpTest - Lookup a random key using RPC call & collect latency when response is received. Sends as an internal RPC ( sendInternalRpcCall ) between two tiers (from application to overlay) using LookupCall mess...

Key Application Layer Functions

Constructor  Can be use to set message to NULL . Better not to skip defining the constructor. Destructor Can be use to clear/delete messages using cancelAndDelete() . New version seems to be motivating to use a destructor so better not to skip. void initializeApp(int stage) Can be used to initialize the application, read parameters from omnet.ini file, set statistic collectors, GUI display variables, start timers, set UDP port, etc. stage - Indicate which stage your are in. MIN_STAGE_APP indicates this module is being created while MAX_STAGE_APP indicates all modules were created. We typically need MIN_STAGE_APP to i nitialize application & variables. void finishApp() Called when application is terminating. Can be used to summarize stat. New version seems to be motivating us to delete messages in the destructor.   void handleTimerEvent(cMessage* msg) Handle event timer. Use to generate new periodic messages, other events, or check for lost messages. Bett...

OverSim - Best/Necessary Practices

General Declare each module in a separate file Wrap simple modules through compound modules, even if there is only 1 simple module. This is where you connect in/out gates. Use IOverlay or ITier interfaces Use @class() property to tell compiler to use our own C++ definition of a simple module Use Define_Module() method to add a module definition class to simulation Better not to do anything until underlay is properly initialized. Overlay may be in the initialization phase  if you want to measure bootstrap phase. Can check using underlayConfigurator->isInInitPhase() Applications Suppose our application name is myapp All applications must be stored in /src/applications/ within OverSim directory, e.g., /src/applications/myapp/ Package name should be oversim.applications.myapp Each application must be extended from BaseApp class (.ned files & C++ classes) This will add default in/out gates & parameters to the module &, also C++generic methods such as in...

2. OverSim - First Application & Overlay

OverSim has many sample applications & overlays that you can look at & understand. But, it's always better to build your own ones so you would understand things better. OverSimDevelop provides the steps necessary to build your first application & overlay. My objectives it to provide few additional details that would complete the picture. Synopsis A node generates a ping messages & sends it to a randomly selected node. When the destination node gets the ping message, it replies with a pong message. As this process continuous messages are probabilistically dropped & statistics are collected. Overview MyApplication randomly selects set of overlay nodes then send a ping message to each of them using the MyOverlay. Each overlay node maintains 2 pointers, one to the successor & another to the predecessor node. Ping messages are forwarded clockwise or anticlockwise based on these 2 pointers, e.g., message from node 8 to 2 (in a network with 10 nodes) will fol...

iPad Show Password Characters

I had the chance to play with a iPad while I was in BestBuy today. As there is no office suite, I wanted to see whether I could run Google Docs. While I was entering password, it tends to show each character that I was entering before displaying *. For example, When I type 'abc' it first showed 'a' then '*', '*b' then '**', '**c' then change to '***'. Anyway, I couldn't login as my complex password was too much for iPad. Overall, I felt Safari was bit slow on it. I love the concept & how it feels. But, the ideal hand held computer that I want is still in design. I can wait couple of more years.