29
P2P to 2D-space P2P to 2D-space GUI and Application GUI and Application Layer Layer Lab Chief Engineer: Dr. Ilana Lab Chief Engineer: Dr. Ilana David David Instructor: Uri Schonfeld Instructor: Uri Schonfeld Lily Itkin & Inna Gelfer Lily Itkin & Inna Gelfer

P2P to 2D-space GUI and Application Layer

  • Upload
    wind

  • View
    27

  • Download
    0

Embed Size (px)

DESCRIPTION

P2P to 2D-space GUI and Application Layer. Lab Chief Engineer: Dr. Ilana David Instructor: Uri Schonfeld Lily Itkin & Inna Gelfer. Overview. In the present time, a lot of machines are being connected to the Internet. - PowerPoint PPT Presentation

Citation preview

Page 1: P2P to 2D-space GUI and Application Layer

P2P to 2D-spaceP2P to 2D-spaceGUI and Application LayerGUI and Application Layer

Lab Chief Engineer: Dr. Ilana Lab Chief Engineer: Dr. Ilana DavidDavid

Instructor: Uri SchonfeldInstructor: Uri Schonfeld

Lily Itkin & Inna GelferLily Itkin & Inna Gelfer

Page 2: P2P to 2D-space GUI and Application Layer

OverviewOverview In the present time, a lot of machines are being In the present time, a lot of machines are being

connected to the Internetconnected to the Internet.. Some of them are providing a lot of services to a lot of Some of them are providing a lot of services to a lot of

endpoints, they are large and powerfulendpoints, they are large and powerful ((ServersServers)) Some of them are small, used by one user at the time, Some of them are small, used by one user at the time,

this type is the most common onethis type is the most common one ((ClientsClients). When ). When connected among them, can provide services to different connected among them, can provide services to different amount of users and devices at the same time.amount of users and devices at the same time.

This powerful structure can be very useful in a lot of This powerful structure can be very useful in a lot of ways, and many initiatives were made in order to take an ways, and many initiatives were made in order to take an advantage of such a structure. There are several ways advantage of such a structure. There are several ways that it can be done – on hierarchical base, managed that it can be done – on hierarchical base, managed centrally; or collaborative basis, with no centralization centrally; or collaborative basis, with no centralization and small amount of coordination from central location.and small amount of coordination from central location.

P2PP2P is a technology based on the second solution. is a technology based on the second solution.

Page 3: P2P to 2D-space GUI and Application Layer

P2P characteristicsP2P characteristics Many devices perform serverMany devices perform server--functionsfunctions Any device that performs serverAny device that performs server--functions functions

is able to perform all serveris able to perform all server--functions.functions. Any device that is acting as a client is able Any device that is acting as a client is able

to find one or more devices that are to find one or more devices that are performing server-functionsperforming server-functions . .

Servers assist clients to find more serversServers assist clients to find more servers.. Many multiplyMany multiply--connected devicesconnected devices..

“Peer-to-peer (P2P) is a network architecture in which nodes are relatively equal, in the sense that each node is in principle capable of performing each of the functions necessary to support the network, and in practice many nodes do perform many of the functions “Quoting from “Peer-to-Peer (P2P) - An Overview”, by Roger Clarke

Page 4: P2P to 2D-space GUI and Application Layer

P2P to 2DSpace P2P to 2DSpace implementationimplementation

Page 5: P2P to 2D-space GUI and Application Layer

P2P to 2D-SpaceP2P to 2D-Space

P2P2DSpace is a P2P-based system, P2P2DSpace is a P2P-based system, supplying a platform for a map-base supplying a platform for a map-base interactive application.interactive application.

The purposes of the project:The purposes of the project: To demonstrate a possible usage of the To demonstrate a possible usage of the

P2P technologies.P2P technologies. To study about a problems and possible To study about a problems and possible

solutions typical for P2P-based system solutions typical for P2P-based system development.development.

Page 6: P2P to 2D-space GUI and Application Layer

P2P to 2D-Space LayersP2P to 2D-Space Layers

Application

Node Map

Transport

This

presentation

will mostly

focus on

Application

layer

Page 7: P2P to 2D-space GUI and Application Layer

Application overviewApplication overview

The idea of application based The idea of application based on a popular “Civilization” on a popular “Civilization” game principals.game principals.

The users travel on a map, The users travel on a map, interact with other users via interact with other users via several channels and able to several channels and able to perform different actions.perform different actions.

Page 8: P2P to 2D-space GUI and Application Layer

User descriptionUser description User detailsUser details

User has a nicknameUser has a nickname Friends ListFriends List

A list of ‘known’ application users. Used to A list of ‘known’ application users. Used to defined an interaction destination:defined an interaction destination:

Connect to the friend’s worldConnect to the friend’s world Visit the friends homeVisit the friends home ChatChat

Items ListItems List User manages a set of its items, which may be User manages a set of its items, which may be

placed both on user’s local space and on the placed both on user’s local space and on the global mapglobal map

