SlideShare una empresa de Scribd logo
1 de 186
Descargar para leer sin conexión
APPLE BONJOUR,
                                  LET’S TALK!




 Nicholas Valbusa - @squallstar
 Intesys Web Agency



Thursday, May 24, 12
Thursday, May 24, 12
Few words about me




Thursday, May 24, 12
Few words about me

                           Nicholas Valbusa
                           @squallstar




Thursday, May 24, 12
Few words about me

                           Nicholas Valbusa
                           @squallstar


                           Web Developer since 2004




Thursday, May 24, 12
Few words about me

                           Nicholas Valbusa
                           @squallstar


                           Web Developer since 2004

                           Mobile Developer since 2010




Thursday, May 24, 12
Few words about me

                           Nicholas Valbusa
                           @squallstar


                           Web Developer since 2004

                           Mobile Developer since 2010
                           WHYMCA 2011: Webkit meets Native development




Thursday, May 24, 12
Thursday, May 24, 12
Intesys è una Web Agency Innovativa
                              nata nel 1995 a Verona




Thursday, May 24, 12
Intesys è una Web Agency Innovativa
                               nata nel 1995 a Verona



                       Un team di 90 specialisti divisi in 4 aree




Thursday, May 24, 12
Intesys è una Web Agency Innovativa
                               nata nel 1995 a Verona



                       Un team di 90 specialisti divisi in 4 aree




Thursday, May 24, 12
We’ll talk about




Thursday, May 24, 12
We’ll talk about




Thursday, May 24, 12
We’ll talk about




Thursday, May 24, 12
We’ll talk about


                       • TCP/IP




Thursday, May 24, 12
We’ll talk about


                       • TCP/IP
                       • Apple Bonjour, uPNP




Thursday, May 24, 12
We’ll talk about


                       • TCP/IP
                       • Apple Bonjour, uPNP
                       • Socket, Stream, Buffers




Thursday, May 24, 12
We’ll talk about


                       • TCP/IP
                       • Apple Bonjour, uPNP
                       • Socket, Stream, Buffers
                       • Create and publish a server




Thursday, May 24, 12
We’ll talk about


                       • TCP/IP
                       • Apple Bonjour, uPNP
                       • Socket, Stream, Buffers
                       • Create and publish a server
                       • Join a server




Thursday, May 24, 12
We’ll talk about


                       • TCP/IP
                       • Apple Bonjour, uPNP
                       • Socket, Stream, Buffers
                       • Create and publish a server
                       • Join a server
                       • Network messages




Thursday, May 24, 12
We’ll talk about


                       • TCP/IP
                       • Apple Bonjour, uPNP
                       • Socket, Stream, Buffers
                       • Create and publish a server
                       • Join a server
                       • Network messages
                       • Other...



Thursday, May 24, 12
We’ll see




Thursday, May 24, 12
We’ll see

                       • A screencast native application




Thursday, May 24, 12
We’ll see

                       • A screencast native application
                       • Something like chats




Thursday, May 24, 12
We’ll see

                       • A screencast native application
                       • Something like chats
                       • Where server can send images and other things




Thursday, May 24, 12
We’ll see

                       • A screencast native application
                       • Something like chats
                       • Where server can send images and other things


                        Follow the talk from your iPad using the same app
                        that we’re going to make




                                                           iCast




Thursday, May 24, 12
iCast




Thursday, May 24, 12
iCast




Thursday, May 24, 12
iCast




Thursday, May 24, 12
Thursday, May 24, 12
“Once upon a time”




Thursday, May 24, 12
“Once upon a time”

                            Apple Talk




Thursday, May 24, 12
“Once upon a time”

                                    Apple Talk

                       • Protocollo usato nelle reti Macintosh




Thursday, May 24, 12
“Once upon a time”

                                    Apple Talk

                       • Protocollo usato nelle reti Macintosh
                       • Condivisione di file e stampanti




Thursday, May 24, 12
“Once upon a time”

                                    Apple Talk

                       • Protocollo usato nelle reti Macintosh
                       • Condivisione di file e stampanti
                       • Uno dei primi sistemi plug-n-play




Thursday, May 24, 12
Thursday, May 24, 12
“things changes”




Thursday, May 24, 12
“things changes”

                           TCP/IP




Thursday, May 24, 12
“things changes”

                           TCP/IP

       • Negli anni novanta, con la diffusione del TCP/IP
         Apple dismesse AppleTalk




Thursday, May 24, 12
“things changes”

                           TCP/IP

       • Negli anni novanta, con la diffusione del TCP/IP
         Apple dismesse AppleTalk
       • Finalmente i Mac potevano connettersi con
         altri sistemi operativi




Thursday, May 24, 12
Thursday, May 24, 12
Zeroconf
                        DHCP DNS




Thursday, May 24, 12
Zeroconf
                            DHCP DNS




            “A set of techniques that automatically
            creates a usable IP network without manual
            operator intervention”




Thursday, May 24, 12
Thursday, May 24, 12
Bonjour




Thursday, May 24, 12
Bonjour
                           L’implementazione Apple
                       di “Zero configuration network”




Thursday, May 24, 12
Bonjour
                           L’implementazione Apple
                       di “Zero configuration network”

                               “It just works”




Thursday, May 24, 12
Bonjour
                           L’implementazione Apple
                       di “Zero configuration network”

                               “It just works”

                                        • mDNS + DNS Service discovery




