Virtual Environments: Networked Virtual Environments Anthony Steed - - PowerPoint PPT Presentation

virtual environments networked virtual environments
SMART_READER_LITE
LIVE PREVIEW

Virtual Environments: Networked Virtual Environments Anthony Steed - - PowerPoint PPT Presentation

Virtual Environments: Networked Virtual Environments Anthony Steed Department of Computer Science University College London http://www.cs.ucl.ac.uk/teaching/VE Part I: Goals Part II: The Internet Part III: Strategies Part IV:


slide-1
SLIDE 1

Virtual Environments: Networked Virtual Environments

Anthony Steed

Department of Computer Science University College London http://www.cs.ucl.ac.uk/teaching/VE

slide-2
SLIDE 2
  • Part I: Goals
  • Part II: The Internet
  • Part III: Strategies
  • Part IV: Latency and Scalability

2

slide-3
SLIDE 3

3

DIVE “London Demonstrator”, UCL & colleagues 1999

slide-4
SLIDE 4

4

IEEE Virtual Reality 2009 programme committee meeting, autumn 2008

slide-5
SLIDE 5

5

Burnout Paradise, Electronic Arts

slide-6
SLIDE 6

Nature of a Networked Virtual Environment

  • Multiple user – geographically distributed
  • More types of interactions

– Passive navigation – Single object/multiple user – Multiple objects/multiple users

  • Voice link between participants
  • Heterogeneous immersion devices

6

slide-7
SLIDE 7

Demands

  • Provide up-to-date info to all participants

– Users location – Support Interactions

  • Minimal delay update
  • Support multiple message type

– Simple state – Voice/video

7

slide-8
SLIDE 8

Consistency and Plausibility

  • Goal is the illusion of a consistent shared state
  • Local plausibility is the appearance of consistency of
  • nly local actions (e.g. physics & collision detection

appears to work)

  • Shared plausibility is the appearance of properties

being the same as observed by users

– Objects that are in the background need not be consistent – Further: only things that might be the focus of joint attention can be discussed and be different

  • A local implausibility might be an obvious thing to

talk about!

8

slide-9
SLIDE 9
  • Part I: Goals
  • Part II: The Internet
  • Part III: Strategies
  • Part IV: Latency and Scalability

9

slide-10
SLIDE 10

Introduction

  • Networks at the heart of networked VR
  • Many network protocols are out there

– TCP, UDP, multicast, RTP, etc – Choice based on needs

  • Properties of the Internet

10

slide-11
SLIDE 11

Internet Protocol - IP

11

Application Transport Network Link Physical DHCP, DIS, DNS, FTP, HTTP, IMAP, RTP, SMTP, SSH, Telnet TCP, UDP, RSVP IP, ICMP, IGMP Ethernet, 802.11, ADSL copper wires, fibre-optic cable, radio waves

slide-12
SLIDE 12

Internet Protocol (IP)

  • Any particular inter-connect might guarantee

delivery

– Routers can get congested, for example when incoming links carry more traffic than outgoing – Dropping packets is the right solution to congestion!

  • Thus IP is a best effort protocol
  • Every node an internet must understand IP
  • Every node has an IP (IPv4) address of the form

– 128.16.6.8 (32 bits)

12

slide-13
SLIDE 13

Routing

13

Application Transport Network Link Application Transport Network Link Network Link Network Link

slide-14
SLIDE 14

Transport Protocols: UDP

  • Connectionless

– No state is maintained – No setup time – Light-weight

  • No Quality of Service

– No guarantee delivery – No order delivery

Postal Service

slide-15
SLIDE 15

TCP

  • Connection Oriented

– State is maintained at routers – Setup Handshake – Heavy-weight

  • Quality of Service

– FIFO delivery – Flow Control – Error Recovery

  • Mechanisms

– Timers, Acknowledgements, etc

15

slide-16
SLIDE 16

16

Transport Network Link Transport Network Link Application Application

Source Port = 1901 Destination Port = 15001 narok (128.16.13.118 ) seychelles (128.16.3.52 ) Source Port = 1220 Destination Port = 15000

slide-17
SLIDE 17

Network properties

  • Latency (Round Trip Time)

– Devices take time to send data (e.g. Modems) – Data takes time to transmit (speed of light)

  • Jitter

– Routers insert bandwidth

  • Bandwidth (Capacity)

– Bandwidth costs money – 8Mbps is fairly standard @£8/month

  • Loss (Congestion, Reliability)

– Routers drop packets, links do go down, routes do fluctuate

17

slide-18
SLIDE 18

Interpacket arrival time Frequency of occurrence Correct spacing Gaussian distribution Observed distribution

Variance of inter-packet arrival times

slide-19
SLIDE 19

Application Programming: Socket

  • End-point for communication
  • Network connections based on sockets
  • Socket identified by

– Host address – numeric or name – Port number

  • 0-1023 : well known services (e.g. http traffic on 80)
  • 1024-49151: registered ports (less well known)
  • 49152-65536: private applications or dynamic use

19

slide-20
SLIDE 20

