Category Archives: week7

Mobility First Thoughts

After all those weeks trying to understand the theory of mobility first, I was finally able to have a look at the mobility first API, but before I was able to look at the code, I had to understand how the code functions. The mobility first API is basically broken down into different network service abstractions such as: name-based services, direct addressability of all network principles, trust and privacy, point to multi-point communication, and in-network storage and computation. The name-based services basically treats everything as names instead of location like our current network architecture does. The direct addressability of all network principles is the namespace in which all the names will reside. The bit space is so large, in fact it is (2^256). That number is so large, it can basically be considered infinite. The trust and privacy part of the mobility first network architecure is what handles all of the security and signs every name with a public key, which can later be used in combination with a private key to decrypt and authenticate it. The point to multi-point communication is what handles the routing and forwarding of messages accords the network using protocols such as unicast, multi-cast and any-cast. The last network abstraction, in-network storage and computation, is basically the brain. This is where data is stored and cached. It can then use this data to improve the routing efficiency and even use it to send messages to devices (nodes) that have been disconnected or out of reach. It’s finally code time! After learning how mobility first functions, I learned the syntax and how to actually use the API code. I learned how to open and close a mobility first socket, how to send and receive name-based messages and even how to attach and detach additional GUID’s. It was an awesome week. It’s so sad that there is only one week left, but this is just step one. I can use the experience gained from this workshop to create my own apps and make them compatible with mobility first! Finally, onto the last week where I had to present my app and write a final report about my knowledge about NDN and security.

Android Week7 HW

I can’t believe time flies so fast! It is already week 7, which means there is only one more week left of the android workshop! Time to get the gears moving and the app working! My first task was to figure out why the app on the receiver side was crashing. This is when logs come in handy. I put logs everywhere so I can understand how the code is functioning and I found out that it crashes right before the receiver tries to open it. This clearly means that the receiver is trying to open something that either doesn’t exist or is damaged somehow. After thoroughly debugging my app, I found out that the intent was setting two types of data in different places, so I was sending some weird unrecognizable file instead of a .txt file. This problem involved me changing a lot of code which would obviously be error prone, so I decided to drop the idea of sending a .txt file and simply create a new .txt file on the receiver side and populate it there. So the first thing I had to do was retrieve the contents of the sticky note and store it in an intent, which I then passed it to the other device. The other device then reads the intent and gets the contents and stores it in a variable. I then created a new .txt file on the other device, populated it using the content from the intent it received, and then opened it in full window mode with an option to edit the sticky, since by default it is opened in a non editable screen.

stickySent_screenshottitleError_screenshot

 

I was able to successfully get the contents but the title was messed up! Since the creation of the title was taking place in another thread, there was no way for me to send the title through an intent, so thats why the default title shows up. I tried everything I could possibly think of, but there is just no way for the two threads to meet exactly where I want it to. Now that I have the foundation laid down, I can work on the minor details such as adding a save function, adding a way to retain the color of the original sticky note, fixing the title, and of course a way to send it back, since so far the communication is unidirectional. So on to the week 8, where everything comes together!

css.php
Need help with the Commons? Visit our
help page
Send us a message
Skip to toolbar