Thursday, May 24, 12
Bonjour
                           L’implementazione Apple
                       di “Zero configuration network”

                               “It just works”

                                        • mDNS + DNS Service discovery
                                        • Address assignment




Thursday, May 24, 12
Bonjour
                           L’implementazione Apple
                       di “Zero configuration network”

                               “It just works”

                                        • mDNS + DNS Service discovery
                                        • Address assignment
                                        • Name resolution




Thursday, May 24, 12
Bonjour




Thursday, May 24, 12
Bonjour

                • Built-in con OSX e iOS.




Thursday, May 24, 12
Bonjour

                • Built-in con OSX e iOS.
                • Installabile su Windows




Thursday, May 24, 12
Bonjour

                • Built-in con OSX e iOS.
                • Installabile su Windows
                • Incluso in Safari e iTunes.




Thursday, May 24, 12
Bonjour

                • Built-in con OSX e iOS.
                • Installabile su Windows
                • Incluso in Safari e iTunes.
                • Incluso nella Creative Suite 3 di Adobe




Thursday, May 24, 12
Thursday, May 24, 12
Who uses it




Thursday, May 24, 12
Who uses it
                       • iTunes finds shared music




Thursday, May 24, 12
Who uses it
                       • iTunes finds shared music
                       • iPhotos finds shared photos




Thursday, May 24, 12
Who uses it
                       • iTunes finds shared music
                       • iPhotos finds shared photos
                       • iChat, Skype, Adium




Thursday, May 24, 12
Who uses it
                       •   iTunes finds shared music
                       •   iPhotos finds shared photos
                       •   iChat, Skype, Adium
                       •   Adobe Creative Suite 3+




Thursday, May 24, 12
Who uses it
                       •   iTunes finds shared music
                       •   iPhotos finds shared photos
                       •   iChat, Skype, Adium
                       •   Adobe Creative Suite 3+
                       •   Things, Omnifocus




Thursday, May 24, 12
Who uses it
                       •   iTunes finds shared music
                       •   iPhotos finds shared photos
                       •   iChat, Skype, Adium
                       •   Adobe Creative Suite 3+
                       •   Things, Omnifocus
                       •   Cyberduck, Coda, SubEthaEdit




Thursday, May 24, 12
Who uses it
                       •   iTunes finds shared music
                       •   iPhotos finds shared photos
                       •   iChat, Skype, Adium
                       •   Adobe Creative Suite 3+
                       •   Things, Omnifocus
                       •   Cyberduck, Coda, SubEthaEdit
                       •   PostgreSQL




Thursday, May 24, 12
Who uses it
                       •   iTunes finds shared music
                       •   iPhotos finds shared photos
                       •   iChat, Skype, Adium
                       •   Adobe Creative Suite 3+
                       •   Things, Omnifocus
                       •   Cyberduck, Coda, SubEthaEdit
                       •   PostgreSQL
                       •   All uPNP-enabled devices


Thursday, May 24, 12
Thursday, May 24, 12
Who can also use it




Thursday, May 24, 12
Who can also use it




Thursday, May 24, 12
Who can also use it




                       Using “jmDNS”, a Java implementation
                       of multi-cast DNS for LAN service registration/discovery.




Thursday, May 24, 12
Thursday, May 24, 12
uPNP
                       Universal plug-n-play




Thursday, May 24, 12
uPNP
                              Universal plug-n-play


                 • It’s just another implementation of Zeroconf




Thursday, May 24, 12
uPNP
                              Universal plug-n-play


                 • It’s just another implementation of Zeroconf
                 • Media servers, Consoles, DLNA servers...




Thursday, May 24, 12
uPNP
                              Universal plug-n-play


                 • It’s just another implementation of Zeroconf
                 • Media servers, Consoles, DLNA servers...
                 • No authentication




Thursday, May 24, 12
uPNP
                              Universal plug-n-play


                 • It’s just another implementation of Zeroconf
                 • Media servers, Consoles, DLNA servers...
                 • No authentication
                 • No mDNS




Thursday, May 24, 12
Thursday, May 24, 12
Bonjour: Service Publication




Thursday, May 24, 12
Bonjour: Service Publication




Thursday, May 24, 12
Thursday, May 24, 12
Bonjour: Service Publication




Thursday, May 24, 12
Bonjour: Service Publication




Thursday, May 24, 12
Thursday, May 24, 12
Bonjour: Query for services




Thursday, May 24, 12
Bonjour: Query for services




Thursday, May 24, 12
Thursday, May 24, 12
Bonjour: Connect




Thursday, May 24, 12
Bonjour: Connect




Thursday, May 24, 12
Thursday, May 24, 12
Sockets vs Streams




Thursday, May 24, 12
Sockets vs Streams

                       • Socket: unique communication
                         endpoint on the network




Thursday, May 24, 12
Sockets vs Streams

                       • Socket: unique communication
                         endpoint on the network

                       • Stream: one-way channel through
                         which data is transmitted serially




Thursday, May 24, 12
Thursday, May 24, 12
We will use




Thursday, May 24, 12
We will use

                       • Stream sockets that are paired up
                         to allow our app to send data over
                         network using TCP/IP




Thursday, May 24, 12
We will use

                       • Stream sockets that are paired up
                         to allow our app to send data over
                         network using TCP/IP

                       • Asynchronous, non-blocking
                         operations




Thursday, May 24, 12
Thursday, May 24, 12
3 Networking Classes




Thursday, May 24, 12
3 Networking Classes
                       Server class:




