{"id":3973,"date":"2017-09-12T07:00:14","date_gmt":"2017-09-12T14:00:14","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=3973"},"modified":"2017-08-29T14:28:28","modified_gmt":"2017-08-29T21:28:28","slug":"asynchronously-perform-subdocument-mutations-couchbase-with-golang","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/es\/asynchronously-perform-subdocument-mutations-couchbase-with-golang\/","title":{"rendered":"Realizar as\u00edncronamente mutaciones de subdocumentos en Couchbase con Golang"},"content":{"rendered":"<p>No hace mucho escrib\u00ed sobre el uso de la funci\u00f3n <a href=\"https:\/\/www.couchbase.com\/blog\/es\/using-the-couchbase-sub-document-api-with-the-golang-sdk\/\" target=\"_blank\" rel=\"noopener\">API de subdocumentos de Couchbase Server con el SDK de Go<\/a>. Hacer operaciones con subdocumentos es incre\u00edblemente \u00fatil si quieres cambiar o acceder a una parte de un documento NoSQL potencialmente enorme. Las operaciones con subdocumentos ahorran recursos de red y mejoran el rendimiento.<\/p>\n<p>Un colega me ha preguntado c\u00f3mo se podr\u00edan hacer mutaciones masivas de subdocumentos por clave, de forma similar a como lo demostr\u00e9 en mi tutorial titulado,\u00a0<a href=\"https:\/\/www.couchbase.com\/blog\/es\/using-golang-to-get-multiple-couchbase-documents-by-key-in-a-single-operation\/\" target=\"_blank\" rel=\"noopener\">Uso de Golang para obtener m\u00faltiples documentos Couchbase por clave en una \u00fanica operaci\u00f3n<\/a>. La respuesta corta es que no se puede con una sola operaci\u00f3n, pero como Golang es tan incre\u00edblemente r\u00e1pido e impresionante, se podr\u00edan hacer cosas en paralelo y obtener los mismos resultados.<\/p>\n<p>Vamos a ver c\u00f3mo realizar de forma as\u00edncrona mutaciones de subdocumentos basadas en una lista de ids de documentos con el lenguaje de programaci\u00f3n Go y <a href=\"https:\/\/www.couchbase.com\/blog\/es\/\" target=\"_blank\" rel=\"noopener\">Couchbase<\/a>.<\/p>\n<p><!--more--><\/p>\n<p>Imaginemos un escenario real que queremos lograr. Digamos que tenemos un sitio web de redes profesionales que recibe decenas de millones de peticiones por segundo. El rendimiento es una necesidad, as\u00ed que decidimos que queremos agrupar algunas de esas peticiones lo mejor que podamos. Digamos que 100 personas acaban de actualizar su perfil para incluir Golang como una de sus habilidades. Queremos a\u00f1adirlo a su lista de habilidades.<\/p>\n<p>En el futuro, vamos a hacer todo en un\u00a0<strong>main.go<\/strong> en alg\u00fan lugar de nuestro\u00a0<strong>$GOPATH<\/strong> ruta. Abra este archivo e incluya lo siguiente:<\/p>\n<pre class=\"lang:default decode:true\">package main\r\n\r\nimport (\r\n\t\"fmt\"\r\n\t\"sync\"\r\n\r\n\t\"github.com\/couchbase\/gocb\"\r\n)\r\n\r\nvar waitGroup sync.WaitGroup\r\nvar data chan string\r\nvar bucket *gocb.Bucket\r\n\r\nfunc worker() {}\r\n\r\nfunc main() {\r\n\tfmt.Println(\"Starting the application...\")\r\n\r\n\tdocumentIds := []string{\"nraboy\", \"jmichaels\", \"tgreenstein\"}\r\n\r\n\tcluster, _ := gocb.Connect(\"couchbase:\/\/localhost\")\r\n\tbucket, _ = cluster.OpenBucket(\"default\", \"\")\r\n\r\n\tfmt.Println(\"The application has completed!\")\r\n}<\/pre>\n<p>Desglosemos lo que tenemos hasta ahora.<\/p>\n<p>Como planeamos hacer cosas en paralelo con goroutines, necesitamos saber cu\u00e1ndo es seguro terminar nuestra aplicaci\u00f3n. El <code>Grupo de espera<\/code> nos permite hacer un seguimiento de nuestras tareas as\u00edncronas y esperar hasta que todas hayan terminado antes de continuar. Dado que vamos a procesar datos con goroutines, necesitaremos un canal que todas las goroutines puedan utilizar al mismo tiempo. Cada una de nuestras goroutines ser\u00e1 una instancia del canal <code>trabajador<\/code> m\u00e9todo.<\/p>\n<p>En el <code>principal<\/code> estamos declarando todas las claves que recibir\u00e1n la mutaci\u00f3n. En un escenario de producci\u00f3n, la l\u00f3gica de negocio de la aplicaci\u00f3n probablemente agregar\u00e1 esta lista de claves.<\/p>\n<p>Tambi\u00e9n estamos estableciendo una conexi\u00f3n con Couchbase.<\/p>\n<p>Una vez sentadas las bases, analicemos con m\u00e1s detalle la <code>principal<\/code> m\u00e9todo.<\/p>\n<pre class=\"lang:default decode:true\">func main() {\r\n\tfmt.Println(\"Starting the application...\")\r\n\r\n\tdocumentIds := []string{\"nraboy\", \"jmichaels\", \"tgreenstein\"}\r\n\tdata = make(chan string)\r\n\r\n\tcluster, _ := gocb.Connect(\"couchbase:\/\/localhost\")\r\n\tbucket, _ = cluster.OpenBucket(\"default\", \"\")\r\n\r\n\tfor i := 0; i &lt; 2; i++ {\r\n\t\twaitGroup.Add(1)\r\n\t\tgo worker()\r\n\t}\r\n\r\n\tfor i := 0; i &lt; len(documentIds); i++ {\r\n\t\tdata &lt;- documentIds[i]\r\n\t}\r\n\r\n\tclose(data)\r\n\twaitGroup.Wait()\r\n\r\n\tfmt.Println(\"The application has completed!\")\r\n}<\/pre>\n<p>En Go, podemos hacer girar una cantidad rid\u00edculamente grande de goroutines que se ejecutar\u00e1n en paralelo. Por supuesto, el n\u00famero real que puede girar depende de su hardware, pero por ahora, vamos a ser conservadores con dos. Por cada <code>trabajador<\/code> que empezamos, aumentamos el <code>Grupo de espera<\/code>. Cuando estas goroutines se detienen, el <code>Grupo de espera<\/code> disminuir\u00e1, lo que finalmente desbloquear\u00e1 la aplicaci\u00f3n y permitir\u00e1 que termine.<\/p>\n<p>Tambi\u00e9n observar\u00e1 que hemos a\u00f1adido un canal para nuestros datos de cadena. Cada uno de nuestros ids de documento deseados se a\u00f1aden al canal y luego se cierra el canal. Ver\u00e1s por qu\u00e9 hacemos esto cuando definamos la funci\u00f3n <code>trabajador<\/code> l\u00f3gica.<\/p>\n<pre class=\"lang:default decode:true\">func worker() {\r\n\tdefer waitGroup.Done()\r\n\r\n\tfor {\r\n\t\tid, ok := &lt;-data\r\n\t\tif !ok {\r\n\t\t\tbreak\r\n\t\t}\r\n\r\n\t\t_, err := bucket.MutateIn(id, 0, 0).ArrayAppend(\"skills\", \"Golang\", true).Execute()\r\n\t\tif err != nil {\r\n\t\t\tfmt.Printf(\"%s - %v\\n\", id, err)\r\n\t\t}\r\n\t}\r\n}<\/pre>\n<p>El fragmento anterior es nuestro <code>trabajador<\/code> l\u00f3gica del m\u00e9todo. Cuando la funci\u00f3n termina, el <code>aplazar<\/code> que sustrae del <code>Grupo de espera<\/code>.<\/p>\n<p>Cada <code>trabajador<\/code> se ejecutar\u00e1 eternamente a trav\u00e9s de un bucle. Cada iteraci\u00f3n del bucle tomar\u00e1 ids de la base de datos <code>datos<\/code> canal. Si no estamos <code>ok<\/code>probablemente significa que el canal est\u00e1 vac\u00edo y debemos terminar el bucle. Si obtenemos un id, planea hacer una mutaci\u00f3n en ese documento y a\u00f1adir una nueva cadena en el archivo <code>competencias<\/code> que asumimos que es un array. Si el array no existe en el documento, se crear\u00e1 uno.<\/p>\n<p>Si se produce un error por cualquier motivo, tal vez la clave no existe, imprima que se ha producido un error.<\/p>\n<p>El c\u00f3digo completo de esta sencilla demostraci\u00f3n es el siguiente:<\/p>\n<pre class=\"lang:default decode:true\">package main\r\n\r\nimport (\r\n\t\"fmt\"\r\n\t\"sync\"\r\n\r\n\t\"github.com\/couchbase\/gocb\"\r\n)\r\n\r\nvar waitGroup sync.WaitGroup\r\nvar data chan string\r\nvar bucket *gocb.Bucket\r\n\r\nfunc worker() {\r\n\tdefer waitGroup.Done()\r\n\r\n\tfor {\r\n\t\tid, ok := &lt;-data\r\n\t\tif !ok {\r\n\t\t\tbreak\r\n\t\t}\r\n\r\n\t\t_, err := bucket.MutateIn(id, 0, 0).ArrayAppend(\"skills\", \"Golang\", true).Execute()\r\n\t\tif err != nil {\r\n\t\t\tfmt.Printf(\"%s - %v\\n\", id, err)\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunc main() {\r\n\tfmt.Println(\"Starting the application...\")\r\n\r\n\tdocumentIds := []string{\"nraboy\", \"jmichaels\", \"tgreenstein\"}\r\n\tdata = make(chan string)\r\n\r\n\tcluster, _ := gocb.Connect(\"couchbase:\/\/localhost\")\r\n\tbucket, _ = cluster.OpenBucket(\"default\", \"\")\r\n\r\n\tfor i := 0; i &lt; 2; i++ {\r\n\t\twaitGroup.Add(1)\r\n\t\tgo worker()\r\n\t}\r\n\r\n\tfor i := 0; i &lt; len(documentIds); i++ {\r\n\t\tdata &lt;- documentIds[i]\r\n\t}\r\n\r\n\tclose(data)\r\n\twaitGroup.Wait()\r\n\r\n\tfmt.Println(\"The application has completed!\")\r\n}<\/pre>\n<p>De nuevo, estas mutaciones de subdocumentos a la <code>competencias<\/code> array ocurren en paralelo a trav\u00e9s de goroutines. Para obtener m\u00e1s informaci\u00f3n sobre el uso de goroutines para hacer las cosas al mismo tiempo, echa un vistazo a un tutorial anterior que escrib\u00ed sobre el tema titulado,\u00a0<a href=\"https:\/\/www.thepolyglotdeveloper.com\/2017\/05\/concurrent-golang-applications-goroutines-channels\/\" target=\"_blank\" rel=\"noopener\">Aplicaciones Golang concurrentes con Goroutines y Canales<\/a>.<\/p>\n<h2>Conclusi\u00f3n<\/h2>\n<p>Acabas de ver otra demo para hacer mutaciones de subdocumentos con Couchbase y Golang. Esta vez exploramos hacer las cosas en paralelo en lugar de tratar de utilizar uno de los operadores a granel. Haciendo las cosas en paralelo conseguimos casi el mismo rendimiento que haciendo operaciones masivas sobre una lista de claves.<\/p>","protected":false},"excerpt":{"rendered":"<p>Not too long ago I had written about using the Couchbase Server subdocument API with the Go SDK. Doing subdocument operations is incredibly useful if you&#8217;d like to change or access a part of a potentially huge NoSQL document. Subdocument [&hellip;]<\/p>","protected":false},"author":63,"featured_media":13873,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1815,1816,1820],"tags":[1439,2046,1586],"ppma_author":[9032],"class_list":["post-3973","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-best-practices-and-tutorials","category-couchbase-server","category-golang","tag-asynchronous","tag-mutation","tag-subdocument"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.1 (Yoast SEO v26.1.1) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Asynchronously Perform Subdocument Mutations in Couchbase with Golang<\/title>\n<meta name=\"description\" content=\"Learn how to perform Couchbase Server subdocument mutations in parallel using the Go programming language and Goroutines.\" \/>\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\/asynchronously-perform-subdocument-mutations-couchbase-with-golang\/\" \/>\n<meta property=\"og:locale\" content=\"es_MX\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Asynchronously Perform Subdocument Mutations in Couchbase with Golang\" \/>\n<meta property=\"og:description\" content=\"Learn how to perform Couchbase Server subdocument mutations in parallel using the Go programming language and Goroutines.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/es\/asynchronously-perform-subdocument-mutations-couchbase-with-golang\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/thepolyglotdeveloper\" \/>\n<meta property=\"article:published_time\" content=\"2017-09-12T14:00:14+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=\"Nic Raboy, Developer Advocate, Couchbase\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@nraboy\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Nic Raboy, 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\/asynchronously-perform-subdocument-mutations-couchbase-with-golang\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/asynchronously-perform-subdocument-mutations-couchbase-with-golang\/\"},\"author\":{\"name\":\"Nic Raboy, Developer Advocate, Couchbase\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/bb545ebe83bb2d12f91095811d0a72e1\"},\"headline\":\"Asynchronously Perform Subdocument Mutations in Couchbase with Golang\",\"datePublished\":\"2017-09-12T14:00:14+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/asynchronously-perform-subdocument-mutations-couchbase-with-golang\/\"},\"wordCount\":713,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/asynchronously-perform-subdocument-mutations-couchbase-with-golang\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"keywords\":[\"asynchronous\",\"mutation\",\"subdocument\"],\"articleSection\":[\"Best Practices and Tutorials\",\"Couchbase Server\",\"GoLang\"],\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/asynchronously-perform-subdocument-mutations-couchbase-with-golang\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/asynchronously-perform-subdocument-mutations-couchbase-with-golang\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/asynchronously-perform-subdocument-mutations-couchbase-with-golang\/\",\"name\":\"Asynchronously Perform Subdocument Mutations in Couchbase with Golang\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/asynchronously-perform-subdocument-mutations-couchbase-with-golang\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/asynchronously-perform-subdocument-mutations-couchbase-with-golang\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"datePublished\":\"2017-09-12T14:00:14+00:00\",\"description\":\"Learn how to perform Couchbase Server subdocument mutations in parallel using the Go programming language and Goroutines.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/asynchronously-perform-subdocument-mutations-couchbase-with-golang\/#breadcrumb\"},\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/asynchronously-perform-subdocument-mutations-couchbase-with-golang\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/asynchronously-perform-subdocument-mutations-couchbase-with-golang\/#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\/asynchronously-perform-subdocument-mutations-couchbase-with-golang\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.couchbase.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Asynchronously Perform Subdocument Mutations in Couchbase with Golang\"}]},{\"@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\/bb545ebe83bb2d12f91095811d0a72e1\",\"name\":\"Nic Raboy, Developer Advocate, Couchbase\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/8863514d8bed0cf6080f23db40e00354\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/bedeb68368d4681aca4c74fe5f697f0c423b80d498ec50fd915ba018b72c101f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/bedeb68368d4681aca4c74fe5f697f0c423b80d498ec50fd915ba018b72c101f?s=96&d=mm&r=g\",\"caption\":\"Nic Raboy, Developer Advocate, Couchbase\"},\"description\":\"Nic Raboy is an advocate of modern web and mobile development technologies. He has experience in Java, JavaScript, Golang and a variety of frameworks such as Angular, NativeScript, and Apache Cordova. Nic writes about his development experiences related to making web and mobile development easier to understand.\",\"sameAs\":[\"https:\/\/www.thepolyglotdeveloper.com\",\"https:\/\/www.facebook.com\/thepolyglotdeveloper\",\"https:\/\/x.com\/nraboy\"],\"url\":\"https:\/\/www.couchbase.com\/blog\/es\/author\/nic-raboy-2\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Realizar as\u00edncronamente mutaciones de subdocumentos en Couchbase con Golang","description":"Aprende a realizar mutaciones de subdocumentos de Couchbase Server en paralelo usando el lenguaje de programaci\u00f3n Go y Goroutines.","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\/asynchronously-perform-subdocument-mutations-couchbase-with-golang\/","og_locale":"es_MX","og_type":"article","og_title":"Asynchronously Perform Subdocument Mutations in Couchbase with Golang","og_description":"Learn how to perform Couchbase Server subdocument mutations in parallel using the Go programming language and Goroutines.","og_url":"https:\/\/www.couchbase.com\/blog\/es\/asynchronously-perform-subdocument-mutations-couchbase-with-golang\/","og_site_name":"The Couchbase Blog","article_author":"https:\/\/www.facebook.com\/thepolyglotdeveloper","article_published_time":"2017-09-12T14:00:14+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":"Nic Raboy, Developer Advocate, Couchbase","twitter_card":"summary_large_image","twitter_creator":"@nraboy","twitter_misc":{"Written by":"Nic Raboy, Developer Advocate, Couchbase","Est. reading time":"5 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/asynchronously-perform-subdocument-mutations-couchbase-with-golang\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/asynchronously-perform-subdocument-mutations-couchbase-with-golang\/"},"author":{"name":"Nic Raboy, Developer Advocate, Couchbase","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/bb545ebe83bb2d12f91095811d0a72e1"},"headline":"Asynchronously Perform Subdocument Mutations in Couchbase with Golang","datePublished":"2017-09-12T14:00:14+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/asynchronously-perform-subdocument-mutations-couchbase-with-golang\/"},"wordCount":713,"commentCount":1,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/asynchronously-perform-subdocument-mutations-couchbase-with-golang\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","keywords":["asynchronous","mutation","subdocument"],"articleSection":["Best Practices and Tutorials","Couchbase Server","GoLang"],"inLanguage":"es","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/asynchronously-perform-subdocument-mutations-couchbase-with-golang\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/asynchronously-perform-subdocument-mutations-couchbase-with-golang\/","url":"https:\/\/www.couchbase.com\/blog\/asynchronously-perform-subdocument-mutations-couchbase-with-golang\/","name":"Realizar as\u00edncronamente mutaciones de subdocumentos en Couchbase con Golang","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/asynchronously-perform-subdocument-mutations-couchbase-with-golang\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/asynchronously-perform-subdocument-mutations-couchbase-with-golang\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","datePublished":"2017-09-12T14:00:14+00:00","description":"Aprende a realizar mutaciones de subdocumentos de Couchbase Server en paralelo usando el lenguaje de programaci\u00f3n Go y Goroutines.","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/asynchronously-perform-subdocument-mutations-couchbase-with-golang\/#breadcrumb"},"inLanguage":"es","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/asynchronously-perform-subdocument-mutations-couchbase-with-golang\/"]}]},{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/www.couchbase.com\/blog\/asynchronously-perform-subdocument-mutations-couchbase-with-golang\/#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\/asynchronously-perform-subdocument-mutations-couchbase-with-golang\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Asynchronously Perform Subdocument Mutations in Couchbase with Golang"}]},{"@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\/bb545ebe83bb2d12f91095811d0a72e1","name":"Nic Raboy, Defensor del Desarrollador, Couchbase","image":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/8863514d8bed0cf6080f23db40e00354","url":"https:\/\/secure.gravatar.com\/avatar\/bedeb68368d4681aca4c74fe5f697f0c423b80d498ec50fd915ba018b72c101f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/bedeb68368d4681aca4c74fe5f697f0c423b80d498ec50fd915ba018b72c101f?s=96&d=mm&r=g","caption":"Nic Raboy, Developer Advocate, Couchbase"},"description":"Nic Raboy es un defensor de las tecnolog\u00edas modernas de desarrollo web y m\u00f3vil. Tiene experiencia en Java, JavaScript, Golang y una variedad de frameworks como Angular, NativeScript y Apache Cordova. Nic escribe sobre sus experiencias de desarrollo relacionadas con hacer el desarrollo web y m\u00f3vil m\u00e1s f\u00e1cil de entender.","sameAs":["https:\/\/www.thepolyglotdeveloper.com","https:\/\/www.facebook.com\/thepolyglotdeveloper","https:\/\/x.com\/nraboy"],"url":"https:\/\/www.couchbase.com\/blog\/es\/author\/nic-raboy-2\/"}]}},"authors":[{"term_id":9032,"user_id":63,"is_guest":0,"slug":"nic-raboy-2","display_name":"Nic Raboy, Developer Advocate, Couchbase","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/bedeb68368d4681aca4c74fe5f697f0c423b80d498ec50fd915ba018b72c101f?s=96&d=mm&r=g","author_category":"","last_name":"Raboy","first_name":"Nic","job_title":"","user_url":"https:\/\/www.thepolyglotdeveloper.com","description":"Nic Raboy es un defensor de las tecnolog\u00edas modernas de desarrollo web y m\u00f3vil. Tiene experiencia en Java, JavaScript, Golang y una variedad de frameworks como Angular, NativeScript y Apache Cordova. Nic escribe sobre sus experiencias de desarrollo relacionadas con hacer el desarrollo web y m\u00f3vil m\u00e1s f\u00e1cil de entender."}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/posts\/3973","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\/63"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/comments?post=3973"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/posts\/3973\/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=3973"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/categories?post=3973"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/tags?post=3973"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/ppma_author?post=3973"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}