-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Working #2
Open
shrinidhihudli
wants to merge
18
commits into
shishirng:master
Choose a base branch
from
shrinidhihudli:working
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Working #2
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…omm currently listens for connections from multiple clients (using select() system call). New connections are added to a list of sessions. Requests from connected clients are enqueued into a job queue. utils contains the necessary utilities for communication (as of now). Queues are implemented here. Locks are used to make queues thread-safe.
Overall structure: The NDMP server is split into different components which are subdirectories of ndmp - currently comm, utils. In each component the source code is in a src directory. comm is reponsible for actual client-server communication, utils provides thread-safe queues and hex dumps. comm/src/comm.c, comm/src/comm.h: Structures and functions for listening and management of client connections/requests. Currently listens for connections from multiple clients (using select() system call). New connections are added to a list of sessions. Requests from connected clients are enqueued into a job queue. comm/src/worker.c, comm/src/worker.h: Thread creation, shutdown, running jobs from request queue, and processing jobs from response queue. utils/src/hexdump.c, utils/sec/hexdump.h: Hexdump utility. utils/src/locks.c, utils/src/locks.h: Provides mutex locks to make queues thread-safe (spinlock capability will be added in a future commit). utils/src/queue.c, utils/src/queue.h: Thread-safe queue implementation. Each queue has its own lock. Two queues are used by comm - request_jobs, for client requests and response_jobs, for server responses. Issues (to be addressed in future commits): 1. Code alignment. 2. Copyright license to be appended. 3. Support for spinlock locks.
Overall structure: The NDMP server is split into different components which are subdirectories of ndmp - currently comm, utils. In each component the source code is in a src directory. comm is reponsible for actual client-server communication, utils provides thread-safe queues and hex dumps. comm/src/comm.c, comm/src/comm.h: Structures and functions for listening and management of client connections/requests. Currently listens for connections from multiple clients (using select() system call). New connections are added to a list of sessions. Requests from connected clients are enqueued into a job queue. comm/src/worker.c, comm/src/worker.h: Thread creation, shutdown, running jobs from request queue, and processing jobs from response queue. utils/src/hexdump.c, utils/sec/hexdump.h: Hexdump utility. utils/src/locks.c, utils/src/locks.h: Provides mutex locks to make queues thread-safe (spinlock capability will be added in a future commit). utils/src/queue.c, utils/src/queue.h: Thread-safe queue implementation. Each queue has its own lock. Two queues are used by comm - request_jobs, for client requests and response_jobs, for server responses. Issues (to be addressed in future commits): 1. Code alignment. 2. Copyright license to be appended. 3. Support for spinlock locks.
Overall structure: The NDMP server is split into different components which are subdirectories of ndmp - currently comm, utils. In each component the source code is in a src directory. comm is reponsible for actual client-server communication, utils provides thread-safe queues and hex dumps. comm/src/comm.c, comm/src/comm.h: Structures and functions for listening and management of client connections/requests. Currently listens for connections from multiple clients (using select() system call). New connections are added to a list of sessions. Requests from connected clients are enqueued into a job queue. comm/src/worker.c, comm/src/worker.h: Thread creation, shutdown, running jobs from request queue, and processing jobs from response queue. utils/src/hexdump.c, utils/sec/hexdump.h: Hexdump utility. utils/src/locks.c, utils/src/locks.h: Provides mutex locks to make queues thread-safe (spinlock capability will be added in a future commit). utils/src/queue.c, utils/src/queue.h: Thread-safe queue implementation. Each queue has its own lock. Two queues are used by comm - request_jobs, for client requests and response_jobs, for server responses. Issues (to be addressed in future commits): 1. Code alignment. 2. Copyright license to be appended. 3. Support for spinlock locks.
Overall structure: The NDMP server is split into different components which are subdirectories of ndmp - currently comm, utils, xdr. In each component the source code is in an src directory. comm is reponsible for actual client-server communication, utils provides thread-safe queues and hex dumps. XDR is incomplete as of now. Issues (to be addressed in future commits): 1. Align code (Code seems to be aligned in local files, but is not in GitHub). 2. Support for spinlock locks. 3. Complete the XDR integration.
Overall structure: The NDMP server is split into different components which are subdirectories of ndmp - currently comm, utils, xdr. In each component the source code is in an src directory. comm is reponsible for actual client-server communication, utils provides thread-safe queues and hex dumps. XDR is incomplete as of now. Issues (to be addressed in future commits): 1. Align code (Code seems to be aligned in local files, but is not in GitHub). 2. Support for spinlock locks. 3. Complete the XDR integration.
1. A framework for NDMP message handler implementation has be set up. Two handlers - NDMP_NOTIFY_CONNECT and NDMP_CONNECT_OPEN have beem already implemented. Please see comments in ndmp/src/ndmp_connect.c for more information. More message handler implementations coming soon. 2. State machines for sessions have been implemented in the form of queues (in ndmp/src/ndmp_msg.c). 3. The old XDR folder has been renamed NDMP. Overall structure: The NDMP server is split into different components which are subdirectories of ndmp - currently comm, utils, ndmp. In each component the source code is in an src directory. comm is reponsible for actual client-server communication, utils provides thread-safe queues and hex dumps. NDMP contains NDMP message handlers and session state machines. comm/src/comm.c, comm/src/comm.h: Structures and functions for listening and management of client connections/requests. Currently listens for connections from multiple clients (using select() system call). New connections are added to a list of sessions. Requests from connected clients are enqueued into a job queue. comm/src/worker.c, comm/src/worker.h: Thread creation, shutdown, running jobs from request queue, and processing jobs from response queue. utils/src/hexdump.c, utils/sec/hexdump.h: Hexdump utility. utils/src/locks.c, utils/src/locks.h: Provides mutex locks to make queues thread-safe (spinlock capability will be added in a future commit). utils/src/queue.c, utils/src/queue.h: Thread-safe queue implementation. Each queue has its own lock. Two queues are used by comm - request_jobs, for client requests and response_jobs, for server responses. ndmp/src/ndmp_msg.c, ndmp/src/ndmp_msg.h Maintains three state queues for sessions (connection, data, mover). Is also responsible for unmarshalling the NDMP message headers from client requests and passing them to appropriate message handlers which deal with the rest of the message before sending a reply. ndmp/src/ndmp.x NDMP structures information (obtained from NDMP source). We use rpcgen to generate ndmp.h and ndmp_xdr.c, which provide functions for encoding and decoding. ndmp/src/ndmp_connect.c Message handlers for CONNECT interface. ndmp/src/ndmp_config.c Message handlers for CONFIG interface. Next steps (to be addressed in future commits): 1. Align code (Code seems to be aligned in local files, but is not in GitHub). 2. Implement more NDMP message handlers (config interface).
1. A framework for NDMP message handler implementation has be set up. Two handlers - NDMP_NOTIFY_CONNECT and NDMP_CONNECT_OPEN have been already implemented. These message handlers were tested with NDMP the toolkit's client and are working. Please see comments in ndmp/src/ndmp_connect.c for more information. More message handler implementations coming soon. 2. State machines for sessions have been implemented in the form of queues (in ndmp/src/ndmp_msg.c). 3. The old XDR folder has been renamed NDMP. 4. The old XDR folder has been deleted. Overall structure: The NDMP server is split into different components which are subdirectories of ndmp - currently comm, utils, ndmp. In each component the source code is in an src directory. comm is reponsible for actual client-server communication, utils provides thread-safe queues and hex dumps. NDMP contains NDMP message handlers and session state machines. comm/src/comm.c, comm/src/comm.h: Structures and functions for listening and management of client connections/requests. Currently listens for connections from multiple clients (using select() system call). New connections are added to a list of sessions. Requests from connected clients are enqueued into a job queue. comm/src/worker.c, comm/src/worker.h: Thread creation, shutdown, running jobs from request queue, and processing jobs from response queue. utils/src/hexdump.c, utils/sec/hexdump.h: Hexdump utility. utils/src/locks.c, utils/src/locks.h: Provides mutex locks to make queues thread-safe (spinlock capability will be added in a future commit). utils/src/queue.c, utils/src/queue.h: Thread-safe queue implementation. Each queue has its own lock. Two queues are used by comm - request_jobs, for client requests and response_jobs, for server responses. ndmp/src/ndmp_msg.c, ndmp/src/ndmp_msg.h Maintains three state queues for sessions (connection, data, mover). Is also responsible for unmarshalling the NDMP message headers from client requests and passing them to appropriate message handlers which deal with the rest of the message before sending a reply. ndmp/src/ndmp.x NDMP structures information (obtained from NDMP source). We use rpcgen to generate ndmp.h and ndmp_xdr.c, which provide functions for encoding and decoding. ndmp/src/ndmp_connect.c Message handlers for CONNECT interface. ndmp/src/ndmp_config.c Message handlers for CONFIG interface. Next steps (to be addressed in future commits): 1. Align code (Code seems to be aligned in local files, but is not in GitHub). 2. Implement more NDMP message handlers (config interface).
The overall structure of the project looks like this: The NDMP server is split into different components, represented as subdirectories of ndmp, which are currently 1. comm 2. docs 3. ndmp 4. utils In each component the source code is in a src directory. Each component has makefiles for easy execution. comm is reponsible for actual client-server communicationndmp is responsible for the ndmp server responses to client requests. ndmp consists of xdr management as well. utils provides thread-safe queues and hex dumps. docs provides program documentation. comm comm/src/comm.c, comm/src/comm.h: Structures and functions for listening and management of client connections/requests. Currently listens for connections from multiple clients. New connections are added to a list of sessions. Requests from connected clients are enqueued into a job queue. comm/src/worker.c, comm/src/worker.h: Thread creation, shutdown, running jobs from request queue, and processing jobs from response queue. ndmp ndmp/src/ndmp.x: Contains ndmp structures that the NDMP protocol uses. We use rpcgen to generate C structures and the routines for XDR marshaling and unmarshaling. These are contained in ndmp.h and ndmp_xdr.c respectively. ndmp/src/ndmp_config.c: Contains functions for responses to NDMP config client requests. ndmp/src/ndmp_connect.c: Contains functions for responses to NDMP connect client requests. ndmp/src/ndmp_data.c: Contains functions for responses to NDMP config data requests. ndmp/src/ndmp_msg.c, ndmp/src/ndmp_msg.h: Structures and functions for XDR message handling and session management. It contains session states and session queues. utils utils/src/hexdump.c, utils/sec/hexdump.h: Hexdump utility. utils/src/locks.c, utils/src/locks.h: Provides mutex locks to make queues thread-safe. utils/src/queue.c, utils/src/queue.h: Thread-safe queue implementation. Each queue has its own lock. Two queues are used by comm - request_jobs, for client requests and response_jobs, for server responses.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The connect_close bug has been resolved and code is properly aligned. Status: connect and config interfaces are complete.