Upload
others
View
7
Download
0
Embed Size (px)
Citation preview
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
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.
• 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
How does Zeroconf Work?
Zeroconf
Link-Local Addressing
(multi-cast) DNS finding a domain-name
finding an ip
finding a serviceService Discovery
Zeroconf
Link-Local Addressing
(multi-cast) DNS finding a domain-name
finding an ip
finding a serviceService Discovery
Zeroconf
Marco?
Polo!
Service Discovery
DNSacme.com
pub.acme.com
I've got a webserver called "Personal Web" listening on port 8080
DNSacme.com
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
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
!
Multi-cast DNS
Multicast DNS
mDNSResponder
Multicast DNS
.local
Multicast DNS
mDNS
.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
.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
Demo
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
Using Zeroconf with Perforce
Servers and Clients
Servers
“Advertisers”
p4d
Clients
“Browsers”
p4vp4
p4webp4p
p4ftpd
Servers and Clients
Servers
“Advertisers”
p4dp4web
p4pp4ftpd
Servers and Clients
Servers
“Advertisers”
p4dp4web
p4pp4ftpd
3 New Flags
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
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
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 日本 メーン・デバ・サーバー
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
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
P4PORT
host:portperforce.acme.com:1666
P4PORT
Human-Readable NameMain
host:portperforce.acme.com:1666
P4PORT demo
-0 -In "Main"
p4web -p "Main" -0 -In "mbishop's"
mbishop's
No host:port
mbishop's
-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")
-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")
Writing Zeroconf software with
Perforce
Zeroconf programming
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
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
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
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>
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”