{"id":1997,"date":"2015-10-28T02:31:44","date_gmt":"2015-10-28T02:31:43","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=1997"},"modified":"2019-03-04T06:13:47","modified_gmt":"2019-03-04T14:13:47","slug":"couchbase-live-new-york-couchbase-mobile-103-building-a-peer-to-peer-app-with-couchbase-mobile","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/es\/couchbase-live-new-york-couchbase-mobile-103-building-a-peer-to-peer-app-with-couchbase-mobile\/","title":{"rendered":"Couchbase LIVE Nueva York: Couchbase Mobile 103 - Construyendo una aplicaci\u00f3n Peer-to-Peer con Couchbase Mobile"},"content":{"rendered":"<p style=\"text-align: center;\"><a href=\"https:\/\/bit.ly\/CBNYC2015\"><img decoding=\"async\" src=\"\/wp-content\/original-assets\/2015\/october\/couchbase-live-new-york-couchbase-mobile-103---building-a-peer-to-peer-app-with-couchbase-mobile\/events.cbliveny.bannerheader.lockup.png\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">A partir de la sesi\u00f3n 103 del <a href=\"https:\/\/bit.ly\/couchbaseNYC01\">Pista m\u00f3vil Couchbase LIVE Nueva York<\/a>En Couchbase Lite, repasamos la caracter\u00edstica de Couchbase Lite que nos permitir\u00eda habilitar la sincronizaci\u00f3n peer-to-peer entre dos o m\u00e1s dispositivos.  Desde el <a href=\"https:\/\/www.slideshare.net\/Couchbase\/couchbase-mobile-101-couchbase-live-new-york?\">\"Couchbase Mobile 103\": <\/a><a href=\"https:\/\/www.slideshare.net\/Couchbase\/couchbase-mobile-103-building-a-peer-topeer-app-with-couchbase-mobile-couchbase-connect-2015?qid=50d65718-e15f-4427-8051-dbb09b56d8c6&amp;v=default&amp;b=&amp;from_search=1\">Construir una aplicaci\u00f3n Peer-to-Peer con Couchbase Mobile<\/a><a href=\"https:\/\/www.slideshare.net\/Couchbase\/couchbase-mobile-101-couchbase-live-new-york?\">\" diapositivas<\/a>, exploramos en profundidad el c\u00f3digo y los componentes que permit\u00edan a la aplicaci\u00f3n para compartir fotos intercambiar im\u00e1genes con otro dispositivo cliente que ejecutaba Couchbase Lite a trav\u00e9s de la funci\u00f3n P2P.<\/p>\n<p style=\"text-align: justify;\">El ejemplo de aplicaci\u00f3n P2P PhotoDrop puede encontrarse en el repositorio GitHub de <a href=\"https:\/\/github.com\/couchbaselabs\/photo-drop\/tree\/master\/ios\">iOS<\/a> y <a href=\"https:\/\/github.com\/couchbaselabs\/photo-drop\/tree\/master\/android\">Android<\/a>.  En este blog, vamos a recapitular a alto nivel las caracter\u00edsticas y APIs de Couchbase Lite que se presentaron en la sesi\u00f3n Couchbase 103, as\u00ed como parte del c\u00f3digo que se encuentra en el ejemplo de Photo Sharing.  Puedes hacer referencia a Couchbase Mobile <a href=\"https:\/\/bit.ly\/CBNYC2015_101\">101<\/a> y <a href=\"https:\/\/bit.ly\/CBNYC2015_102\">102<\/a> blogs para orientarse sobre c\u00f3mo empezar.<\/p>\n<p style=\"text-align: justify;\"><img decoding=\"async\" src=\"\/wp-content\/original-assets\/2015\/october\/couchbase-live-new-york-couchbase-mobile-103---building-a-peer-to-peer-app-with-couchbase-mobile\/photodrop_screens.png\" \/><\/p>\n<p style=\"text-align: justify;\">Aqu\u00ed est\u00e1n los storyboards de la aplicaci\u00f3n donde tenemos tres simples ViewControllers donde el ViewController es el punto de entrada a la aplicaci\u00f3n.  El flujo UX comienza cuando el remitente selecciona las fotos del tel\u00e9fono y hace clic en enviar.  A continuaci\u00f3n, la c\u00e1mara se abrir\u00e1 para escanear el c\u00f3digo QR de recepci\u00f3n del otro tel\u00e9fono con el fin de autenticar e iniciar la transferencia.  Veamos los componentes principales del c\u00f3digo de la aplicaci\u00f3n que permite la funci\u00f3n peer-to-peer de <a href=\"https:\/\/developer.couchbase.com\/documentation\/mobile\/1.1.0\/get-started\/couchbase-lite-overview\/index.html\">Couchbase Lite<\/a>.<\/p>\n<p style=\"text-align: justify;\"><strong>[1] Iniciar escucha<\/strong><\/p>\n<p style=\"text-align: justify;\">En el ReceiveViewController, ponemos el puerto a cero para que Couchbase Lite decida cual usar.  Esto significa que cada vez que queramos compartir las fotos, el puerto ir\u00e1 cambiando cada vez que inicie una transferencia.  Habilitamos la autenticaci\u00f3n donde la autenticaci\u00f3n es el digest y soportado por el listener de Couchbase Lite por defecto.  Despu\u00e9s de eso tenemos el nombre de usuario y contrase\u00f1a y establecemos el nombre de usuario \/ contrase\u00f1a para la autenticaci\u00f3n.  Despu\u00e9s de lo cual, estamos listos para iniciar los oyentes.<\/p>\n<p style=\"text-align: justify;\"><strong>iOS<\/strong><\/p>\n<pre><code class=\"language-swift\">listener = CBLListener(manager: CBLManager.sharedInstance(), port: 0)\r\n\r\nlistener.requiresAuth = true\r\nlet username = secureGenerateKey(NSCharacterSet.URLUserAllowedCharacterSet())\r\nlet password = secureGenerateKey(NSCharacterSet.URLPasswordAllowedCharacterSet())\r\nlistener.setPasswords([username : password])\r\n\r\nvar success = listener.start(&amp;error)\r\n\r\nif (success) {\r\n  syncUrl = genearteSyncURL(listener.URL, username: username, password: password, \r\n  dbName: database.name)\r\n\r\n  startObserveDatabaseChange()\r\n}\r\n<\/code><\/pre>\n<p>Una vez iniciado el listener, generamos la URL de sincronizaci\u00f3n del endpoint URL a la base de datos receptora utilizando la URL del listener con el nombre de usuario\/contrase\u00f1a y con el nombre de la base de datos.  Establecemos la URL en la variable de URL de sincronizaci\u00f3n y la utilizamos m\u00e1s tarde cuando generamos el c\u00f3digo QR desde el que iniciamos los oyentes de cambio de base de datos en consecuencia.<\/p>\n<p style=\"text-align: justify;\"><strong>[2] Observar los cambios en la base de datos<\/strong><\/p>\n<p>Iniciamos el escuchador de cambios de la base de datos para saber cu\u00e1ndo se sincroniza la foto con la base de datos del receptor.  Cuando esto ocurre, obtenemos las fotos compartidas de los documentos compartidos y las aceptamos en el dispositivo.<\/p>\n<p style=\"text-align: justify;\"><strong>iOS<\/strong><\/p>\n<pre><code class=\"language-swift\">func startObserveDatabaseChange() {\r\n  NSNotificationCenter.defaultCenter().addObserverForName(\r\n  kCBLDatabaseChangeNotification, object: database, queue: nil) { (notification) -&gt; Void in\r\n   if let changes = notification.userInfo![\"changes\"] as? [CBLDatabaseChange] {\r\n      for change in changes {\r\n        dispatch_async(dispatch_get_main_queue(), {\r\n          self.saveImageFromDocument(change.documentID)\r\n        })\r\n      }\r\n   }\r\n  }\r\n}<\/code><\/pre>\n<p><strong>[3] Generar y mostrar c\u00f3digo QR<\/strong><\/p>\n<p style=\"text-align: justify;\">Para el \u00faltimo paso del ReceiveViewController donde una vez que tenemos los listeners de Couchbase Lite, configuramos los listeners compartidos de la base de datos y luego tenemos la URL de Sync.  Con la URL de sincronizaci\u00f3n, podemos generar el c\u00f3digo QR.  Para ello utilizamos el filtro de im\u00e1genes del n\u00facleo de iOS.  El c\u00f3digo QR contiene el puerto de escucha y el nombre de usuario\/contrase\u00f1a para la autenticaci\u00f3n.<\/p>\n<p style=\"text-align: justify;\"><img decoding=\"async\" src=\"\/wp-content\/original-assets\/2015\/october\/couchbase-live-new-york-couchbase-mobile-103---building-a-peer-to-peer-app-with-couchbase-mobile\/qr-code-content.png\" \/><strong>[4] Escanear c\u00f3digo QR<\/strong><\/p>\n<p style=\"text-align: justify;\">Ahora dentro del SendViewController, usamos la clase de iOS AVCaptureSession, que es parte del framework AV Foundation con el tipo de salida AVMetadataObjectTypeQRCode.  Esto nos permitir\u00e1 ahora subir el esc\u00e1ner de c\u00f3digo QR y escanear el c\u00f3digo QR.<\/p>\n<p><strong>[5] Crear documentos<\/strong><\/p>\n<p style=\"text-align: justify;\">Ahora iteramos sobre las fotos que queremos enviar a los receptores.  Para cada foto, creamos un documento y luego adjuntamos la foto al documento para luego guardarlo en la base de datos.  El \u00faltimo snippet, guardaremos los IDs de los documentos en la variable docIds que es una propiedad que se utilizar\u00e1 en el siguiente paso.<\/p>\n<p><strong>iOS<\/strong><\/p>\n<pre><code class=\"language-swift\">var docIds: [String] = []\r\nfor asset in sharedAssets! {\r\n  \/\/...\r\n  var data = NSData(bytesNoCopy: imageBytes, length: buffered, freeWhenDone: true)\r\n\r\n  let doc = database.createDocument()\r\n  let rev = doc.newRevision()\r\n  rev.setAttachmentNamed(\"photo\", withContentType: \"application\/octet-stream\", content: data)\r\n  let saved = rev.save(&amp;error)\r\n\r\n  if saved != nil {\r\n    docIds.append(doc.documentID)\r\n  }\r\n}\r\n<\/code><\/pre>\n<p><strong>[6] Replicar documentos<\/strong><\/p>\n<p style=\"text-align: justify;\">El \u00faltimo paso ahora que tenemos la URL de sincronizaci\u00f3n que obtuvimos del c\u00f3digo QR es replicar los documentos en consecuencia.  Tenemos los documentos fotogr\u00e1ficos de la base de datos y estamos listos para replicarlos desde el dispositivo cliente emisor al dispositivo receptor.  Aqu\u00ed creamos una replicaci\u00f3n push con la URL de sincronizaci\u00f3n en la que enviamos el ID del documento al replicador para que el replicador busque los documentos del ID.  Y como un paso opcional, establecemos los estados para los oyentes de cambio de replicaci\u00f3n para capturar el estado actual.<\/p>\n<p><strong>iOS<\/strong><\/p>\n<pre><code class=\"language-swift\">replicator = database.createPushReplication(url)\r\nreplicator.documentIDs = docIds\r\n\r\nNSNotificationCenter.defaultCenter().addObserverForName(kCBLReplicationChangeNotification, object: replicator, queue: nil) { (notification) -&gt; Void in\r\n  if self.replicator.lastError == nil {\r\n    var totalCount = self.replicator.changesCount\r\n    var completedCount = self.replicator.completedChangesCount\r\n    \r\n    if completedCount &gt; 0 &amp;&amp; completedCount == totalCount {\r\n      self.statusLabel.text = \"Sending Completed\u201d\r\n    }\r\n  } else {\r\n      self.statusLabel.text = \"Sending Abort\"\r\n    }\r\n}\r\n\r\nreplicator.start()\r\n\r\n<\/code><\/pre>\n<p><strong>Resumen<\/strong><\/p>\n<p style=\"text-align: justify;\">Los puntos clave de la implementaci\u00f3n de las aplicaciones Photodrop son que utiliza el c\u00f3digo QR para el descubrimiento de pares, donde generamos un nombre de usuario y una contrase\u00f1a de una sola vez para la autenticaci\u00f3n.  El c\u00f3digo central para enviar\/recibir fotos es de unas 100 l\u00edneas de c\u00f3digo y no contiene ning\u00fan c\u00f3digo que intervenga directamente en la comunicaci\u00f3n de red.<\/p>\n<p style=\"text-align: justify;\">","protected":false},"excerpt":{"rendered":"<p>From the 103 session in the Couchbase LIVE New York mobile track, we went over the feature within Couchbase Lite that would allow us to enable peer-to-peer syncing between two or more devices.\u00a0 From the &#8220;Couchbase Mobile 103: Building a [&hellip;]<\/p>","protected":false},"author":30,"featured_media":13873,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1],"tags":[],"ppma_author":[8983],"class_list":["post-1997","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.9 (Yoast SEO v25.9) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Building a Peer-to-Peer App with Couchbase Mobile<\/title>\n<meta name=\"description\" content=\"Check out the feature within Couchbase Lite that would allow us to enable peer-to-peer syncing between two or more devices.\u00a0\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.couchbase.com\/blog\/es\/couchbase-live-new-york-couchbase-mobile-103-building-a-peer-to-peer-app-with-couchbase-mobile\/\" \/>\n<meta property=\"og:locale\" content=\"es_MX\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Couchbase LIVE New York: Couchbase Mobile 103 - Building a Peer-to-Peer App with Couchbase Mobile\" \/>\n<meta property=\"og:description\" content=\"Check out the feature within Couchbase Lite that would allow us to enable peer-to-peer syncing between two or more devices.\u00a0\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/es\/couchbase-live-new-york-couchbase-mobile-103-building-a-peer-to-peer-app-with-couchbase-mobile\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2015-10-28T02:31:43+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-03-04T14:13:47+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2022\/11\/couchbase-nosql-dbaas.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1800\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"William Hoang, Mobile Developer Advocate, Couchbase\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"William Hoang, Mobile Developer Advocate, Couchbase\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/couchbase-live-new-york-couchbase-mobile-103-building-a-peer-to-peer-app-with-couchbase-mobile\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/couchbase-live-new-york-couchbase-mobile-103-building-a-peer-to-peer-app-with-couchbase-mobile\/\"},\"author\":{\"name\":\"William Hoang, Mobile Developer Advocate, Couchbase\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/425717456c198fdf9aaa5d7a6d42ad32\"},\"headline\":\"Couchbase LIVE New York: Couchbase Mobile 103 &#8211; Building a Peer-to-Peer App with Couchbase Mobile\",\"datePublished\":\"2015-10-28T02:31:43+00:00\",\"dateModified\":\"2019-03-04T14:13:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/couchbase-live-new-york-couchbase-mobile-103-building-a-peer-to-peer-app-with-couchbase-mobile\/\"},\"wordCount\":761,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/couchbase-live-new-york-couchbase-mobile-103-building-a-peer-to-peer-app-with-couchbase-mobile\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"articleSection\":[\"Uncategorized\"],\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/couchbase-live-new-york-couchbase-mobile-103-building-a-peer-to-peer-app-with-couchbase-mobile\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/couchbase-live-new-york-couchbase-mobile-103-building-a-peer-to-peer-app-with-couchbase-mobile\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/couchbase-live-new-york-couchbase-mobile-103-building-a-peer-to-peer-app-with-couchbase-mobile\/\",\"name\":\"Building a Peer-to-Peer App with Couchbase Mobile\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/couchbase-live-new-york-couchbase-mobile-103-building-a-peer-to-peer-app-with-couchbase-mobile\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/couchbase-live-new-york-couchbase-mobile-103-building-a-peer-to-peer-app-with-couchbase-mobile\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"datePublished\":\"2015-10-28T02:31:43+00:00\",\"dateModified\":\"2019-03-04T14:13:47+00:00\",\"description\":\"Check out the feature within Couchbase Lite that would allow us to enable peer-to-peer syncing between two or more devices.\u00a0\",\"breadcrumb\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/couchbase-live-new-york-couchbase-mobile-103-building-a-peer-to-peer-app-with-couchbase-mobile\/#breadcrumb\"},\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/couchbase-live-new-york-couchbase-mobile-103-building-a-peer-to-peer-app-with-couchbase-mobile\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/couchbase-live-new-york-couchbase-mobile-103-building-a-peer-to-peer-app-with-couchbase-mobile\/#primaryimage\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"width\":1800,\"height\":630},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/couchbase-live-new-york-couchbase-mobile-103-building-a-peer-to-peer-app-with-couchbase-mobile\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.couchbase.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Couchbase LIVE New York: Couchbase Mobile 103 &#8211; Building a Peer-to-Peer App with Couchbase Mobile\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"name\":\"The Couchbase Blog\",\"description\":\"Couchbase, the NoSQL Database\",\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"es\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\",\"name\":\"The Couchbase Blog\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"width\":218,\"height\":34,\"caption\":\"The Couchbase Blog\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/425717456c198fdf9aaa5d7a6d42ad32\",\"name\":\"William Hoang, Mobile Developer Advocate, Couchbase\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/650445f1ea30314c4f3555dd680154f5\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/b912c9a97568a859697ee195432d0bd7cc3ed67d720ae2e6588b67313fa49e08?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/b912c9a97568a859697ee195432d0bd7cc3ed67d720ae2e6588b67313fa49e08?s=96&d=mm&r=g\",\"caption\":\"William Hoang, Mobile Developer Advocate, Couchbase\"},\"description\":\"William was a Developer Advocate on the Mobile Engineering\/Developer Experience team at Couchbase. His love for coffee and code has transcended him into the world of mobile while appreciating the offline in-person experiences. Prior, William worked on the Developer Relations team over at Twitter, BlackBerry, and Microsoft while also having been a Software Embedded GPS engineer at Research In Motion. William graduated from McGill University in Electrical Software Engineering\",\"url\":\"https:\/\/www.couchbase.com\/blog\/es\/author\/william-hoang\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Construir una aplicaci\u00f3n Peer-to-Peer con Couchbase Mobile","description":"Echa un vistazo a la funci\u00f3n dentro de Couchbase Lite que nos permitir\u00eda habilitar la sincronizaci\u00f3n peer-to-peer entre dos o m\u00e1s dispositivos.\u00a0","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.couchbase.com\/blog\/es\/couchbase-live-new-york-couchbase-mobile-103-building-a-peer-to-peer-app-with-couchbase-mobile\/","og_locale":"es_MX","og_type":"article","og_title":"Couchbase LIVE New York: Couchbase Mobile 103 - Building a Peer-to-Peer App with Couchbase Mobile","og_description":"Check out the feature within Couchbase Lite that would allow us to enable peer-to-peer syncing between two or more devices.\u00a0","og_url":"https:\/\/www.couchbase.com\/blog\/es\/couchbase-live-new-york-couchbase-mobile-103-building-a-peer-to-peer-app-with-couchbase-mobile\/","og_site_name":"The Couchbase Blog","article_published_time":"2015-10-28T02:31:43+00:00","article_modified_time":"2019-03-04T14:13:47+00:00","og_image":[{"width":1800,"height":630,"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2022\/11\/couchbase-nosql-dbaas.png","type":"image\/png"}],"author":"William Hoang, Mobile Developer Advocate, Couchbase","twitter_card":"summary_large_image","twitter_misc":{"Written by":"William Hoang, Mobile Developer Advocate, Couchbase","Est. reading time":"5 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/couchbase-live-new-york-couchbase-mobile-103-building-a-peer-to-peer-app-with-couchbase-mobile\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/couchbase-live-new-york-couchbase-mobile-103-building-a-peer-to-peer-app-with-couchbase-mobile\/"},"author":{"name":"William Hoang, Mobile Developer Advocate, Couchbase","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/425717456c198fdf9aaa5d7a6d42ad32"},"headline":"Couchbase LIVE New York: Couchbase Mobile 103 &#8211; Building a Peer-to-Peer App with Couchbase Mobile","datePublished":"2015-10-28T02:31:43+00:00","dateModified":"2019-03-04T14:13:47+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/couchbase-live-new-york-couchbase-mobile-103-building-a-peer-to-peer-app-with-couchbase-mobile\/"},"wordCount":761,"commentCount":0,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/couchbase-live-new-york-couchbase-mobile-103-building-a-peer-to-peer-app-with-couchbase-mobile\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","articleSection":["Uncategorized"],"inLanguage":"es","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/couchbase-live-new-york-couchbase-mobile-103-building-a-peer-to-peer-app-with-couchbase-mobile\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/couchbase-live-new-york-couchbase-mobile-103-building-a-peer-to-peer-app-with-couchbase-mobile\/","url":"https:\/\/www.couchbase.com\/blog\/couchbase-live-new-york-couchbase-mobile-103-building-a-peer-to-peer-app-with-couchbase-mobile\/","name":"Construir una aplicaci\u00f3n Peer-to-Peer con Couchbase Mobile","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/couchbase-live-new-york-couchbase-mobile-103-building-a-peer-to-peer-app-with-couchbase-mobile\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/couchbase-live-new-york-couchbase-mobile-103-building-a-peer-to-peer-app-with-couchbase-mobile\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","datePublished":"2015-10-28T02:31:43+00:00","dateModified":"2019-03-04T14:13:47+00:00","description":"Echa un vistazo a la funci\u00f3n dentro de Couchbase Lite que nos permitir\u00eda habilitar la sincronizaci\u00f3n peer-to-peer entre dos o m\u00e1s dispositivos.\u00a0","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/couchbase-live-new-york-couchbase-mobile-103-building-a-peer-to-peer-app-with-couchbase-mobile\/#breadcrumb"},"inLanguage":"es","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/couchbase-live-new-york-couchbase-mobile-103-building-a-peer-to-peer-app-with-couchbase-mobile\/"]}]},{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/www.couchbase.com\/blog\/couchbase-live-new-york-couchbase-mobile-103-building-a-peer-to-peer-app-with-couchbase-mobile\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","width":1800,"height":630},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/couchbase-live-new-york-couchbase-mobile-103-building-a-peer-to-peer-app-with-couchbase-mobile\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Couchbase LIVE New York: Couchbase Mobile 103 &#8211; Building a Peer-to-Peer App with Couchbase Mobile"}]},{"@type":"WebSite","@id":"https:\/\/www.couchbase.com\/blog\/#website","url":"https:\/\/www.couchbase.com\/blog\/","name":"El blog de Couchbase","description":"Couchbase, la base de datos NoSQL","publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"es"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/blog\/#organization","name":"El blog de Couchbase","url":"https:\/\/www.couchbase.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","width":218,"height":34,"caption":"The Couchbase Blog"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/425717456c198fdf9aaa5d7a6d42ad32","name":"William Hoang, Defensor del Desarrollador M\u00f3vil, Couchbase","image":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/650445f1ea30314c4f3555dd680154f5","url":"https:\/\/secure.gravatar.com\/avatar\/b912c9a97568a859697ee195432d0bd7cc3ed67d720ae2e6588b67313fa49e08?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b912c9a97568a859697ee195432d0bd7cc3ed67d720ae2e6588b67313fa49e08?s=96&d=mm&r=g","caption":"William Hoang, Mobile Developer Advocate, Couchbase"},"description":"William fue Developer Advocate en el equipo de Mobile Engineering\/Developer Experience de Couchbase. Su amor por el caf\u00e9 y el c\u00f3digo le ha trascendido al mundo de los m\u00f3viles, al tiempo que aprecia las experiencias presenciales fuera de l\u00ednea. Anteriormente, William trabaj\u00f3 en el equipo de Relaciones con Desarrolladores en Twitter, BlackBerry y Microsoft, adem\u00e1s de haber sido ingeniero de Software Embedded GPS en Research In Motion. William se licenci\u00f3 en Ingenier\u00eda El\u00e9ctrica de Software por la Universidad McGill.","url":"https:\/\/www.couchbase.com\/blog\/es\/author\/william-hoang\/"}]}},"authors":[{"term_id":8983,"user_id":30,"is_guest":0,"slug":"william-hoang","display_name":"William Hoang, Mobile Developer Advocate, Couchbase","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/b912c9a97568a859697ee195432d0bd7cc3ed67d720ae2e6588b67313fa49e08?s=96&d=mm&r=g","author_category":"","last_name":"Hoang","first_name":"William","job_title":"","user_url":"","description":"William fue Developer Advocate en el equipo de Mobile Engineering\/Developer Experience de Couchbase. Su amor por el caf\u00e9 y el c\u00f3digo le ha trascendido al mundo de los m\u00f3viles, al tiempo que aprecia las experiencias presenciales fuera de l\u00ednea. Anteriormente, William trabaj\u00f3 en el equipo de Relaciones con Desarrolladores en Twitter, BlackBerry y Microsoft, adem\u00e1s de haber sido ingeniero de Software Embedded GPS en Research In Motion. William se licenci\u00f3 en Ingenier\u00eda El\u00e9ctrica de Software por la Universidad McGill."}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/posts\/1997","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/users\/30"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/comments?post=1997"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/posts\/1997\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/media\/13873"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/media?parent=1997"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/categories?post=1997"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/tags?post=1997"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/ppma_author?post=1997"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}