32
Hands-Free Server Discovery: Perforce and Zero-Configuration Networking If you want to participate in a demo, you can install Bonjour… http://www.apple.com/support/downloads/ bonjourforwindows.html Installed

Hands-Free Server Discovery: Perforce and Zero-Configuration ......“dash zero” Advertising off by default Example:-0 The Advertising Flag p4d p4p p4web p4ftpd-In 63 bytes of UTF-8

  • Upload
    others

  • View
    7

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Hands-Free Server Discovery: Perforce and Zero-Configuration ......“dash zero” Advertising off by default Example:-0 The Advertising Flag p4d p4p p4web p4ftpd-In 63 bytes of UTF-8

Hands-Free Server Discovery: Perforce and Zero-Configuration Networking

If you want to participate in a demo, you

can install Bonjour…

http://www.apple.com/support/downloads/

bonjourforwindows.html

Installed

Page 2: Hands-Free Server Discovery: Perforce and Zero-Configuration ......“dash zero” Advertising off by default Example:-0 The Advertising Flag p4d p4p p4web p4ftpd-In 63 bytes of UTF-8

EORUM CLARITATEM VESTIG ATIONES !APRIL 1, 2010

!

PAGE 1

“With the resurgence of the Atari ST, and its built"in MIDI ports, we are finally able to expose features that have been baked in

from the very beginning. Controlling

Perforce servers with a rack of synthesizers has always been been thought of as one of those “stand"up"and"look” features that brings velocity to our products.”Christopher Seiwald,

CTO Perforc! So"ware, Inc.

SCM NewsletterPerforce announces version for Atari ST

Industry"leading Perforce Software recently announced the Atari ST has become the featured platform for SCM. With the surprising demand in the marketplace for nostalgic

platforms, Perforce has literally out"nostalgia"ed the competition. With this new move, SCM will never be the same as it never was.

Page 3: Hands-Free Server Discovery: Perforce and Zero-Configuration ......“dash zero” Advertising off by default Example:-0 The Advertising Flag p4d p4p p4web p4ftpd-In 63 bytes of UTF-8

• Administrators

• First-time users confused about P4PORT

• Dynamic updating

• Cross-platform

Why Perforce and Zeroconf?

UNIX

3 Things

• How does Zeroconf work?

• How to use it with Perforce

• Writing Zeroconf software with Perforce

Page 4: Hands-Free Server Discovery: Perforce and Zero-Configuration ......“dash zero” Advertising off by default Example:-0 The Advertising Flag p4d p4p p4web p4ftpd-In 63 bytes of UTF-8

How does Zeroconf Work?

Zeroconf

Link-Local Addressing

(multi-cast) DNS finding a domain-name

finding an ip

finding a serviceService Discovery

Page 5: Hands-Free Server Discovery: Perforce and Zero-Configuration ......“dash zero” Advertising off by default Example:-0 The Advertising Flag p4d p4p p4web p4ftpd-In 63 bytes of UTF-8

Zeroconf

Link-Local Addressing

(multi-cast) DNS finding a domain-name

finding an ip

finding a serviceService Discovery

Zeroconf

Marco?

Polo!

Service Discovery

Page 6: Hands-Free Server Discovery: Perforce and Zero-Configuration ......“dash zero” Advertising off by default Example:-0 The Advertising Flag p4d p4p p4web p4ftpd-In 63 bytes of UTF-8

DNSacme.com

pub.acme.com

I've got a webserver called "Personal Web" listening on port 8080

DNSacme.com

Page 7: Hands-Free Server Discovery: Perforce and Zero-Configuration ......“dash zero” Advertising off by default Example:-0 The Advertising Flag p4d p4p p4web p4ftpd-In 63 bytes of UTF-8

pub.acme.com

I've got a webserver called "Personal Web" listening on port 8080

goof.acme.com

DNSacme.com

pub.acme.com

I've got a webserver called "Personal Web" listening on port 8080

Do you know any webservers?

goof.acme.com

DNSacme.com