Thursday, May 24, 12
3 Networking Classes
                       Server class:
                         • Creates a server




Thursday, May 24, 12
3 Networking Classes
                       Server class:
                         • Creates a server
                         • Announces the server via Bonjour




Thursday, May 24, 12
3 Networking Classes
                       Server class:
                         • Creates a server
                         • Announces the server via Bonjour

                       Connection class:




Thursday, May 24, 12
3 Networking Classes
                       Server class:
                         • Creates a server
                         • Announces the server via Bonjour

                       Connection class:
                         • Resolves Bonjour Services




Thursday, May 24, 12
3 Networking Classes
                       Server class:
                         • Creates a server
                         • Announces the server via Bonjour

                       Connection class:
                         • Resolves Bonjour Services
                         • Establishes connections to other servers




Thursday, May 24, 12
3 Networking Classes
                       Server class:
                         • Creates a server
                         • Announces the server via Bonjour

                       Connection class:
                         • Resolves Bonjour Services
                         • Establishes connections to other servers
                         • Exchanges data via socket streams




Thursday, May 24, 12
3 Networking Classes
                       Server class:
                         • Creates a server
                         • Announces the server via Bonjour

                       Connection class:
                         • Resolves Bonjour Services
                         • Establishes connections to other servers
                         • Exchanges data via socket streams

                       Server Browser class:




Thursday, May 24, 12
3 Networking Classes
                       Server class:
                         • Creates a server
                         • Announces the server via Bonjour

                       Connection class:
                         • Resolves Bonjour Services
                         • Establishes connections to other servers
                         • Exchanges data via socket streams

                       Server Browser class:
                         • Browses for other servers via Bonjour



Thursday, May 24, 12
Thursday, May 24, 12
Application layers




Thursday, May 24, 12
Application layers




Thursday, May 24, 12
Application layers




Thursday, May 24, 12
Application layers




Thursday, May 24, 12
Thursday, May 24, 12
Down the Connection class




Thursday, May 24, 12
Down the Connection class




                       2 stream sockets (one for writing, one for reading)
                        2 data buffers (one for each socket stream)


Thursday, May 24, 12
Thursday, May 24, 12
Network messages




Thursday, May 24, 12
Network messages

          How do we separate network messages from one another?




Thursday, May 24, 12
Network messages

          How do we separate network messages from one another?

           3 different ways:




Thursday, May 24, 12
Network messages

          How do we separate network messages from one another?

           3 different ways:
              1) Make all messages have the same length




Thursday, May 24, 12
Network messages

          How do we separate network messages from one another?

           3 different ways:
              1) Make all messages have the same length
              2) Append a marker to each message




Thursday, May 24, 12
Network messages

          How do we separate network messages from one another?

           3 different ways:
              1) Make all messages have the same length
              2) Append a marker to each message
              3) Send some kind of header with some info about how long the
                 message is




Thursday, May 24, 12
Network messages

          How do we separate network messages from one another?

           3 different ways:
              1) Make all messages have the same length
              2) Append a marker to each message
              3) Send some kind of header with some info about how long the
                 message is




Thursday, May 24, 12
Thursday, May 24, 12
3) Send some kind of header...




Thursday, May 24, 12
3) Send some kind of header...


                       Writing messages




Thursday, May 24, 12
3) Send some kind of header...


                                 Writing messages

               • Convert an object into a byte array and measure its length




Thursday, May 24, 12
3) Send some kind of header...


                                  Writing messages

               • Convert an object into a byte array and measure its length
               • Write the integer (4 bytes) that represents the length of our byte
                 array to the stream




Thursday, May 24, 12
3) Send some kind of header...


                                  Writing messages

               • Convert an object into a byte array and measure its length
               • Write the integer (4 bytes) that represents the length of our byte
                 array to the stream
               • Write the actual byte array to the stream




Thursday, May 24, 12
Reading messages




Thursday, May 24, 12
Reading messages




               • Read first 4 bytes and interpret those as an integer called “x”




Thursday, May 24, 12
Reading messages




               • Read first 4 bytes and interpret those as an integer called “x”

               • Read “x” number of bytes.
                       (stop when enough data has been received)




Thursday, May 24, 12
Reading messages




               • Read first 4 bytes and interpret those as an integer called “x”

               • Read “x” number of bytes.
                       (stop when enough data has been received)


               • Turn received sequence of bytes back into an object.




Thursday, May 24, 12
Thursday, May 24, 12
It’s time!




Thursday, May 24, 12
Thursday, May 24, 12
Frameworks




Thursday, May 24, 12
Frameworks

                       • Low level: BSD socket lib




Thursday, May 24, 12
Frameworks

                       • Low level: BSD socket lib




Thursday, May 24, 12
Frameworks

                       • Low level: BSD socket lib

                       • High level: CFNetwork




Thursday, May 24, 12
Frameworks

                       • Low level: BSD socket lib

                       • High level: CFNetwork

                       • Bonjour iOS API: NSNetServices,
                         CFNetServices




Thursday, May 24, 12
Thursday, May 24, 12
Creating a server




Thursday, May 24, 12
Creating a server

                 We first create a stream
                 socket that will listen for
                       connections




Thursday, May 24, 12
Creating a server

                 We first create a stream
                 socket that will listen for
                       connections

          CFSocketRef listeningSocket;




Thursday, May 24, 12
Creating a server

                 We first create a stream
                 socket that will listen for
                       connections

          CFSocketRef listeningSocket;


                       using port number 0