Items can be moved all over the map [local and Items can be moved all over the map [local and global]global]

New items can be created by the userNew items can be created by the user Actions can be performed on the itemsActions can be performed on the items

Page 9: P2P to 2D-space GUI and Application Layer

User Home-BaseUser Home-Base

Each user has his personal home.Each user has his personal home. The home can be designed by user.The home can be designed by user. Items may be added/performed Items may be added/performed

action on/deleted from the house.action on/deleted from the house. Other users may visit this home too, Other users may visit this home too,

and “play” with the items.and “play” with the items.

Page 10: P2P to 2D-space GUI and Application Layer

This is how home-base of

user looks like

item

username

avatar

Friends list

Connection

status

Items list

Page 11: P2P to 2D-space GUI and Application Layer

Global MapGlobal Map The userThe user may travel on the global map. may travel on the global map. In order to enter the global map, the user have In order to enter the global map, the user have

two options:two options: To connect to the world of some other user (which To connect to the world of some other user (which

will be the bootstrapper for him)will be the bootstrapper for him) To create its own world .To create its own world .

The user may travel on the global map, “play” The user may travel on the global map, “play” with the items located on the mapwith the items located on the map

If, upon his travel, the user meets the home of If, upon his travel, the user meets the home of other user, he may visit this home.other user, he may visit this home. If user A ran into the home of user B, and user A is If user A ran into the home of user B, and user A is

not yet familiar to user B, then user B is not yet familiar to user B, then user B is automatically added to users A friends list. automatically added to users A friends list.

Page 12: P2P to 2D-space GUI and Application Layer

This is how global map looks like

Page 13: P2P to 2D-space GUI and Application Layer

General OperationsGeneral Operations The following general operations are The following general operations are

available for each user all the time (both available for each user all the time (both on global map and inside some home):on global map and inside some home): Add new friend – The user may add new Add new friend – The user may add new

friend manually (by inserting his name and friend manually (by inserting his name and ip), or automatically, by entering this users’ ip), or automatically, by entering this users’ home.home.

Add new item – The user may add new item Add new item – The user may add new item to his item list. The new item input requires to his item list. The new item input requires a name for an item and a several picture (to a name for an item and a several picture (to represent items’ different states).represent items’ different states).

Page 14: P2P to 2D-space GUI and Application Layer

Chat supportChat support

Page 15: P2P to 2D-space GUI and Application Layer

ChatChat

Users, while traveling within the global Users, while traveling within the global map or ‘arranging their home place’, have map or ‘arranging their home place’, have an ability to use additional way of an an ability to use additional way of an interaction with other users – CHATinteraction with other users – CHAT

Along with the textual messages, the Along with the textual messages, the application is able to deliver voice application is able to deliver voice messagesmessages

The chat functionality is based on ‘out of The chat functionality is based on ‘out of box’ jain-sip packages, which after certain box’ jain-sip packages, which after certain changes, deployed into the application. changes, deployed into the application.

Page 16: P2P to 2D-space GUI and Application Layer

SIP - Session Initiation SIP - Session Initiation ProtocolProtocol

SIP is a signaling protocol for creating, modifying and destroying dialogs between multiple endpoints

JAIN SIP is the standardized Javainterface to the Session Initiation Protocolfor desktop and server applications.

JAIN SIP supports the SIP protocol functionality described in RFC 3261. [see the link to the RFC in the ‘Links’ section]

Page 17: P2P to 2D-space GUI and Application Layer

JAIN-SIP PackagesJAIN-SIP Packages

In order to support chat feature, 3 jain In order to support chat feature, 3 jain sip packages are usedsip packages are used Jain-sip Jain-sip

Sip layer implementation.Sip layer implementation. Jain-sip presence proxyJain-sip presence proxy

The proxy runs on each application host, The proxy runs on each application host, confirming P2P technologyconfirming P2P technology

Jain-sip applet phoneJain-sip applet phoneInstant text messaging and VOIP technology Instant text messaging and VOIP technology

implementationimplementation

Page 18: P2P to 2D-space GUI and Application Layer

SIP Architecture *SIP Architecture *

* The slide is taken from the official Jain Sip Tutorial

Page 19: P2P to 2D-space GUI and Application Layer

Jain SIP Messaging Jain SIP Messaging Architecture *Architecture *

* The slide is taken from the official Jain Sip Tutorial

Page 20: P2P to 2D-space GUI and Application Layer

Forced changes Forced changes

General changesGeneral changes Full omission of jain sip graphical Full omission of jain sip graphical

interfaceinterface Automatic creation and configuration of Automatic creation and configuration of

chat entitieschat entities Sip registrationSip registration Sip subscriptionSip subscription

Changes forced by p2p technology Changes forced by p2p technology obedienceobedience Remote registrationRemote registration

Page 21: P2P to 2D-space GUI and Application Layer

Design decisions, principles Design decisions, principles and considerationsand considerations

