{"id":256,"date":"2015-02-13T17:24:22","date_gmt":"2015-02-13T17:24:21","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/photodrop\/"},"modified":"2015-02-13T17:24:22","modified_gmt":"2015-02-13T17:24:21","slug":"photodrop","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/pt\/photodrop\/","title":{"rendered":"Building a Peer-to-Peer Photo Sharing App with Couchbase Mobile"},"content":{"rendered":"<p>One of the cool features of Couchbase Lite that hasn\u2019t been featured much is an ability to do P2P replication between two devices. Couchbase Lite is packaged with an extra component called Couchbase Lite Listener that allows your application to accept HTTP connections from other devices running Couchbase Lite and sync data with them.<\/p>\n\n\n\n<p>A couple months ago, Wayne Carter (Chief Architect of Mobile)\u00a0and Traun Leyden (Android engineer)\u00a0skyped me in and sold me an idea about creating a simple P2P photo sharing app that can demonstrate how easily you can develop a P2P application using Couchbase Lite. I was engaged since then and spent a couple days working on this little P2P iOS photo sharing app called PhotoDrop. In this blog post, I will show you how I used Couchbase Lite to develop the application. This is what you&#8217;ll end up with at the end:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"s1\"><strong><span class=\"s1\">Overview<\/span><\/strong><\/span><\/h2>\n\n\n\n<p>PhotoDrop is a P2P photo sharing app similar to the iOS AirDrop feature that you can use to send photos across devices. Before jumping into the code, I would like to briefly discuss P2P concerns and design choices that I made when developing the application.<\/p>\n\n\n\n<p><span class=\"s1\"><span class=\"s2\"><b>Peer Discovery<\/b> can be done in several ways. In iOS, you can use the Bonjour Service for discovering peers but this could be an issue if you later want to develop the application in other platforms. In PhotoDrop, I am using a simpler and more direct way using a QRCode. I use the QRCode to advertise an adhoc endpoint URL that a sender can scan and send photos to.<\/span><\/span><\/p>\n\n\n\n<p><span class=\"s1\"><span class=\"s2\"><b>Peer Identity<\/b> is a related subject to the Peer Discovery. Peer Identiy is normally difficult to solve without introducing some undesired steps into the application such as user registration, user login, and peer approval. By using a QRCode, and requiring the two people to have direct explicit interaction to send and receive photos, the issue is mitigated.<\/span><\/span><\/p>\n\n\n\n<p><span class=\"s1\"><span class=\"s2\"><b>Authentication<\/b> is needed to ensure that the access control, for this case the write access to push photos into another peer&#8217;s database, is granted to the right person. In PhotoDrop, I am using the Basic Auth that Couchbase Lite has already supported. I securely generate a one-time username and password, bundle them with the URL endpoint and encode them all in the QRCode presented by the receiver to the sender. Once the sender scans the QRCode, the sender will have the username and password for basic authentication.<\/span><\/span><\/p>\n\n\n\n<p><span class=\"s1\"><span class=\"s2\"><b>Secure Communication Channels<\/b> are requried especially for sending sensitive information. I did not implement secure communication in this app. However, recently Jen Alfke added TLS support including an API to generate a self-signed certificate on the fly to the iOS Couchbase Lite Listener. As all the hard work has been done, You can add support for this pretty easily.<\/span><\/span><\/p>\n\n\n\n<p><span class=\"s1\"><span class=\"s2\">After all, the current flow of the PhotoDrop is fairly simple. You select photos you want to share to your friend and open the QRCode scanner to scan the target endpoint that the selected photos will be sent to. On the other side, your friend opens the appliation, shows the QRCode and waits for you to scan and send the photos. The next section will provide all of the implementation details for the application.<\/span><\/span><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"s1\"><strong><span class=\"s1\">Selecting Photos<\/span><\/strong><\/span><\/h2>\n\n\n\n<p>PhotoDrop uses ALAssetsLibrary to access to the photos in the Camera Roll album on an iOS device because the UIImagePickerViewController that doesn&#8217;t support multiple photo selection.<\/p>\n\n\n\n<p>The photos are displayed in a UICollectionViewController. A simple custom UICollectionViewCell named PhotoViewCell is created to display a photo thumbnail and a checkbox indicating the selected status of the photo.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"s1\"><strong><span class=\"s1\">Sending Photos<\/span><\/strong><\/span><\/h2>\n\n\n\n<p>When the selected photos are ready to send and the send button is touched, the SendViewController will be presented with the selected photos.<\/p>\n\n\n\n<p>Once the SendViewController is presented, we find ourselves in the viewDidLoad() function in which we get an empty database object named &#8220;db&#8221; from the DatabaseUtil class. The reason that we get a fresh database is to ensure that there are no pending documents from a previous sharing session.<br>\nThe getEmptyDatabase() function of the DatabaseUtil class returns an empty database with the given name by deleting the database if it does exist and recreating a new one.<\/p>\n\n\n\n<p>Once the SendViewController is presented, we will be in the viewDidAppear(animated:Bool) function. In the viewDidAppear function, we start the AVFoundation&#8217;s QRCode capturing session to present the QRCode scanner.<\/p>\n\n\n\n<p>When a QRCode is captured, we extract the endpoint URL which is the remote URL that we will send photos to. The core code for creating and sending photo documents begins and ends in the replicate(url: NSURL) function which has about 50 lines of code.<\/p>\n\n\n\n<p>The code starts with looping thru each photo in the sharedAssets array. For each photo, we get a binary representation and attach to an empty Couchbase Lite document.<\/p>\n\n\n\n<p>After we finish creating the photo documents, we send those documents to the other device. To do this, We create a push replicator and set the ids of the documents that we would like to replicate. In general, setting the document ids for the replicator is optional. If ids is not supplied, the the replicator would just replicate all of the documents in the database.<\/p>\n\n\n\n<p>Before we start the replicator, we setup a notification observer to observe the replicating status so that we can display replication status appropriately when the replication in in progress.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"s1\"><strong><span class=\"s1\">Receiving Photos<\/span><\/strong><\/span><\/h2>\n\n\n\n<p>Receiving photos is done in ReceiveViewController which is presented from the ViewController screen when a user touches the Receive button. When the ReceiveViewController is presented, we get a fresh database named &#8220;db&#8221; in the viewDidLoad() method. In the viewDidAppear(animated: Bool) function, we call startListener() to create and start a CBLListener object. The CBLListener is an embedded lightweight HTTP server which listens to HTTP requests and routes those requests to appropriate handlers to perform replication operations. Once the listener is started, we can obtain the listener&#8217;s URL and present a QRCode encoding the URL. As a bonus, iOS CoreImage supports a QRCode filter so generating a QRCode image is really easy :)<\/p>\n\n\n\n<p>When we setup the listener in startListener(), we enable Basic Authentication with the generated username\/password pair. The generated username\/password pair serves as a one-time pair that provides a secure (enough) solution to prevent unauthorized users from pushing images to the receiver. To generate the username and password, we use the iOS Randomization Services API (SecRandomCopyBytes) that generates cryptographically secure random values.<\/p>\n\n\n\n<p>At the end of the startListener() function, the startObserveDatabaseChange() function is called to observe any changes happening to the database via notifications named kCBLDatabaseChangeNotification. We are now able to observe when the photo documents from the other device are replicated and save the photos into the device&#8217;s camera roll.<\/p>\n\n\n\n<p>The function to save a photo into to the device&#8217;s camera roll is below. The function simply gets the image from the document attachment, creates a CGImage and saves it to the camera roll via the ALAssetsLibrary&#8217;s writeImageDataToSavedPhotosAlbum() function. After saving a photo, we display a thumbnail on the screen.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"s1\"><strong><span class=\"s1\">Wrapping up<\/span><\/strong><\/span><\/h2>\n\n\n\n<p>There are many ways to develop the PhotoDrop app, and using Couchbase Lite is perhaps one of the easiest. The core code for sending and receiving photos is barely 100 lines of code and contains zero lines of code directly involved in network communication. I hope this blog post and the PhotoDrop application itself gives you some inspiration and ideas for using Couchbase Lite for P2P applications. Clone the <a href=\"https:\/\/github.com\/couchbaselabs\/photo-drop\">PhotoDrop GitHub repo<\/a>, play with it, and let me know what you think!<\/p>","protected":false},"excerpt":{"rendered":"<p>One of the cool features of Couchbase Lite that hasn\u2019t been featured much is an ability to do P2P replication between two devices. Couchbase Lite is packaged with an extra component called Couchbase Lite Listener that allows your application to accept HTTP connections from other devices running Couchbase Lite and sync data with them. A [&hellip;]<\/p>\n","protected":false},"author":52,"featured_media":18,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"_acf":"","footnotes":""},"categories":[1],"tags":[],"ppma_author":[111],"class_list":["post-256","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.6 (Yoast SEO v27.6) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>PhotoDrop: Peer-to-Peer Photo Sharing App | Couchbase Mobile<\/title>\n<meta name=\"description\" content=\"PhotoDrop is a P2P photo sharing app like the iOS AirDrop feature that lets you send photos across devices. Get ready to jump into the code with Couchbase.\" \/>\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\/pt\/photodrop\/\" \/>\n<meta property=\"og:locale\" content=\"pt_BR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Building a Peer-to-Peer Photo Sharing App with Couchbase Mobile\" \/>\n<meta property=\"og:description\" content=\"PhotoDrop is a P2P photo sharing app like the iOS AirDrop feature that lets you send photos across devices. Get ready to jump into the code with Couchbase.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/pt\/photodrop\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2015-02-13T17:24:21+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/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=\"Pasin Suriyentrakorn, Senior Software Engineer, 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=\"Pasin Suriyentrakorn, Senior Software Engineer, Couchbase\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/photodrop\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/photodrop\\\/\"},\"author\":{\"name\":\"Pasin Suriyentrakorn, Senior Software Engineer, Couchbase\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/person\\\/22f722eb705c69cfaefcacc31109d3af\"},\"headline\":\"Building a Peer-to-Peer Photo Sharing App with Couchbase Mobile\",\"datePublished\":\"2015-02-13T17:24:21+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/photodrop\\\/\"},\"wordCount\":1278,\"commentCount\":10,\"publisher\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/photodrop\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/05\\\/couchbase-nosql-dbaas.png\",\"articleSection\":[\"Uncategorized\"],\"inLanguage\":\"pt-BR\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/photodrop\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/photodrop\\\/\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/photodrop\\\/\",\"name\":\"PhotoDrop: Peer-to-Peer Photo Sharing App | Couchbase Mobile\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/photodrop\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/photodrop\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/05\\\/couchbase-nosql-dbaas.png\",\"datePublished\":\"2015-02-13T17:24:21+00:00\",\"description\":\"PhotoDrop is a P2P photo sharing app like the iOS AirDrop feature that lets you send photos across devices. Get ready to jump into the code with Couchbase.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/photodrop\\\/#breadcrumb\"},\"inLanguage\":\"pt-BR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/photodrop\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/photodrop\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/05\\\/couchbase-nosql-dbaas.png\",\"contentUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/05\\\/couchbase-nosql-dbaas.png\",\"width\":1800,\"height\":630},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/photodrop\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Building a Peer-to-Peer Photo Sharing 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\":\"pt-BR\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#organization\",\"name\":\"The Couchbase Blog\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/06\\\/logo.svg\",\"contentUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/06\\\/logo.svg\",\"width\":\"1024\",\"height\":\"1024\",\"caption\":\"The Couchbase Blog\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/person\\\/22f722eb705c69cfaefcacc31109d3af\",\"name\":\"Pasin Suriyentrakorn, Senior Software Engineer, Couchbase\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/483ca6f8ae7cf9bfe34a9a62f5c2c06b6fcb7484387dbdb8a8a3932e42851a4c?s=96&d=mm&r=g6db0719e0e3644e93ad9690b55026cd6\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/483ca6f8ae7cf9bfe34a9a62f5c2c06b6fcb7484387dbdb8a8a3932e42851a4c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/483ca6f8ae7cf9bfe34a9a62f5c2c06b6fcb7484387dbdb8a8a3932e42851a4c?s=96&d=mm&r=g\",\"caption\":\"Pasin Suriyentrakorn, Senior Software Engineer, Couchbase\"},\"description\":\"Pasin Suriyentrakorn is a Senior Software Engineer at Couchbase for Couchbase Mobile. Prior, he was an engineer at Oracle where he led development of the Mobile User Interface rendering framework for Oracle Sales Cloud iOS and Android application.\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/pt\\\/author\\\/pasin-suriyentrakorn\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"PhotoDrop: Peer-to-Peer Photo Sharing App | Couchbase Mobile","description":"PhotoDrop is a P2P photo sharing app like the iOS AirDrop feature that lets you send photos across devices. Get ready to jump into the code with Couchbase.","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\/pt\/photodrop\/","og_locale":"pt_BR","og_type":"article","og_title":"Building a Peer-to-Peer Photo Sharing App with Couchbase Mobile","og_description":"PhotoDrop is a P2P photo sharing app like the iOS AirDrop feature that lets you send photos across devices. Get ready to jump into the code with Couchbase.","og_url":"https:\/\/www.couchbase.com\/blog\/pt\/photodrop\/","og_site_name":"The Couchbase Blog","article_published_time":"2015-02-13T17:24:21+00:00","og_image":[{"width":1800,"height":630,"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbase-nosql-dbaas.png","type":"image\/png"}],"author":"Pasin Suriyentrakorn, Senior Software Engineer, Couchbase","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Pasin Suriyentrakorn, Senior Software Engineer, Couchbase","Est. reading time":"6 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/photodrop\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/photodrop\/"},"author":{"name":"Pasin Suriyentrakorn, Senior Software Engineer, Couchbase","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/22f722eb705c69cfaefcacc31109d3af"},"headline":"Building a Peer-to-Peer Photo Sharing App with Couchbase Mobile","datePublished":"2015-02-13T17:24:21+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/photodrop\/"},"wordCount":1278,"commentCount":10,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/photodrop\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbase-nosql-dbaas.png","articleSection":["Uncategorized"],"inLanguage":"pt-BR","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/photodrop\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/photodrop\/","url":"https:\/\/www.couchbase.com\/blog\/photodrop\/","name":"PhotoDrop: Peer-to-Peer Photo Sharing App | Couchbase Mobile","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/photodrop\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/photodrop\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbase-nosql-dbaas.png","datePublished":"2015-02-13T17:24:21+00:00","description":"PhotoDrop is a P2P photo sharing app like the iOS AirDrop feature that lets you send photos across devices. Get ready to jump into the code with Couchbase.","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/photodrop\/#breadcrumb"},"inLanguage":"pt-BR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/photodrop\/"]}]},{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/www.couchbase.com\/blog\/photodrop\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbase-nosql-dbaas.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbase-nosql-dbaas.png","width":1800,"height":630},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/photodrop\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Building a Peer-to-Peer Photo Sharing 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":"pt-BR"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/blog\/#organization","name":"The Couchbase Blog","url":"https:\/\/www.couchbase.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/06\/logo.svg","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/06\/logo.svg","width":"1024","height":"1024","caption":"The Couchbase Blog"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/22f722eb705c69cfaefcacc31109d3af","name":"Pasin Suriyentrakorn, Senior Software Engineer, Couchbase","image":{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/secure.gravatar.com\/avatar\/483ca6f8ae7cf9bfe34a9a62f5c2c06b6fcb7484387dbdb8a8a3932e42851a4c?s=96&d=mm&r=g6db0719e0e3644e93ad9690b55026cd6","url":"https:\/\/secure.gravatar.com\/avatar\/483ca6f8ae7cf9bfe34a9a62f5c2c06b6fcb7484387dbdb8a8a3932e42851a4c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/483ca6f8ae7cf9bfe34a9a62f5c2c06b6fcb7484387dbdb8a8a3932e42851a4c?s=96&d=mm&r=g","caption":"Pasin Suriyentrakorn, Senior Software Engineer, Couchbase"},"description":"Pasin Suriyentrakorn is a Senior Software Engineer at Couchbase for Couchbase Mobile. Prior, he was an engineer at Oracle where he led development of the Mobile User Interface rendering framework for Oracle Sales Cloud iOS and Android application.","url":"https:\/\/www.couchbase.com\/blog\/pt\/author\/pasin-suriyentrakorn\/"}]}},"acf":[],"authors":[{"term_id":111,"user_id":52,"is_guest":0,"slug":"pasin-suriyentrakorn","display_name":"Pasin Suriyentrakorn, Senior Software Engineer, Couchbase","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","author_category":"","first_name":"Pasin","last_name":"Suriyentrakorn","user_url":"","job_title":"","description":"Pasin Suriyentrakorn is a Senior Software Engineer at Couchbase for Couchbase Mobile. Prior, he was an engineer at Oracle where he led development of the Mobile User Interface rendering framework for Oracle Sales Cloud iOS and Android application."}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/posts\/256","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/users\/52"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/comments?post=256"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/posts\/256\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/media\/18"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/media?parent=256"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/categories?post=256"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/tags?post=256"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/ppma_author?post=256"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}