Socket communication

20

Listener Needs to create a socket to listen to incoming connection requests Client Needs to create a socket to connect to listening sockets

slide-21
SLIDE 21

The Client/Server logic

21

Server Client

Create socket for listening incoming connections Create socket for connecting to Server Listen Request connection Accept and create thread Send/Receive message Send/Receive message

slide-22
SLIDE 22

XVR functions

22

Server Client

NetCreateChannelTCP( ) NetConnectTCP( ) NetAcceptTCP ( ) Accept and create thread NetSendToTCP() / NetReceiveFromTCP() NetSendToTCP() / NetReceiveFromTCP()

slide-23
SLIDE 23
  • Part I: Goals
  • Part II: The Internet
  • Part III: Strategies
  • Part IV: Latency and Scalability

23

slide-24
SLIDE 24

Architectures

  • Peer-to-Peer
  • Client/Server
  • Hybrid

24

slide-25
SLIDE 25

Simple Peer-to-Peer

25

  • Total replicated database
  • Other user’s input treated locally like a second set of

keyboard and mouse

  • Simple extension to single users
  • One example is DOOM from id Software

DB DB

slide-26
SLIDE 26

Multiple Peer-to-Peer

26

  • Decoupled da
slide-27
SLIDE 27

Client-Server Architecture

27

Client Server

  • Database on Server with Shadow Copy on Clients
  • Current Online Games
  • Some VE (MASSIVE,Deva)

DB

slide-28
SLIDE 28

Client-Server Architecture

28

Server Client Client Client Client

slide-29
SLIDE 29

Hybrid Architectures

29

  • Multiple servers serving different regions
  • Multiple service types & service layers

DB

Server pool

slide-30
SLIDE 30

How do these architecture measure up?

  • Up-to-date information

– Synchronisation in peer-to-peer impossible – no absolute reality!

  • Interaction

– Client/Server provides central locus of control – constraint resolution

  • Consistency!

30

slide-31
SLIDE 31

Consistency : Reality

  • GOLDEN RULE
  • Information propagation IS NOT instantaneous

31

It is not possible for EVERY user to share the EXACT same state at EVERY instance

slide-32
SLIDE 32

State Consistency: Case 1 (Total Sync)

32

T = t Acknowledge every update Propagation delay is 100ms Client A Client B

slide-33
SLIDE 33

State Consistency: Case 1

33

Client A Client B T = t + 50ms

slide-34
SLIDE 34

State Consistency: Case 1

34

Delta T Client A Client B T = t + 50 ms + 100 ms

slide-35
SLIDE 35

State Consistency: Case 1

35

T = t + 50ms + 100ms + 50ms + 100ms T = t + 300ms After 300ms Client A may move again!!! Client A Client B Delta T

slide-36
SLIDE 36

State Consistency: Case 2 (Async)

36

T = t Local update every 150ms Propagation delay is 100ms Client A Client B

slide-37
SLIDE 37

State Consistency: Case 2

37

T = t + 100ms Client A Client B

slide-38
SLIDE 38

State Consistency: Case 2

38

T = t + 150ms Client A Client B

slide-39
SLIDE 39

State Consistency: Case 2

39

T = t + 250ms Client A Client B Delta T

slide-40
SLIDE 40

State Consistency: Case 2

40

T = t + 300ms Client A Client B

slide-41
SLIDE 41

State Consistency: Case 2

41

T = t + 400ms Inconsistency!!! Client A Client B Delta T Delta T

slide-42
SLIDE 42

State Consistency: Problem

  • Would like to send data at the rate it is changing
  • Network is congested → retransmission

– BUT this makes congestion more likely

42

Consistency Update Frequency

slide-43
SLIDE 43

State Consistency: Total Consistency

Provided by Client/Server Architecture

  • Server controls total consistency of

database

  • Communication is reliable
  • Each Client reads from Server
  • Client sends updates to Server (dirty

cache)

  • Events are totally ordered

43

slide-44
SLIDE 44

State Consistency: Total Consistency

Pros

  • Guaranteed ordered event processing
  • Implicit ownership

Cons

  • Latency penalty: 2 Round Trip Time
  • Reliability not always compatible with real-time (msg +

ack)

  • Poor scalability

– Server is bottleneck

  • Server is single point of failure

44

slide-45
SLIDE 45

State Consistency: Eventual Consistency

  • Clients just send periodic updates
  • Discrepancy is tolerated if:

– Does not exceed a given time threshold – Does not dramatically a perceptual error threshold

  • Clients do not need acknowledgements
  • A client is unawares of other clients
  • Inconsistency inversely proportional update

frequency

45

slide-46
SLIDE 46

State Consistency: Eventual Consistency

  • Pros:

– Minimum latency – No infrastructure -> reduced processing overhead – Simple to upgrade a single user system to multi users – No bottleneck – Fault tolerant (no packets -> remove entity)

  • Cons:

– Explicit ownership – Bandwidth hungry (high frequency for low inconsistency) – Better scalability but still poor

46

slide-47
SLIDE 47