Page 8: Hands-Free Server Discovery: Perforce and Zero-Configuration ......“dash zero” Advertising off by default Example:-0 The Advertising Flag p4d p4p p4web p4ftpd-In 63 bytes of UTF-8

pub.acme.com

I've got a webserver called "Personal Web" listening on port 8080

Do you know any webservers?

I know one called

"Personal Web" at

pub.acme.com:8080

goof.acme.com

!DNSacme.com

pub.acme.com

I've got a webserver called "Personal Web" listening on port 8080

Do you know any webservers?

I know one called

"Personal Web" at

pub.acme.com:8080

goof.acme.com

!

Page 9: Hands-Free Server Discovery: Perforce and Zero-Configuration ......“dash zero” Advertising off by default Example:-0 The Advertising Flag p4d p4p p4web p4ftpd-In 63 bytes of UTF-8

Multi-cast DNS

Multicast DNS

mDNSResponder

Page 10: Hands-Free Server Discovery: Perforce and Zero-Configuration ......“dash zero” Advertising off by default Example:-0 The Advertising Flag p4d p4p p4web p4ftpd-In 63 bytes of UTF-8

Multicast DNS

.local

Multicast DNS

mDNS

Page 11: Hands-Free Server Discovery: Perforce and Zero-Configuration ......“dash zero” Advertising off by default Example:-0 The Advertising Flag p4d p4p p4web p4ftpd-In 63 bytes of UTF-8

.local

Multicast DNS

pub.local

goof.local

mDNS

.local

Multicast DNS

pub.local

goof.local

I've got a webserver called "Personal Web" listening on port 8080

mDNS

Page 12: Hands-Free Server Discovery: Perforce and Zero-Configuration ......“dash zero” Advertising off by default Example:-0 The Advertising Flag p4d p4p p4web p4ftpd-In 63 bytes of UTF-8

.local

Multicast DNS

pub.local

goof.local

I've got a webserver called "Personal Web" listening on port 8080

Do you know any webservers?

mDNS

.local

Multicast DNS

pub.local

goof.local

I've got a webserver called "Personal Web" listening on port 8080

Do you know any webservers?

I know one called

"Personal Web" at

pub.local:8080

mDNS

Page 13: Hands-Free Server Discovery: Perforce and Zero-Configuration ......“dash zero” Advertising off by default Example:-0 The Advertising Flag p4d p4p p4web p4ftpd-In 63 bytes of UTF-8

Demo

Page 14: Hands-Free Server Discovery: Perforce and Zero-Configuration ......“dash zero” Advertising off by default Example:-0 The Advertising Flag p4d p4p p4web p4ftpd-In 63 bytes of UTF-8

p4d

pub.local

goof.local

I've got a p4d called "Main", listening on port 1666

Do you know any p4ds?

I know one called

"Main" at

pub.local:1666

.localmDNS

Page 15: Hands-Free Server Discovery: Perforce and Zero-Configuration ......“dash zero” Advertising off by default Example:-0 The Advertising Flag p4d p4p p4web p4ftpd-In 63 bytes of UTF-8

Using Zeroconf with Perforce

Servers and Clients

Servers

“Advertisers”

p4d

Clients

“Browsers”

p4vp4

p4webp4p

p4ftpd

Page 16: Hands-Free Server Discovery: Perforce and Zero-Configuration ......“dash zero” Advertising off by default Example:-0 The Advertising Flag p4d p4p p4web p4ftpd-In 63 bytes of UTF-8

Servers and Clients

Servers

“Advertisers”

p4dp4web

p4pp4ftpd

Servers and Clients

Servers

“Advertisers”

p4dp4web

p4pp4ftpd

3 New Flags

Page 17: Hands-Free Server Discovery: Perforce and Zero-Configuration ......“dash zero” Advertising off by default Example:-0 The Advertising Flag p4d p4p p4web p4ftpd-In 63 bytes of UTF-8

p4d

p4p

p4web

p4ftpd

-0

“dash zero”Advertising off by default

Example:

-0

The Advertising Flag

p4d

p4p

p4web

p4ftpd

-In63 bytes of UTF-8Useful without ZeroconfShows up in p4 -ztag info output

