Wednesday, November 26, 2014

2.4 Network Architecture: Emails

TCP/IP is an end-to-end network. Figure 2.21 shows TCP/IP Mail system architecture where user A can read, write, send and receive an email directly from internet mail server to the user B and vice versa. Both computers of user A and user B connected from its Network Interface Card through the internet router to the internet. The data flow from each email client to the email server is the same as TCP/IP operation in Chapter 2.1.3.

Figure 2.21: Internet Mail
Figure 2.22 shows DTN Mail system architecture where there is a separate networking environment which is an offline local area network and internet connected network. There are mail servers on both sides which act as a storage for email system. The storage in between that used to forward the data is called infomediary device.

Figure 2.22: DTN Mail

The DTN architecture aims to provide interconnection between several networks which may have a network disruption because of distance or time delay in data transmission. DTN user communicates through a DTN network to the internet user, while TCP/IP had the direct connection to the internet. Each network station requires one DTN mail server for temporary storage while TCP/IP does not need a local server and had a direct connection to various internet mail servers. A DTN network requires an infomediary device to transfer and receive data between network stations while TCP/IP does not need it.

Monday, November 24, 2014

2.3.3 Naming and addressing mechanism: Endpoint IDs

Internet address for TCP/IP identifies a node on the internet.  Internet address is a name or IP of a Web site Uniform Resource Locator (URL).  Abbreviation of Uniform Resource Locator (URL) it is the global address of documents and other resources on the World Wide Web. The first part of the address is called a protocol identifier and it indicates what protocol to use and the second part is called a resource name and it specifies the IP address or the domain name where the resource is located.  IP addresses are binary numbers, but they are usually stored in text files and displayed in human-readable notations, such as 172.16.254.1 (for IPv4), and 2001:db8:0:1234:0:567:8:1 (for IPv6). The protocol identifier and the resource name are separated by a colon and two forward slashes. Table 2.3 shows the two URLs below point to two different files at the domain website.com. The first specifies a file that should be fetched using the FTP protocol while the second specifies a Web page that should be fetched using the HTTP protocol.
ftp://www.website.com/file.exe
http://www.website.com/index.html
Table 2.3: TCP/IP Endpoint ID
A URL is one type of Uniform Resource Identifier (URI). URI is the generic term for all types of names and addresses that refer to objects on the World Wide Web.
In a DTN, Bundle Protocol endpoints are identified by name. Bundle Protocol names are Uniform Resource Identifier (URI). Table 2.4 shows examples of Bundle Protocol name.
dtn://thismachine/ping
dtn:pop:mailto:myemail@mymail.com
Table 2.4: DTN Endpoint ID
In URI terminology, each URI begins with a scheme name followed by a series of characters where the syntax is defined by the scheme. Each DTN node has a two part name consist of a region ID and entity ID as shown in Figure 2.20. Routing between regions is based only on region IDs, which are bound to their corresponding addresses throughout the DTN. Routing within regions is based only on entity IDs which are bound to their corresponding address only within that region. Thus each region uses a different mapping of entity IDs to address and no bandwidth is needed to copy name address mappings between regions. Gateways belong to two or more regions and move bundles between regions. It has multiple region IDs. Region IDs use the same namespace syntax as the internet DNS [9].


Figure 2.20: DTN Naming and addressing mechanism [9]

Friday, November 21, 2014

2.3.2 DTN Router vs. TCP/IP Router

Internet layer used TCP and IP protocols through the network. TCP operates at each end point of the path and manages end to end delivery of message segments. IP operates on all nodes on the path and routes message datagram. Internet routers as shown in Figure 2.18 do not need a transport layer for routing. They only implemented for maintenance purposes.

Figure 2.18: Internet Router [9]
In a DTN, the protocol stacks of all nodes include both bundle and transport layers. DTN gateways have the same double stack layers as DTN routers as shown in Figure 2.19. DTN gateways can run different lower layer protocols on each side of their double stack. This allows DTN gateway to span two regions that use different lower layer protocols.


Figure 2.19: DTN Router [9]

Wednesday, November 19, 2014

Netbeans IDE With Sencha Touch

1) Requirements:

i) Download the Netbeans IDE (I use the latest version 8):
https://netbeans.org/

ii) Download the latest Sencha plugin from here:
https://bitbucket.org/addicticks/nbplugin-senchacmd/downloads

iii) Download the Sencha Touch library from here(I use latest touch-2.4.1, rename it as touch):
http://www.sencha.com/

2) Create new project

Choose New>Java Web>Web Application. Press the Next button. Name the app “SenchaApp”. Choose the project location. Press the Next button.

Select Tomcat as the servers and click the Finish button.

3) Prepare Sencha App Structure

i) Inside web folder, create the app folder, views folder, models folder, controllers folder in NetBeans to add your javascript files into.

ii) Add previously download "touch" folder into web folder.

4) Add sencha library

