Presentation is loading. Please wait.

Presentation is loading. Please wait.

P2P2DSpace Project. Project in the Technion Electrical Engineering Software Lab P2P Network, Map, Background Manager Team members: Vladimir Shulman Ziv.

Similar presentations


Presentation on theme: "P2P2DSpace Project. Project in the Technion Electrical Engineering Software Lab P2P Network, Map, Background Manager Team members: Vladimir Shulman Ziv."— Presentation transcript:

1 P2P2DSpace Project

2 Project in the Technion Electrical Engineering Software Lab P2P Network, Map, Background Manager Team members: Vladimir Shulman Ziv Rabizanovich Lab Chief Engineer: Dr. Ilana David Instructor: Uri Schonfeld Instructor: Uri Schonfeld

3 Introduction This part of a project deals with layers which provide services to the application, such as network layer, map layer (middleware) and 3 rd party service of backgrounds

4 Where we are…

5 Map middleware P2P2DSpace was designed in 3 layers. First layer application, 3rd layer network. In order to reduce complication of application layer, map layer was added as a middleware between application and network. Its role is to detach application from network implementation. All application sees is 2D map with items, coordinates and background. Map layer takes care of all communications with the network like: requesting via network from several computers (network’s functionality) their items, bringing background of the region from 3rd party server (Background Manager), transporting items from one computer to another via network. First layer application, 3rd layer network. In order to reduce complication of application layer, map layer was added as a middleware between application and network. Its role is to detach application from network implementation. All application sees is 2D map with items, coordinates and background. Map layer takes care of all communications with the network like: requesting via network from several computers (network’s functionality) their items, bringing background of the region from 3rd party server (Background Manager), transporting items from one computer to another via network.

6 Sparse Matrix Backbone of map layer is SparseMatrix module. It is hash map based implementation of sparse matrix, which is ideal for storing items on their 2D coordinates in a large 2D world. 2D map represented by space matrix of appropriate size and can be accessed by single coordinate or by region. SparseMatrix is used to represent a region and items contained in it (also used by application and network layer). There’s a thread safe version of SparseMatrix: SyncSparseMatrix. While SyncSparseMatrix is used as part of each module, SparseMatrix is transferable unit between application and map layers.

7 Backgrounds P2P2DSpace represents a very large 2D area. It would be not practical to transfer large bitmap by demand via network P2P2DSpace represents a very large 2D area. It would be not practical to transfer large bitmap by demand via network

8 Backgrounds (continued) Therefore a 3 rd party server is created. Therefore a 3 rd party server is created. It holds a bitmap of a world and supplies parts of it by demand, It holds a bitmap of a world and supplies parts of it by demand, as if all applications look at the word through a small peep hole as if all applications look at the word through a small peep hole

9 Network The purpose of the Network Layer is to provide a layer of p2p network for the P2P2DSpace application’s use. The Network Layer was designed to provide a scalable and easy use of p2p network as a middleware for P2P2DSpace application, while the major requirement for it, is network’s scalability.

10 Network overview The network represents a virtual two-dimensional space. The network represents a virtual two-dimensional space. Each peer in the network is awarded a region of responsibility in this virtual space, while the coordinate location of the peer in this space is calculated uniquely using the user name. Each peer in the network is awarded a region of responsibility in this virtual space, while the coordinate location of the peer in this space is calculated uniquely using the user name. Size of the region of responsibility depends mainly on number of peers in the network. Size of the region of responsibility depends mainly on number of peers in the network. The network itself is represented as a tree with up to 4 sons per each node (peer), when each son receives quarter of the fathers region of responsibility as its own region of responsibility. The network itself is represented as a tree with up to 4 sons per each node (peer), when each son receives quarter of the fathers region of responsibility as its own region of responsibility.

11 Network overview – cont. The network is able to map peer to unique virtual region. The network is able to map peer to unique virtual region. The network is able to map each coordinate of virtual region to peer who owns the region by user name only. The network is able to map each coordinate of virtual region to peer who owns the region by user name only. Each peer is able to map application's items to coordinates of virtual region that under its responsibility. Each peer is able to map application's items to coordinates of virtual region that under its responsibility.

12 Design decisions, principles and considerations - 1 Major issue of this project is to provide a flexible implementation of virtual 2d space and regions, while maintaining scalability of the implementation. In order to allow simple way of describing regions was decided that each region may be divided into 4 equal new regions, while they may be given to other peers who joined the network. Major issue of this project is to provide a flexible implementation of virtual 2d space and regions, while maintaining scalability of the implementation. In order to allow simple way of describing regions was decided that each region may be divided into 4 equal new regions, while they may be given to other peers who joined the network.

13 Design decisions, principles and considerations - 2 In order to provide network’s peers with ability to find each other in the network in a scalable way, the network was designed in a tree form, while each peer is a node in the tree. Each level in a “tree” represents a layer in a virtual world of regions of same size, some of which were divided into smaller regions (have sons) or represents a node in a tree which is responsible for navigation from above nodes to this node's sons. In order to provide network’s peers with ability to find each other in the network in a scalable way, the network was designed in a tree form, while each peer is a node in the tree. Each level in a “tree” represents a layer in a virtual world of regions of same size, some of which were divided into smaller regions (have sons) or represents a node in a tree which is responsible for navigation from above nodes to this node's sons.

14 Design decisions, principles and considerations - 3 Efficient disconnection of node from the network. When node connects to the network, it gets from its father region of responsibility with application items in this region. It may happen that other nodes will connect to the network through this node, and thus this node will transfer them regions of responsibility with applications items. Efficient disconnection of node from the network. When node connects to the network, it gets from its father region of responsibility with application items in this region. It may happen that other nodes will connect to the network through this node, and thus this node will transfer them regions of responsibility with applications items.

15 Design decisions, principles and considerations – 3 cont. For enabling efficient disconnection of this node from the network, it was decided that if there were 4 sons connected to this node, all items of this node are divided between sons and this node continue to be used only for navigation in the tree. Now, during disconnection of this node, it just needs to ask some node, which is leaf in this node’s sub-tree, to return items to leaf node’s father and replace this node. This solution also helps to keep region of responsibility with items in each node to be integral and not be broken to many small peaces (that may require unbound allocation of memory). For enabling efficient disconnection of this node from the network, it was decided that if there were 4 sons connected to this node, all items of this node are divided between sons and this node continue to be used only for navigation in the tree. Now, during disconnection of this node, it just needs to ask some node, which is leaf in this node’s sub-tree, to return items to leaf node’s father and replace this node. This solution also helps to keep region of responsibility with items in each node to be integral and not be broken to many small peaces (that may require unbound allocation of memory).


Download ppt "P2P2DSpace Project. Project in the Technion Electrical Engineering Software Lab P2P Network, Map, Background Manager Team members: Vladimir Shulman Ziv."

Similar presentations


Ads by Google