Example:

-0 -In “Main”

The Naming Flag

Page 18: Hands-Free Server Discovery: Perforce and Zero-Configuration ......“dash zero” Advertising off by default Example:-0 The Advertising Flag p4d p4p p4web p4ftpd-In 63 bytes of UTF-8

p4d

p4p

p4web

p4ftpd

-Id243 bytes of UTF-8Useful without ZeroconfShows up in p4 -ztag info output

Example:

-0 -In “Main” -Id “Main Development Server”

The Description Flag

Servers and Clients

Servers

“Advertisers”

p4dp4web

p4pp4ftpd

3 New Flags

Page 19: Hands-Free Server Discovery: Perforce and Zero-Configuration ......“dash zero” Advertising off by default Example:-0 The Advertising Flag p4d p4p p4web p4ftpd-In 63 bytes of UTF-8

Servers and Clients

Clients

“Browsers”

p4vp4

p4webp4p

p4ftpd

-0 -In "Main"

-Id "Development only. Check your core dumps

into the debugging server"

-0 -In "Perforce 日本" -Id "メーン・デバ・サーバー"

Main Development Development only. Check your core dumps in

Perforce 日本 メーン・デバ・サーバー

Page 20: Hands-Free Server Discovery: Perforce and Zero-Configuration ......“dash zero” Advertising off by default Example:-0 The Advertising Flag p4d p4p p4web p4ftpd-In 63 bytes of UTF-8

host:portperforce.acme.com:1666

P4PORT

pub.local

goof.local

Do you know any p4ds?

I know one called "Main" at pub.local:1666

I've got a p4d called "Main", listening on port 1666

.localmDNS

Page 21: Hands-Free Server Discovery: Perforce and Zero-Configuration ......“dash zero” Advertising off by default Example:-0 The Advertising Flag p4d p4p p4web p4ftpd-In 63 bytes of UTF-8

pub.local

goof.local

Do you know any p4ds?

I know one called "Main" at pub.local:1666

I've got a p4d called "Main", listening on port 1666

.localmDNS

pub.local

goof.local

Do you know any p4ds?

I know one called "Main" at pub.local:1666

I've got a p4d called "Main", listening on port 1666

.localmDNS

Page 22: Hands-Free Server Discovery: Perforce and Zero-Configuration ......“dash zero” Advertising off by default Example:-0 The Advertising Flag p4d p4p p4web p4ftpd-In 63 bytes of UTF-8

P4PORT

host:portperforce.acme.com:1666

P4PORT

Human-Readable NameMain

host:portperforce.acme.com:1666

Page 23: Hands-Free Server Discovery: Perforce and Zero-Configuration ......“dash zero” Advertising off by default Example:-0 The Advertising Flag p4d p4p p4web p4ftpd-In 63 bytes of UTF-8

P4PORT demo

-0 -In "Main"

p4web -p "Main" -0 -In "mbishop's"

mbishop's

No host:port

mbishop's

Page 24: Hands-Free Server Discovery: Perforce and Zero-Configuration ......“dash zero” Advertising off by default Example:-0 The Advertising Flag p4d p4p p4web p4ftpd-In 63 bytes of UTF-8

-0 -In "Main"

-p 1666

perforce

acme.com

Same local-name, Different network

(P4V finds "Main")

-0 -In "Main"

-p 1666

perforce

acme.com

Same local-name, Different network

(P4V finds "Main")

Page 25: Hands-Free Server Discovery: Perforce and Zero-Configuration ......“dash zero” Advertising off by default Example:-0 The Advertising Flag p4d p4p p4web p4ftpd-In 63 bytes of UTF-8

-0 -In "Main"

-p 1666

perforce

acme.com

-t perforce.acme.com:1666

-0 -In "Main"

acme.co.uk

p4p

Same local-name, Different network

(P4V finds "Main")

-0 -In "Main"

-p 1666

perforce

acme.com

-t perforce.acme.com:1666

-0 -In "Main"

acme.co.uk

p4p

Same local-name, Different network

(P4V finds "Main")