i) Right click on the SenchaApp application and select Properties from the drop down menu

ii) Under the Libraries menu, choose “Add Libraries” and from the window that opens click “Create…”

iii) Name the Library “Sencha_Touch” and choose “Class Library” from the drop down.

iv) Under the “Classpath” tab, click on “Add JAR/Folder” and select the “touch” folder previously downloaded.

v) Click “OK” and choose the newly created “Sencha_Touch” library.

create an app.js file in the app folder. Type Ext followed by a “.” — If the steps above were followed correctly, the code completion should work.

5) Code/create your sencha touch application

6) Run Application

Hit Run.

Your application should start in the default browser with the url : localhost:8084/SenchaApp/

Reference: http://techtalktone.wordpress.com/2012/02/22/using-netbeans-ide-with-sencha-touch/

Monday, November 17, 2014

High CPU activity problem: Stop and disable AVGIDSagent service


AVG user mostly will experience CPU High activity. Computer become slow and hardly to use. This is because of AVGIDSagent service using a lot of the computer resources. Blame AVG for that.
To solve that problem, follow this guide:

1) At tray, Temporary disabled AVG protection.
2) Open Windows Services
3) Open AVGIDSagent service. Stopped the service by changed its status from “Automatic” to “Disabled”
4) Enable AVG protection again.

Everythng is back on high speed as normal.

Reference:
http://www.thefreewindows.com/16279/stop-disable-avgidsagent-service-reduce-cpu-activity/

7zip command to batch zip all folders and unzip all zip files

7zip is very usefull to do batch jobs through command line. I usually use these command and create a batch file for easy use later. Just simply put the command in text file and rename .txt as .bat.

This is command for batch unzip all zip files into each respective folders name:

@echo off
for /F "delims=" %%I IN (' dir /b /s /a-d *.zip ') DO (
    "c:\Program Files\7-Zip\7z.exe" x -y -o"%%~dpI\%%~nI" "%%I"
)
pause

This is command for batch zip all folders into each respective zips name:

for /d %%X in (*) do "c:\Program Files\7-Zip\7z.exe" a "%%X.zip" "%%X\"

Sunday, November 16, 2014

2.3 Comparison of TCP/IP and DTN

Internet layers and DTN layers are identical except that DTN architecture implements store and forward message switching by overlaying a new protocol layer called bundle layer. It is placed on top of Transport layers. The bundle layer ties together the Transport layers and below with application programs to communicate across multiple regions. Bundles are also called messages switched. The bundle layer stores and forwards entire bundles or bundle fragments between nodes. A single bundle layer protocol is used across all networks that make up a DTN. By contrast, the layers below the bundle layer which is transport layer and below are chosen for their appropriateness to the communication environment of each region.
Figure 2.14 shows the DTN layer compares to the Internet layer [9]. Bundle consists of a source-application user data, Control Information provided by source application and destination application which describes how to process, store, dispose and handle user data and a Bundle header. Bundles extend the hierarchy of data-object encapsulation performed by the Internet protocols.

Figure 2.14: Comparison Internet Protocol Layers with DTN Protocol Layers
Figure 2.15 shows how bundle-layer encapsulation works in the context of TCP/IP protocols. A bundle layer may break whole bundles or messages into fragments as an IP layer may break a whole datagram into fragments. If bundles are fragmented, the bundle layer at the final destination reassembles them.

Figure 2.15: Bundle Encapsulation [9]
            On intermittently connected links with long delays, conversational protocols such as TCP/IP that involves many end to end round trips may take impractical amounts of times or connectivity failure. To overcome this problem, DTN bundle layers communicate between themselves using simple sessions with minimal or no round trips as shown in Figure 2.16. Acknowledgement from the receiving node is depending on the class of service selected as shown in Figure 2.17. The lower layer protocols that support bundle layer exchange may of course follow the existing TCP. But on intermittently connected links with long delays, minimal conversational lower layer protocols can be implemented [9].

Figure 2.16: Minimal conversational lower layer protocols [9]
The bundle layer provides six classes of Bundle Services:
i.                    Custody Transfer: Responsible of data retransmission to an accepting node. The sending node can recover its retransmission resources. The accepting node returns a custodial acceptance acknowledgement to the previous custodian.
ii.                  Return Receipt: Confirmation to the source. It is a reply to the sender application that the bundle has been received by the destination application.
iii.                Custody Transfer Notification: Notify the source when a node accepts a custody transfer of the bundle.
iv.                Bundle Forwarding Notification: Notify the source when a bundle is forwarded to another node.
v.                  Priority of Delivery
vi.                Authentication: Verify sender identity and message integrity.
In this thesis, the bundle service class (i), (v) and (vi) is used to form a store and forward overlay network and provide the key capabilities of bundle protocol which is custody based retransmission and able to cope with intermittent connectivity [10].

Figure 2.17: Class of Bundle Service [9]