In order to avoid logical connection that is too In order to avoid logical connection that is too tight between the user and the server he's tight between the user and the server he's logging into, logical separation was made logging into, logical separation was made between the region, which the server is between the region, which the server is responsible of, and a "user's room". Upon login, responsible of, and a "user's room". Upon login, coordinate being assigned to user (according to coordinate being assigned to user (according to username hashing). In this coordinate a link to username hashing). In this coordinate a link to user's room created. The link represented by user's room created. The link represented by house item.house item.

Due to the fact, that user can travel between Due to the fact, that user can travel between regions of different servers, and the application regions of different servers, and the application should present the relevant background. The should present the relevant background. The querying is preformed via Map layer and the querying is preformed via Map layer and the calculation and connection to other servers is calculation and connection to other servers is transparent to application layer.transparent to application layer.

Page 22: P2P to 2D-space GUI and Application Layer

Design decisions, principles Design decisions, principles and considerations – cont.and considerations – cont.

Due to the fact, that several users can be located and Due to the fact, that several users can be located and performing actions on objects in the same region performing actions on objects in the same region simultaneously, a decision was made, to create a simultaneously, a decision was made, to create a "refresh" button, such as every time a user would "refresh" button, such as every time a user would like to get the most updated map, he will press this like to get the most updated map, he will press this button. If several actions performed simultaneously, button. If several actions performed simultaneously, it's up to the peer in charge to decide in which order it's up to the peer in charge to decide in which order the actions would be carried out. the actions would be carried out.

It was decided to use one centralized background It was decided to use one centralized background supplier. To get a piece of global map, a peer must supplier. To get a piece of global map, a peer must send a request to the background manager, with the send a request to the background manager, with the wanted coordinates. The background manager wanted coordinates. The background manager computes the suitable piece, and returns it to the computes the suitable piece, and returns it to the peer.peer.

Page 23: P2P to 2D-space GUI and Application Layer

Example FlowsExample Flows

Page 24: P2P to 2D-space GUI and Application Layer

Login flowLogin flow

When user logs into the system, the When user logs into the system, the following parameters are loaded from following parameters are loaded from his configuration file:his configuration file: Paths to his: avatar, background of his Paths to his: avatar, background of his

homehome List of friends (with usernames and URLs)List of friends (with usernames and URLs) List of items which located inside his house List of items which located inside his house

(including location, possible state and (including location, possible state and current state).current state).

Parameters of the background managerParameters of the background manager Parameters of chat proxy.Parameters of chat proxy.

Page 25: P2P to 2D-space GUI and Application Layer

Login flow – cont.Login flow – cont.

Now the user can “organize” his home, Now the user can “organize” his home, change the background, move, add or change the background, move, add or delete the items and perform action on delete the items and perform action on them.them.

If user wishes to connect to the global If user wishes to connect to the global map:map: If he wish to create his own world, it chooses If he wish to create his own world, it chooses

to connect via <New User> (the default), and to connect via <New User> (the default), and his peer will be the root of this world.his peer will be the root of this world.

If he wish to connect to an already existing If he wish to connect to an already existing world, he should choose (in friends list) some world, he should choose (in friends list) some user that will be his bostrapper. user that will be his bostrapper.

Page 26: P2P to 2D-space GUI and Application Layer

Go To Flows Go To Flows

Go To coordinate: Go To coordinate: shows a piece of shows a piece of global map, while the requested global map, while the requested coordinate is its centercoordinate is its center

Go To user: Go To user: goes to the requested goes to the requested user home, located on global map. user home, located on global map. The needed coordinate is computed The needed coordinate is computed by username hashing.by username hashing.

Go To home: Go To home: shows users’ home shows users’ home base.base.

Page 27: P2P to 2D-space GUI and Application Layer

Logout flows Logout flows

Upon logout, the users’ personal Upon logout, the users’ personal information saved to configuration information saved to configuration file, in order to recreate all the file, in order to recreate all the relevant data upon user re-logon.relevant data upon user re-logon.

Page 28: P2P to 2D-space GUI and Application Layer

Application installationApplication installation

RequirementsRequirements jmf 2.1.1.ejmf 2.1.1.e Java > 1.5Java > 1.5

ConfigurationConfiguration Application home (xml,bat)Application home (xml,bat)

ExecutionExecution run_p2p.batrun_p2p.bat

Page 29: P2P to 2D-space GUI and Application Layer

LinksLinks

P2P technology P2P technology http://www.anu.edu.au/people/Roger.Clarke/EC/Phttp://www.anu.edu.au/people/Roger.Clarke/EC/P2POview.html2POview.html

Sip project Sip project http://www-x.antd.nist.gov/proj/iptel/http://www-x.antd.nist.gov/proj/iptel/

Sip implementationSip implementation https://jain-sip.dev.java.nethttps://jain-sip.dev.java.net

SIP RFC SIP RFC http://www.rfc-archive.org/getrfc.php?rfc=3261http://www.rfc-archive.org/getrfc.php?rfc=3261