Changes between Version 10 and Version 11 of Tutorials/oMF/tut3
- Timestamp:
- May 5, 2015, 2:33:11 AM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Tutorials/oMF/tut3
v10 v11 1 = Exercise 3: Socket Programming using New !MobilityFirst NetAPI=1 == Exercise 3: Socket Programming using New !MobilityFirst NetAPI == 2 2 3 3 [[TOC(Tutorials/oMF*, depth=2)]] 4 4 5 5 6 == !Design/Setup==7 8 === Objective:===6 === !Design/Setup === 7 8 ==== Objective: ==== 9 9 10 10 In this exercise we will learn to write, compile, and run a simple content distribution application using !MobilityFirst's new socket API. In particular we will focus on its Java release. 11 11 12 === Pre-requisites===12 ==== Pre-requisites ==== 13 13 14 14 * Experimenters are expected to have basic networking knowledge and familiarity with Linux OS and some of its tools (command line tools, ssh, etc.). … … 16 16 * Some familiarity with the !MobilityFirst terminology. 17 17 18 === Deploy the Network===18 ==== Deploy the Network ==== 19 19 20 20 This tutorial assumes that a 4 nodes topology has been already established in one of the Orbit sandboxes or the grid: … … 66 66 your nodes have been imaged correctly. 67 67 68 === Deploy Network===68 ==== Deploy Network ==== 69 69 70 70 Software and experiment control in the ORBIT testbed can be automated greatly using the OMF framework. An OMF control script is written in Ruby and allows the experimenter to specify the set of nodes, their network configuration, to specify software components and arguments, and to control their execution on one or more nodes. We will use an OMF script to bring up 4 ORBIT nodes to host our topology, with the corresponding software components. … … 72 72 We will first introduce the main details of the scripts that will be run and then we will step to the execution process itself. 73 73 74 ==== Software Component Specification====74 ===== Software Component Specification ===== 75 75 76 76 The following snippet shows the specification of the !MobilityFirst components along with the required arguments. A typical application will have at least a brief description, a path for the associated binary to execute and a list of properties that correspond to the parameters that will be passed once starting the executable. … … 127 127 * Most of the client settings are located in a configuration file pre-loaded on the ORBIT image in the folder ''/usr/local/src/mobilityfirst/eval/orbit/conf/''. 128 128 129 ==== Setting up the Software Node Groups====129 ===== Setting up the Software Node Groups ===== 130 130 131 131 The following snippet shows how the node groups for the routers are setup in the OMF control scripts. Node groups allow experimenters to use single statements to set configuration (e.g. network interfaces) and execute commands across all nodes belonging to the group. … … 216 216 [[CollapsibleEnd]] 217 217 218 === Develop Sender and Receiver Applications with MF Socket API===218 ==== Develop Sender and Receiver Applications with MF Socket API ==== 219 219 220 220 As per the goal of the exercise, we will introduce the reader to the new MF Socket API. Two simple Java applications skeletons have been made available on the nodes. These applications consist of a sender, that takes as an input a file and transmit it to a receiver that once has received the complete file anwers back with an acknowledgement. … … 371 371 * Named operations: in contrast with BSD Sockets, named communications are implemented and name to address resolution is handled in conjunction between the network stack and the network components. 372 372 373 == Execute==373 === Execute === 374 374 375 375 As in the previous tutorials, you will need to start the experiment via an OMF script. Download the script to the orbit console copying and pasting the following command in your terminal: … … 421 421 This will trigger the transmission of a file of 10MB size directed to host 102. 422 422 423 ==== What's next====423 ===== What's next ===== 424 424 425 425 In this tutorial we only scratched the surface of what is possible to implement using the new Socket Network API. A few examples on what can be done: … … 432 432 The Network API is available both for Java and C/C++ applications. 433 433 434 == Finish==434 === Finish === 435 435 436 436 Once the application has successfully completed its task, follow these steps to complete the experiments: … … 438 438 This will stop all the applications and will conclude the experiment. 439 439 440 === References===440 ==== References ==== 441 441 442 442 For more information regarding the !MobilityFirst project, visit the project page: http://mobilityfirst.winlab.rutgers.edu/