Page 26: Hands-Free Server Discovery: Perforce and Zero-Configuration ......“dash zero” Advertising off by default Example:-0 The Advertising Flag p4d p4p p4web p4ftpd-In 63 bytes of UTF-8

Writing Zeroconf software with

Perforce

Zeroconf programming

Page 27: Hands-Free Server Discovery: Perforce and Zero-Configuration ......“dash zero” Advertising off by default Example:-0 The Advertising Flag p4d p4p p4web p4ftpd-In 63 bytes of UTF-8

pub.local

goof.local

I've got a called "Main", listening on port 1666

Do you know any

I know one called

"Main" at

pub.local:1666

p4ds?

p4d

.localmDNS

pub.local

goof.local

I've got a called "Main", listening on port 1666

Do you know any

I know one called

"Main" at

pub.local:1666

_p4._tcp?

_p4._tcp

.localmDNS

Page 28: Hands-Free Server Discovery: Perforce and Zero-Configuration ......“dash zero” Advertising off by default Example:-0 The Advertising Flag p4d p4p p4web p4ftpd-In 63 bytes of UTF-8

Service-types

• Unique identifier

• Service types describe protocol and the intent of

protocol

• “web-server” = _http._tcp

• “FTP server” = _ftp._tcp

• “Perforce protocol” = _p4._tcp

• complete registry at:

http://www.dns-sd.org/ServiceTypes.html

Subtypes for p4web, p4ftpd

_http._tcp

_ftp._tcpp4web

p4ftpd

Service-type

Page 29: Hands-Free Server Discovery: Perforce and Zero-Configuration ......“dash zero” Advertising off by default Example:-0 The Advertising Flag p4d p4p p4web p4ftpd-In 63 bytes of UTF-8

Subtypes for p4web, p4ftpd

_http._tcp

_ftp._tcpp4web

p4ftpd

Service-type

,p4

,p4

sub-type

pub.local

goof.local

I've got a _p4._tcp called "Main", listening on port 1666

Do you know

any _p4._tcp?

I know one called "Main"

at pub.local:1666

.localmDNS

Page 30: Hands-Free Server Discovery: Perforce and Zero-Configuration ......“dash zero” Advertising off by default Example:-0 The Advertising Flag p4d p4p p4web p4ftpd-In 63 bytes of UTF-8

pub.local

goof.local

I've got a _p4._tcp called "Main", listening on port 1666

Do you know

any _p4._tcp?

I know one called "Main"

at pub.local:1666

description="Main development server"

version="P4D/DARWIN80X86/2008.1/136993"

description="Main development server"

version="P4D/DARWIN80X86/2008.1/136993"

.localmDNS

TXT Records per protocol

Key p4d p4p p4web p4ftpd example

description X X X X “This is my server”

version X X X X “P4D/MACOSX104X86/2007.2/122958”

target X X X “perforce.acme.com:1666”

“Test Server”

unicode X X <no value>

Page 31: Hands-Free Server Discovery: Perforce and Zero-Configuration ......“dash zero” Advertising off by default Example:-0 The Advertising Flag p4d p4p p4web p4ftpd-In 63 bytes of UTF-8

P4PORT Changes

• To simplify code, pass P4PORT straight

through to the p4api as a string.

• Use serverAddress from p4 -ztag info

as a key to client-side data. P4PORT is not

unique per-server.

Conference bonus

• Perforce 7.3 has p4d advertising

• -0 - advertises

• -n - Human-Readable Name

• -o - “Comment”

• dns-sd tool allows you to advertise (and

browse) pre-8.1 servers.

• You have to specify TXT Records manually

dns-sd -P “Main” _p4._tcp local 1666 perforce.acme.com

10.0.0.34 description=”Main Development Server”

version=”P4D/DARWIN80X86/2006.2/122958”

Page 32: Hands-Free Server Discovery: Perforce and Zero-Configuration ......“dash zero” Advertising off by default Example:-0 The Advertising Flag p4d p4p p4web p4ftpd-In 63 bytes of UTF-8

Q&A

Thank you

• More information in the whitepaper

• Please give us feedback!

[email protected]