Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide


  1. 1. GRID COMPUTING FRAMEWORK ANIL HARWANI KALPESH KAGRESHA YASH LONDHE GAURAV MENGHANI (Group No. 33) Under the guidance of Ms. Sakshi Surve Assistant Professor, Computer Engineering Department
  2. 2. Grid Computing <ul><li>Grid computing (or the use of computational grids) is the combination of computer resources from multiple administrative domains applied to a common task, usually to a scientific, technical or business problem that requires a great number of computer processing cycles or the need to process large amounts of data. </li></ul><ul><li>The primary goal of a Grid is to form a loosely coupled system of computers[clients] over a LAN or Internet which are capable of performing tasks issued by the server. Clients can join or leave the grid at any point of time. </li></ul>
  3. 3. Applications & Benefits <ul><li>Computationally intensive tasks such as brute-forcing over a symmetric encryption key space, simulation of natural forces, prediction of cyclones, etc. </li></ul><ul><li>If the problem to be solved is inherently parallel in nature then the scaling provided by Grids can easily introduce a speed up factor, which is roughly proportional to the number of clients participating in the Grid. </li></ul><ul><li>The performance of some large Grids are comparable to some of the fastest supercomputers and hence Grids are a feasible cheaper substitute. </li></ul>
  4. 4. Concerns <ul><li>Setup of a grid is a complicated process, and hence is not considered a serious option. </li></ul><ul><li>Almost all grid computing middleware use a complicated structure and use resources of computers spread around the globe, and hence dependent on voluntary commitment of resources by unknown machines. This might not always be suitable. </li></ul><ul><li>Academic institutions don’t have access to easy-to-deploy grid computing middleware. </li></ul>
  5. 5. Grid Computing Framework <ul><li>These concerns would be addressed in our project, Grid Computing Framework. </li></ul><ul><li>This Framework is a Third Party Application which helps the developer in rapidly deploying a flexible, reliable and efficient Grid. </li></ul>
  6. 6. Goals <ul><li>To Create a Open Source Linux-based Grid Computing Framework which works on a moderately sized LAN and, is: </li></ul><ul><ul><li>Easy to Deploy </li></ul></ul><ul><ul><li>Easy to Use </li></ul></ul><ul><ul><li>Easy to Maintain </li></ul></ul><ul><ul><li>Efficient and reliable with good performance scaling </li></ul></ul>
  7. 7. Plan of Action <ul><li>Accept the problem to be solved from the user, consisting of parallel code units called Tasks, dependency matrix of tasks, etc. </li></ul><ul><li>Distribute these tasks while taking in consideration the inter-dependency of tasks, and using a load-balancing algorithm. </li></ul><ul><li>Solve tasks at clients; record the output and errors (if any). Send the output and the error and performance logs to the server. </li></ul><ul><li>Collect outputs and logs from clients. Update client performance statistics. </li></ul><ul><li>Arrange outputs as desired by the user and present it to the user. </li></ul>
  8. 8. Submission of the Problem <ul><li>The user submits the Problem at the server. A problem is described using: </li></ul><ul><ul><li>Problem Solving Schema (PSS) </li></ul></ul><ul><ul><li>Task File(s) </li></ul></ul><ul><ul><li>Task File Input Set(s) </li></ul></ul><ul><ul><li>Result Compilation Program (RCP) </li></ul></ul>
  9. 9. Division of Tasks <ul><li>The server apportions tasks to the clients using a load balancing algorithm. Each Task has the following: </li></ul><ul><ul><li>Task File </li></ul></ul><ul><ul><li>Task Input </li></ul></ul><ul><ul><li>Task Priority </li></ul></ul><ul><ul><li>Task Timeout </li></ul></ul>
  10. 10. Execution at Client-side <ul><li>The client-side module parses the tasks being given to it, executes them and sends a packet of information called Task Execution Result . It comprises of: </li></ul><ul><ul><li>Task Output </li></ul></ul><ul><ul><li>Error Log </li></ul></ul><ul><ul><li>Statistics </li></ul></ul>
  11. 11. Result Compilation <ul><li>Task Execution Results are received by the Server and are processed by the Result Compilation Program. Finally, the following are presented to the user </li></ul><ul><ul><li>Problem Output (Generated by RCP) </li></ul></ul><ul><ul><li>Task Execution Results </li></ul></ul><ul><ul><li>Error Logs </li></ul></ul><ul><ul><li>Statistics </li></ul></ul>
  12. 12. Client-side State Transition Diagram
  13. 13. Server-side State Transition Diagram
  14. 14. Platform <ul><li>Open Source Technologies </li></ul><ul><li>What is Linux? </li></ul><ul><li>Why Linux? </li></ul><ul><li>Ubuntu - Debian Linux distribution </li></ul>
  15. 15. Programming on Linux <ul><li>GNU project </li></ul><ul><ul><li>A free software project started in 1983 </li></ul></ul><ul><ul><li>Provide tools for: development( GCC), graphical desktop(GTK+), applications and utilities(GNUzilla) </li></ul></ul><ul><li>GCC </li></ul><ul><ul><li>Tool for writing, compiling and executing a code </li></ul></ul><ul><ul><li>Supports various programming languages like C, C++,etc. </li></ul></ul>
  16. 16. <ul><li>GTK+ 2.0 </li></ul><ul><ul><li>Tool for designing a GUI( Graphical User Interface) </li></ul></ul><ul><ul><ul><li>Objects used: </li></ul></ul></ul><ul><ul><ul><ul><li>GtkObject </li></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>GtkWidget </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><li>GtkContainer </li></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>GtkWindow </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>GtkFrame </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>GtkButton </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>GtkComboBox </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>GtkBox </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>GtkVBox </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>GtkHBox </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>GtkNotebook </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>GtkTextView </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><li>GtkTextBuffer </li></ul></ul></ul></ul>
  17. 17. <ul><li>Compiling a Single Source File </li></ul><ul><ul><ul><li>Example: source file name: main.c </li></ul></ul></ul><ul><ul><ul><ul><li>gcc -c main.c (to compile main.c and create an object file) </li></ul></ul></ul></ul><ul><ul><ul><ul><li>gcc -o main1 main.o (to link the object file and create an executable file) </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Both the above tasks can be done in a single step: gcc -o main1 main.c </li></ul></ul></ul></ul><ul><ul><ul><ul><li>. /main1 (to run the executable file) </li></ul></ul></ul></ul>
  18. 18. Threads <ul><li>Process </li></ul><ul><ul><li>A running instance of a program is called a process </li></ul></ul><ul><li>Threads </li></ul><ul><ul><li>Two or more concurrently running tasks spawned by a process </li></ul></ul><ul><ul><li>A process and its thread(s) share the same memory space and address space </li></ul></ul><ul><ul><li>Context switching between threads is faster than between processes </li></ul></ul>
  19. 19. <ul><li>Thread Creation </li></ul><ul><ul><li>Each thread in a process is identified by a thread ID </li></ul></ul><ul><ul><ul><li>include the header file: “pthread.h” </li></ul></ul></ul><ul><ul><ul><li>Declare a thread variable: “ pthread_t thread1 ” </li></ul></ul></ul><ul><ul><ul><li>Create a thread: </li></ul></ul></ul><ul><ul><ul><li>int pthread_create(pthread_t thread1 , const pthread_attr_t * attr , void (* start_routine )(void*), void * arg ) </li></ul></ul></ul><ul><ul><ul><li>The above function returns 0 on successful thread creation </li></ul></ul></ul><ul><ul><ul><li>Compile and link such a source file: </li></ul></ul></ul><ul><ul><ul><li>gcc -o threadoutput threadsource.c –lpthread </li></ul></ul></ul>
  20. 20. <ul><li>Joining Threads </li></ul><ul><ul><li>For synchronized/sequential execution of threads </li></ul></ul><ul><ul><li>Threads are joined as: </li></ul></ul><ul><ul><li>int pthread_join(pthread_t thread , void ** value_ptr) </li></ul></ul><ul><ul><li>suspends execution of the calling thread until the target thread terminates </li></ul></ul>
  21. 21. Socket Programming <ul><li>What is Socket ? </li></ul><ul><li>Writing client and server programs </li></ul><ul><li>TCP or UDP servers </li></ul><ul><li>Sockets are implemented using the Berkeley Sockets API library </li></ul>
  22. 22. Client Server Model <ul><li>What is client server model? </li></ul><ul><li>Establishing a socket on the server side </li></ul><ul><li>Establishing a socket on the client side </li></ul>
  23. 23. Client/Server relationship of sockets APIs for TCP
  24. 24. Sockets API Functions <ul><li>int socket(int domain, int type, int protocol); </li></ul><ul><li>int bind(int sockfd, struct sockaddr *my_addr, int addrlen); </li></ul><ul><li>int listen(int sockfd, int backlog); </li></ul><ul><li>int accept(int sockfd, struct sockaddr *addr, int *addrlen); </li></ul><ul><li>int connect(int sockfd, struct sockaddr *serv_addr, int addrlen); </li></ul>
  25. 25. Sockets API Functions <ul><li>int send(int sockfd, const void *msg, int len, int flags); </li></ul><ul><li>int recv(int sockfd, void *buf, int len, unsigned int flags); </li></ul><ul><li>ssize_t write(int fd, const void *buf, size_t count); </li></ul><ul><li>ssize_t read(int fd, void *buf, size_t count); </li></ul><ul><li>int close(int sockfd); </li></ul>
  26. 26. Work Done So Far <ul><li>A basic client-server module has been implemented. </li></ul><ul><li>The client connects with the server, and the server maintains the list of the clients. </li></ul><ul><li>The server keeps record of the performance metric (to judge the computing power) and network metric (to find if the node is congested) of the connected clients. </li></ul><ul><li>A GUI was designed for the server module. </li></ul>
  27. 27. GUI
  28. 28. Further Work <ul><li>The server module needs to be extended to accept the problem and distribute the tasks, and retrieve and present the results. </li></ul><ul><li>The client module needs to be extended to accept tasks, process and send back the results. </li></ul><ul><li>An efficient load balancing algorithm needs to be designed. </li></ul><ul><li>Rigorous testing needs to be done, and any required optimizations need to be made. </li></ul>
  29. 29. Thank You