State Consistency: Predicted Consistency

Facts:

  • Users are not aware of other users
  • Total consistency is not a requirement
  • But eventual consistency has problems

47

Possible solution:

  • Dead reckoning
  • High level behaviours
slide-48
SLIDE 48

State Consistency: Predicted Consistency

  • Dead reckoning I

48

Client A Client B Ghost A Ghost B Movement Model: P(t) = P(t0) + v*t P(t) = P(t0) + v*t + 0.5 * a * t2

slide-49
SLIDE 49

State Consistency: Predicted Consistency

  • Dead reckoning II

49

Client A Simulation If new pos does not exceed error threshold then do nothing If new pos does exceed error threshold then send new position

slide-50
SLIDE 50

State Consistency: Predicted Consistency

  • Dead reckoning III - convergence

50

T = t

OR

T = t T = t+1 T = t+2

slide-51
SLIDE 51

State Consistency: Predicted Consistency

  • High level behaviours (Games)

51

Position A Position B

  • At each game interval send current position packet
  • If path takes 30 seconds and game tick is 10 per second
  • You have 300 packets being sent
slide-52
SLIDE 52

State Consistency: Predicted Consistency

  • High level behaviours (Games)

52

Position A Position B

  • Just send Destination Position B
  • Use path finding to compute best path
  • Not all users will see same path
  • But all will see final result
  • Send 1 packet only with parameters
slide-53
SLIDE 53

Summary

  • Networked VR

– allows new possibilities for interaction – Poses new challenges to VR designers

  • Three types of architectures exist and their

suitability depends on the target application

  • Consistency is at the heart of networked VR

53

slide-54
SLIDE 54
  • Part I: Goals
  • Part II: The Internet
  • Part III: Strategies
  • Part IV: Latency and Scalability

54

slide-55
SLIDE 55

Issues

  • Issues of Scale
  • Area Of Interest Management (AOIM)
  • Spatial Decomposition
  • Functional and Temporal Decomposition
  • Discussion
slide-56
SLIDE 56

Issues of Scale

slide-57
SLIDE 57

AOIM: Goals

  • A user is NOT an omniscient being
  • A user is NOT interested in every event
  • A client is NOT able to process everything
  • Just give each client enough to fool the

user

  • Interest: visibility, awareness, functional, …
  • Network and computational constraints
slide-58
SLIDE 58
  • Spatial Decomposition

– Based on locaton

  • Functional Decomposition

– Based on function – Army fleet – airplanes

  • Temporal Decomposition

– Based on update requirement (realtime vs delayed)

Environmental Decomposition

slide-59
SLIDE 59

Spatial Decomposition

  • Static Grid
  • Hierarchical Grid
  • Locales
  • Aura
  • Region
  • Filtering
  • Nearest Neighbours
slide-60
SLIDE 60

AOIM: Static Grid

  • 1 Cell = 1 Group
  • Hexagon regular shape
  • Tied into the grid – static
  • Send current cell
  • Receive neighbours
  • Any architecture

(distributed)

  • NPSNET (DIS)
slide-61
SLIDE 61

AOIM: Hierarchal Grid

  • 1 Cell = 1 Group
  • Square cells
  • Send current cell
  • Receive current cell
  • Any architecture

(distributed)

  • Exceeds threshold, expand

Threshold = 5

slide-62
SLIDE 62

AOIM: Locales

  • 1 locale = 1 group
  • Locale is arbitrary shape
  • Locale placement is static
  • Associated transform

matrix

  • Any architecture

(distributed)

  • MERL
slide-63
SLIDE 63

AOIM: Locales

  • 1 locale = 1 group
  • Locale is arbitrary shape
  • Locale placement is static
  • Associated transform

matrix

  • Any architecture

(distributed)

  • MERL
slide-64
SLIDE 64

AOIM: Locales

  • 1 locale = 1 group
  • Locale is arbitrary shape
  • Locale placement is static
  • Associated transform

matrix

  • Any architecture

(distributed)

  • MERL
slide-65
SLIDE 65

AOIM: Aura

  • Nimbus, Aura, Focus
  • Auras intersect = group
  • Focus, Nimbus =

awareness

  • Aura Manager
  • Client/Server
  • MASSIVE

Nimbus Focus Aura

slide-66
SLIDE 66

AOIM: Filtering

B

  • Line of sight
  • Entity visible = group
  • Client/Server

A C

slide-67
SLIDE 67

AOIM: Nearest Neighbours

  • 1 group = quorum
  • Computational/Network

constraints

  • Client/Server
  • Community Place
slide-68
SLIDE 68

AOIM: Nearest Neighbours

  • 1 group = quorum
  • Computational/Network

constraints

  • Client/Server
  • Community Place
slide-69
SLIDE 69

Distance function Layered nimbus

Level Of Detail

  • Integrate distance
  • 1 group = 1 send rate
  • Layered multicast
slide-70
SLIDE 70

Summary

  • Not possible to send everything about everything
  • Area of interest management

– Spatial, functional and temporal

  • Discussion