Thursday, May 24, 12
Creating a server

                 We first create a stream
                 socket that will listen for
                       connections

          CFSocketRef listeningSocket;


                       using port number 0


                       zero???? O_o



Thursday, May 24, 12
Thursday, May 24, 12
Let’s publish the service




Thursday, May 24, 12
Let’s publish the service




Thursday, May 24, 12
Thursday, May 24, 12
Services/Servers Browser




Thursday, May 24, 12
Services/Servers Browser




Thursday, May 24, 12
Thursday, May 24, 12
Found!




Thursday, May 24, 12
Found!




Thursday, May 24, 12
Thursday, May 24, 12
Displaying servers list




Thursday, May 24, 12
Displaying servers list




Thursday, May 24, 12
Thursday, May 24, 12
Please let me join




Thursday, May 24, 12
Please let me join




Thursday, May 24, 12
Please let me join




Thursday, May 24, 12
Please let me join




Thursday, May 24, 12
Please let me join




Thursday, May 24, 12
Thursday, May 24, 12
The server receives the “request”




Thursday, May 24, 12
The server receives the “request”




Thursday, May 24, 12
Thursday, May 24, 12
The server welcomes you




Thursday, May 24, 12
The server welcomes you




Thursday, May 24, 12
The server welcomes you




Thursday, May 24, 12
Thursday, May 24, 12
The client receives the stream




Thursday, May 24, 12
The client receives the stream




Thursday, May 24, 12
Thursday, May 24, 12
Recap




Thursday, May 24, 12
Recap
          • Apple Talk, TCP/IP




Thursday, May 24, 12
Recap
          • Apple Talk, TCP/IP
          • Bonjour flow cycle, uPNP




Thursday, May 24, 12
Recap
          • Apple Talk, TCP/IP
          • Bonjour flow cycle, uPNP
          • Application layers, Socket, Stream, Buffers




Thursday, May 24, 12
Recap
          • Apple Talk, TCP/IP
          • Bonjour flow cycle, uPNP
          • Application layers, Socket, Stream, Buffers
          • Write/Read Network messages




Thursday, May 24, 12
Recap
          • Apple Talk, TCP/IP
          • Bonjour flow cycle, uPNP
          • Application layers, Socket, Stream, Buffers
          • Write/Read Network messages
          • Create and publish a server




Thursday, May 24, 12
Recap
          • Apple Talk, TCP/IP
          • Bonjour flow cycle, uPNP
          • Application layers, Socket, Stream, Buffers
          • Write/Read Network messages
          • Create and publish a server
          • Join a server




Thursday, May 24, 12
Recap
          • Apple Talk, TCP/IP
          • Bonjour flow cycle, uPNP
          • Application layers, Socket, Stream, Buffers
          • Write/Read Network messages
          • Create and publish a server
          • Join a server
          • Interaction between the client and the server




Thursday, May 24, 12
Recap
          • Apple Talk, TCP/IP
          • Bonjour flow cycle, uPNP
          • Application layers, Socket, Stream, Buffers
          • Write/Read Network messages
          • Create and publish a server
          • Join a server
          • Interaction between the client and the server

          • One more thing: server broadcasts messages to connected clients




Thursday, May 24, 12
Thursday, May 24, 12
Thank you.
                       Any questions?

                       Nicholas Valbusa
                       @squallstar



                       Intesys - @Intesys_IT - www.intesys.it




Thursday, May 24, 12

Más contenido relacionado

Similar a Apple Bonjour: Let's Talk!

Cloud Foundry the Open PaaS - OpenTour Austin Keynote
Cloud Foundry the Open PaaS - OpenTour Austin KeynoteCloud Foundry the Open PaaS - OpenTour Austin Keynote
Cloud Foundry the Open PaaS - OpenTour Austin KeynotePatrick Chanezon
 
Socket io - JSZurich
Socket io - JSZurichSocket io - JSZurich
Socket io - JSZurichstreunerlein
 
The seven more deadly sins of microservices final
The seven more deadly sins of microservices finalThe seven more deadly sins of microservices final
The seven more deadly sins of microservices finalHaufe-Lexware GmbH & Co KG
 
Haufe #msaday - Seven More Deadly Sins of Microservices by Daniel Bryant
Haufe #msaday - Seven More Deadly Sins of Microservices by Daniel Bryant Haufe #msaday - Seven More Deadly Sins of Microservices by Daniel Bryant
Haufe #msaday - Seven More Deadly Sins of Microservices by Daniel Bryant OpenCredo
 
Canary Analyze All The Things: How We Learned to Keep Calm and Release Often
Canary Analyze All The Things: How We Learned to Keep Calm and Release OftenCanary Analyze All The Things: How We Learned to Keep Calm and Release Often
Canary Analyze All The Things: How We Learned to Keep Calm and Release OftenC4Media
 
OpenStack in the Enterprise - NJ VMUG June 9, 2015 - Melissa Palmer
OpenStack in the Enterprise - NJ VMUG June 9, 2015 - Melissa PalmerOpenStack in the Enterprise - NJ VMUG June 9, 2015 - Melissa Palmer
OpenStack in the Enterprise - NJ VMUG June 9, 2015 - Melissa Palmervmiss33
 
E novance public cloud - openstackisrael-2013
E novance   public cloud - openstackisrael-2013E novance   public cloud - openstackisrael-2013
E novance public cloud - openstackisrael-2013Cloud Native Day Tel Aviv
 
We invented the Web. 20 years later we got Drupal.
We invented the Web. 20 years later we got Drupal.We invented the Web. 20 years later we got Drupal.
We invented the Web. 20 years later we got Drupal.nbocquetlinalis
 
Tech Jam 2015: O'Reilly Media
Tech Jam 2015: O'Reilly MediaTech Jam 2015: O'Reilly Media
Tech Jam 2015: O'Reilly MediaUS-Ignite
 
Big Data and OpenStack, a Love Story: Michael Still, Rackspace
Big Data and OpenStack, a Love Story: Michael Still, RackspaceBig Data and OpenStack, a Love Story: Michael Still, Rackspace
Big Data and OpenStack, a Love Story: Michael Still, RackspaceOpenStack
 
Global impact of OpenStack
Global impact of OpenStack   Global impact of OpenStack
Global impact of OpenStack openstackindia
 
Welcome to Consuming Linked Data tutorial WWW2010
Welcome to Consuming Linked Data tutorial WWW2010Welcome to Consuming Linked Data tutorial WWW2010
Welcome to Consuming Linked Data tutorial WWW2010Juan Sequeda
 
NoSql _ MongoDB - Italian Market copy
NoSql _ MongoDB - Italian Market copyNoSql _ MongoDB - Italian Market copy
NoSql _ MongoDB - Italian Market copyMongoDB
 
Forking Successfully - or is a branch better?
Forking Successfully - or is a branch better?Forking Successfully - or is a branch better?
Forking Successfully - or is a branch better?Colin Charles
 
Openstack In Real Life
Openstack In Real LifeOpenstack In Real Life
Openstack In Real LifePaul Guth
 
“Mobile Choices” and Library Anywhere (CILIP)
“Mobile Choices” and Library Anywhere (CILIP)“Mobile Choices” and Library Anywhere (CILIP)
“Mobile Choices” and Library Anywhere (CILIP)Tim Spalding
 

Similar a Apple Bonjour: Let's Talk! (20)

Whats New In Roller5
Whats New In Roller5Whats New In Roller5
Whats New In Roller5
 
Cloud Foundry the Open PaaS - OpenTour Austin Keynote
Cloud Foundry the Open PaaS - OpenTour Austin KeynoteCloud Foundry the Open PaaS - OpenTour Austin Keynote
Cloud Foundry the Open PaaS - OpenTour Austin Keynote
 
Taming the rabbit
Taming the rabbitTaming the rabbit
Taming the rabbit
 
Socket io - JSZurich
Socket io - JSZurichSocket io - JSZurich
Socket io - JSZurich
 
The seven more deadly sins of microservices final
The seven more deadly sins of microservices finalThe seven more deadly sins of microservices final
The seven more deadly sins of microservices final
 
Haufe #msaday - Seven More Deadly Sins of Microservices by Daniel Bryant
Haufe #msaday - Seven More Deadly Sins of Microservices by Daniel Bryant Haufe #msaday - Seven More Deadly Sins of Microservices by Daniel Bryant
Haufe #msaday - Seven More Deadly Sins of Microservices by Daniel Bryant
 
Canary Analyze All The Things: How We Learned to Keep Calm and Release Often
Canary Analyze All The Things: How We Learned to Keep Calm and Release OftenCanary Analyze All The Things: How We Learned to Keep Calm and Release Often
Canary Analyze All The Things: How We Learned to Keep Calm and Release Often
 
Windows 8
Windows 8Windows 8
Windows 8
 
Berlin.JS Meetup
Berlin.JS MeetupBerlin.JS Meetup
Berlin.JS Meetup
 
OpenStack in the Enterprise - NJ VMUG June 9, 2015 - Melissa Palmer
OpenStack in the Enterprise - NJ VMUG June 9, 2015 - Melissa PalmerOpenStack in the Enterprise - NJ VMUG June 9, 2015 - Melissa Palmer
OpenStack in the Enterprise - NJ VMUG June 9, 2015 - Melissa Palmer
 
E novance public cloud - openstackisrael-2013
E novance   public cloud - openstackisrael-2013E novance   public cloud - openstackisrael-2013
E novance public cloud - openstackisrael-2013
 
We invented the Web. 20 years later we got Drupal.
We invented the Web. 20 years later we got Drupal.We invented the Web. 20 years later we got Drupal.
We invented the Web. 20 years later we got Drupal.
 
Tech Jam 2015: O'Reilly Media
Tech Jam 2015: O'Reilly MediaTech Jam 2015: O'Reilly Media
Tech Jam 2015: O'Reilly Media
 
Big Data and OpenStack, a Love Story: Michael Still, Rackspace
Big Data and OpenStack, a Love Story: Michael Still, RackspaceBig Data and OpenStack, a Love Story: Michael Still, Rackspace
Big Data and OpenStack, a Love Story: Michael Still, Rackspace
 
Global impact of OpenStack
Global impact of OpenStack   Global impact of OpenStack
Global impact of OpenStack
 
Welcome to Consuming Linked Data tutorial WWW2010
Welcome to Consuming Linked Data tutorial WWW2010Welcome to Consuming Linked Data tutorial WWW2010
Welcome to Consuming Linked Data tutorial WWW2010
 
NoSql _ MongoDB - Italian Market copy
NoSql _ MongoDB - Italian Market copyNoSql _ MongoDB - Italian Market copy
NoSql _ MongoDB - Italian Market copy
 
Forking Successfully - or is a branch better?
Forking Successfully - or is a branch better?Forking Successfully - or is a branch better?
Forking Successfully - or is a branch better?
 
Openstack In Real Life
Openstack In Real LifeOpenstack In Real Life
Openstack In Real Life
 
“Mobile Choices” and Library Anywhere (CILIP)
“Mobile Choices” and Library Anywhere (CILIP)“Mobile Choices” and Library Anywhere (CILIP)
“Mobile Choices” and Library Anywhere (CILIP)
 

Último

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 

Último (20)

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 

Apple Bonjour: Let's Talk!

  • 1. APPLE BONJOUR, LET’S TALK! Nicholas Valbusa - @squallstar Intesys Web Agency Thursday, May 24, 12
  • 3. Few words about me Thursday, May 24, 12
  • 4. Few words about me Nicholas Valbusa @squallstar Thursday, May 24, 12
  • 5. Few words about me Nicholas Valbusa @squallstar Web Developer since 2004 Thursday, May 24, 12
  • 6. Few words about me Nicholas Valbusa @squallstar Web Developer since 2004 Mobile Developer since 2010 Thursday, May 24, 12
  • 7. Few words about me Nicholas Valbusa @squallstar Web Developer since 2004 Mobile Developer since 2010 WHYMCA 2011: Webkit meets Native development Thursday, May 24, 12
  • 9. Intesys è una Web Agency Innovativa nata nel 1995 a Verona Thursday, May 24, 12
  • 10. Intesys è una Web Agency Innovativa nata nel 1995 a Verona Un team di 90 specialisti divisi in 4 aree Thursday, May 24, 12
  • 11. Intesys è una Web Agency Innovativa nata nel 1995 a Verona Un team di 90 specialisti divisi in 4 aree Thursday, May 24, 12
  • 15. We’ll talk about • TCP/IP Thursday, May 24, 12
  • 16. We’ll talk about • TCP/IP • Apple Bonjour, uPNP Thursday, May 24, 12
  • 17. We’ll talk about • TCP/IP • Apple Bonjour, uPNP • Socket, Stream, Buffers Thursday, May 24, 12
  • 18. We’ll talk about • TCP/IP • Apple Bonjour, uPNP • Socket, Stream, Buffers • Create and publish a server Thursday, May 24, 12
  • 19. We’ll talk about • TCP/IP • Apple Bonjour, uPNP • Socket, Stream, Buffers • Create and publish a server • Join a server Thursday, May 24, 12
  • 20. We’ll talk about • TCP/IP • Apple Bonjour, uPNP • Socket, Stream, Buffers • Create and publish a server • Join a server • Network messages Thursday, May 24, 12
  • 21. We’ll talk about • TCP/IP • Apple Bonjour, uPNP • Socket, Stream, Buffers • Create and publish a server • Join a server • Network messages • Other... Thursday, May 24, 12
  • 23. We’ll see • A screencast native application Thursday, May 24, 12
  • 24. We’ll see • A screencast native application • Something like chats Thursday, May 24, 12
  • 25. We’ll see • A screencast native application • Something like chats • Where server can send images and other things Thursday, May 24, 12
  • 26. We’ll see • A screencast native application • Something like chats • Where server can send images and other things Follow the talk from your iPad using the same app that we’re going to make iCast Thursday, May 24, 12
  • 31. “Once upon a time” Thursday, May 24, 12
  • 32. “Once upon a time” Apple Talk Thursday, May 24, 12
  • 33. “Once upon a time” Apple Talk • Protocollo usato nelle reti Macintosh Thursday, May 24, 12
  • 34. “Once upon a time” Apple Talk • Protocollo usato nelle reti Macintosh • Condivisione di file e stampanti Thursday, May 24, 12
  • 35. “Once upon a time” Apple Talk • Protocollo usato nelle reti Macintosh • Condivisione di file e stampanti • Uno dei primi sistemi plug-n-play Thursday, May 24, 12
  • 38. “things changes” TCP/IP Thursday, May 24, 12
  • 39. “things changes” TCP/IP • Negli anni novanta, con la diffusione del TCP/IP Apple dismesse AppleTalk Thursday, May 24, 12
  • 40. “things changes” TCP/IP • Negli anni novanta, con la diffusione del TCP/IP Apple dismesse AppleTalk • Finalmente i Mac potevano connettersi con altri sistemi operativi Thursday, May 24, 12
  • 42. Zeroconf DHCP DNS Thursday, May 24, 12
  • 43. Zeroconf DHCP DNS “A set of techniques that automatically creates a usable IP network without manual operator intervention” Thursday, May 24, 12
  • 46. Bonjour L’implementazione Apple di “Zero configuration network” Thursday, May 24, 12
  • 47. Bonjour L’implementazione Apple di “Zero configuration network” “It just works” Thursday, May 24, 12
  • 48. Bonjour L’implementazione Apple di “Zero configuration network” “It just works” • mDNS + DNS Service discovery Thursday, May 24, 12
  • 49. Bonjour L’implementazione Apple di “Zero configuration network” “It just works” • mDNS + DNS Service discovery • Address assignment Thursday, May 24, 12
  • 50. Bonjour L’implementazione Apple di “Zero configuration network” “It just works” • mDNS + DNS Service discovery • Address assignment • Name resolution Thursday, May 24, 12
  • 52. Bonjour • Built-in con OSX e iOS. Thursday, May 24, 12
  • 53. Bonjour • Built-in con OSX e iOS. • Installabile su Windows Thursday, May 24, 12
  • 54. Bonjour • Built-in con OSX e iOS. • Installabile su Windows • Incluso in Safari e iTunes. Thursday, May 24, 12
  • 55. Bonjour • Built-in con OSX e iOS. • Installabile su Windows • Incluso in Safari e iTunes. • Incluso nella Creative Suite 3 di Adobe Thursday, May 24, 12
  • 57. Who uses it Thursday, May 24, 12
  • 58. Who uses it • iTunes finds shared music Thursday, May 24, 12
  • 59. Who uses it • iTunes finds shared music • iPhotos finds shared photos Thursday, May 24, 12
  • 60. Who uses it • iTunes finds shared music • iPhotos finds shared photos • iChat, Skype, Adium Thursday, May 24, 12
  • 61. Who uses it • iTunes finds shared music • iPhotos finds shared photos • iChat, Skype, Adium • Adobe Creative Suite 3+ Thursday, May 24, 12
  • 62. Who uses it • iTunes finds shared music • iPhotos finds shared photos • iChat, Skype, Adium • Adobe Creative Suite 3+ • Things, Omnifocus Thursday, May 24, 12
  • 63. Who uses it • iTunes finds shared music • iPhotos finds shared photos • iChat, Skype, Adium • Adobe Creative Suite 3+ • Things, Omnifocus • Cyberduck, Coda, SubEthaEdit Thursday, May 24, 12
  • 64. Who uses it • iTunes finds shared music • iPhotos finds shared photos • iChat, Skype, Adium • Adobe Creative Suite 3+ • Things, Omnifocus • Cyberduck, Coda, SubEthaEdit • PostgreSQL Thursday, May 24, 12
  • 65. Who uses it • iTunes finds shared music • iPhotos finds shared photos • iChat, Skype, Adium • Adobe Creative Suite 3+ • Things, Omnifocus • Cyberduck, Coda, SubEthaEdit • PostgreSQL • All uPNP-enabled devices Thursday, May 24, 12
  • 67. Who can also use it Thursday, May 24, 12
  • 68. Who can also use it Thursday, May 24, 12
  • 69. Who can also use it Using “jmDNS”, a Java implementation of multi-cast DNS for LAN service registration/discovery. Thursday, May 24, 12
  • 71. uPNP Universal plug-n-play Thursday, May 24, 12
  • 72. uPNP Universal plug-n-play • It’s just another implementation of Zeroconf Thursday, May 24, 12
  • 73. uPNP Universal plug-n-play • It’s just another implementation of Zeroconf • Media servers, Consoles, DLNA servers... Thursday, May 24, 12
  • 74. uPNP Universal plug-n-play • It’s just another implementation of Zeroconf • Media servers, Consoles, DLNA servers... • No authentication Thursday, May 24, 12
  • 75. uPNP Universal plug-n-play • It’s just another implementation of Zeroconf • Media servers, Consoles, DLNA servers... • No authentication • No mDNS Thursday, May 24, 12
  • 83. Bonjour: Query for services Thursday, May 24, 12
  • 84. Bonjour: Query for services Thursday, May 24, 12
  • 90. Sockets vs Streams • Socket: unique communication endpoint on the network Thursday, May 24, 12
  • 91. Sockets vs Streams • Socket: unique communication endpoint on the network • Stream: one-way channel through which data is transmitted serially Thursday, May 24, 12
  • 93. We will use Thursday, May 24, 12
  • 94. We will use • Stream sockets that are paired up to allow our app to send data over network using TCP/IP Thursday, May 24, 12
  • 95. We will use • Stream sockets that are paired up to allow our app to send data over network using TCP/IP • Asynchronous, non-blocking operations Thursday, May 24, 12
  • 98. 3 Networking Classes Server class: Thursday, May 24, 12
  • 99. 3 Networking Classes Server class: • Creates a server Thursday, May 24, 12
  • 100. 3 Networking Classes Server class: • Creates a server • Announces the server via Bonjour Thursday, May 24, 12
  • 101. 3 Networking Classes Server class: • Creates a server • Announces the server via Bonjour Connection class: Thursday, May 24, 12
  • 102. 3 Networking Classes Server class: • Creates a server • Announces the server via Bonjour Connection class: • Resolves Bonjour Services Thursday, May 24, 12
  • 103. 3 Networking Classes Server class: • Creates a server • Announces the server via Bonjour Connection class: • Resolves Bonjour Services • Establishes connections to other servers Thursday, May 24, 12
  • 104. 3 Networking Classes Server class: • Creates a server • Announces the server via Bonjour Connection class: • Resolves Bonjour Services • Establishes connections to other servers • Exchanges data via socket streams Thursday, May 24, 12
  • 105. 3 Networking Classes Server class: • Creates a server • Announces the server via Bonjour Connection class: • Resolves Bonjour Services • Establishes connections to other servers • Exchanges data via socket streams Server Browser class: Thursday, May 24, 12
  • 106. 3 Networking Classes Server class: • Creates a server • Announces the server via Bonjour Connection class: • Resolves Bonjour Services • Establishes connections to other servers • Exchanges data via socket streams Server Browser class: • Browses for other servers via Bonjour Thursday, May 24, 12
  • 113. Down the Connection class Thursday, May 24, 12
  • 114. Down the Connection class 2 stream sockets (one for writing, one for reading) 2 data buffers (one for each socket stream) Thursday, May 24, 12
  • 117. Network messages How do we separate network messages from one another? Thursday, May 24, 12
  • 118. Network messages How do we separate network messages from one another? 3 different ways: Thursday, May 24, 12
  • 119. Network messages How do we separate network messages from one another? 3 different ways: 1) Make all messages have the same length Thursday, May 24, 12
  • 120. Network messages How do we separate network messages from one another? 3 different ways: 1) Make all messages have the same length 2) Append a marker to each message Thursday, May 24, 12
  • 121. Network messages How do we separate network messages from one another? 3 different ways: 1) Make all messages have the same length 2) Append a marker to each message 3) Send some kind of header with some info about how long the message is Thursday, May 24, 12
  • 122. Network messages How do we separate network messages from one another? 3 different ways: 1) Make all messages have the same length 2) Append a marker to each message 3) Send some kind of header with some info about how long the message is Thursday, May 24, 12
  • 124. 3) Send some kind of header... Thursday, May 24, 12
  • 125. 3) Send some kind of header... Writing messages Thursday, May 24, 12
  • 126. 3) Send some kind of header... Writing messages • Convert an object into a byte array and measure its length Thursday, May 24, 12
  • 127. 3) Send some kind of header... Writing messages • Convert an object into a byte array and measure its length • Write the integer (4 bytes) that represents the length of our byte array to the stream Thursday, May 24, 12
  • 128. 3) Send some kind of header... Writing messages • Convert an object into a byte array and measure its length • Write the integer (4 bytes) that represents the length of our byte array to the stream • Write the actual byte array to the stream Thursday, May 24, 12
  • 130. Reading messages • Read first 4 bytes and interpret those as an integer called “x” Thursday, May 24, 12
  • 131. Reading messages • Read first 4 bytes and interpret those as an integer called “x” • Read “x” number of bytes. (stop when enough data has been received) Thursday, May 24, 12
  • 132. Reading messages • Read first 4 bytes and interpret those as an integer called “x” • Read “x” number of bytes. (stop when enough data has been received) • Turn received sequence of bytes back into an object. Thursday, May 24, 12
  • 137. Frameworks • Low level: BSD socket lib Thursday, May 24, 12
  • 138. Frameworks • Low level: BSD socket lib Thursday, May 24, 12
  • 139. Frameworks • Low level: BSD socket lib • High level: CFNetwork Thursday, May 24, 12
  • 140. Frameworks • Low level: BSD socket lib • High level: CFNetwork • Bonjour iOS API: NSNetServices, CFNetServices Thursday, May 24, 12
  • 143. Creating a server We first create a stream socket that will listen for connections Thursday, May 24, 12
  • 144. Creating a server We first create a stream socket that will listen for connections CFSocketRef listeningSocket; Thursday, May 24, 12
  • 145. Creating a server We first create a stream socket that will listen for connections CFSocketRef listeningSocket; using port number 0 Thursday, May 24, 12
  • 146. Creating a server We first create a stream socket that will listen for connections CFSocketRef listeningSocket; using port number 0 zero???? O_o Thursday, May 24, 12
  • 148. Let’s publish the service Thursday, May 24, 12
  • 149. Let’s publish the service Thursday, May 24, 12
  • 160. Please let me join Thursday, May 24, 12
  • 161. Please let me join Thursday, May 24, 12
  • 162. Please let me join Thursday, May 24, 12
  • 163. Please let me join Thursday, May 24, 12
  • 164. Please let me join Thursday, May 24, 12
  • 166. The server receives the “request” Thursday, May 24, 12
  • 167. The server receives the “request” Thursday, May 24, 12
  • 169. The server welcomes you Thursday, May 24, 12
  • 170. The server welcomes you Thursday, May 24, 12
  • 171. The server welcomes you Thursday, May 24, 12
  • 173. The client receives the stream Thursday, May 24, 12
  • 174. The client receives the stream Thursday, May 24, 12
  • 177. Recap • Apple Talk, TCP/IP Thursday, May 24, 12
  • 178. Recap • Apple Talk, TCP/IP • Bonjour flow cycle, uPNP Thursday, May 24, 12
  • 179. Recap • Apple Talk, TCP/IP • Bonjour flow cycle, uPNP • Application layers, Socket, Stream, Buffers Thursday, May 24, 12
  • 180. Recap • Apple Talk, TCP/IP • Bonjour flow cycle, uPNP • Application layers, Socket, Stream, Buffers • Write/Read Network messages Thursday, May 24, 12
  • 181. Recap • Apple Talk, TCP/IP • Bonjour flow cycle, uPNP • Application layers, Socket, Stream, Buffers • Write/Read Network messages • Create and publish a server Thursday, May 24, 12
  • 182. Recap • Apple Talk, TCP/IP • Bonjour flow cycle, uPNP • Application layers, Socket, Stream, Buffers • Write/Read Network messages • Create and publish a server • Join a server Thursday, May 24, 12
  • 183. Recap • Apple Talk, TCP/IP • Bonjour flow cycle, uPNP • Application layers, Socket, Stream, Buffers • Write/Read Network messages • Create and publish a server • Join a server • Interaction between the client and the server Thursday, May 24, 12
  • 184. Recap • Apple Talk, TCP/IP • Bonjour flow cycle, uPNP • Application layers, Socket, Stream, Buffers • Write/Read Network messages • Create and publish a server • Join a server • Interaction between the client and the server • One more thing: server broadcasts messages to connected clients Thursday, May 24, 12
  • 186. Thank you. Any questions? Nicholas Valbusa @squallstar Intesys - @Intesys_IT - www.intesys.it Thursday, May 24, 12