{"id":5129,"date":"2018-05-15T04:20:15","date_gmt":"2018-05-15T11:20:15","guid":{"rendered":"http:\/\/www.couchbase.com\/blog\/?p=5129"},"modified":"2025-06-13T22:40:29","modified_gmt":"2025-06-14T05:40:29","slug":"ordering-couchbase-functions-1","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/pt\/ordering-couchbase-functions-1\/","title":{"rendered":"Pedido no Couchbase Functions - Parte 1"},"content":{"rendered":"<p><span style=\"font-weight: 400\">Couchbase Functions is being <\/span><a href=\"https:\/\/www.couchbase.com\/blog\/eventing\/\"><span style=\"font-weight: 400\">introduced<\/span><\/a><span style=\"font-weight: 400\"> in the Couchbase Server 5.5 release under the <a href=\"https:\/\/www.couchbase.com\/products\/eventing\/\">Couchbase Eventing Service<\/a>. Couchbase Functions gives you the ability to move data-driven business logic closer to your data. User-defined business logic can be triggered in real-time on the server when data changes as a result of the interactions occurring on web and edge applications.\u00a0<\/span><span style=\"font-weight: 400\">When compute resides closer to data, it is important to understand how compute behaves when the data, that it is listening to, changes. We will try to understand how the Eventing Service reacts to the ordering of the mutations.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium_large wp-image-5152\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2018\/05\/eventing-fn-768x403.png\" alt=\"\" width=\"768\" height=\"403\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/05\/eventing-fn-768x403.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/05\/eventing-fn-300x158.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/05\/eventing-fn-1024x538.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/05\/eventing-fn-20x11.png 20w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/05\/eventing-fn.png 1238w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/p>\n<p><span style=\"font-weight: 400\">Let\u2019s get started and understand the behaviour with a simple example. Let\u2019s create a test Function with the following code and assume the default settings(i.e, 3 workers) for the Function.<\/span><\/p>\n<pre class=\"p1\">function OnUpdate(doc, meta) \r\n{ \r\n  log('Created Doc ID:', \u00a0meta.id); \r\n} \r\n\r\nfunction OnDelete(meta) \r\n{ \r\n  log('Deleted Doc ID:', \u00a0meta.id); \r\n}<\/pre>\n<p><span style=\"font-weight: 400\">Note: Choose \u2018Everything\u2019 in the Feed Boundary in all of the below operations during Deployment of the Function.<\/span><\/p>\n<p><span style=\"font-weight: 400\">In the Source Bucket to which this Function listens to, let\u2019s insert around 10 documents with \u00a0increasing numerical doc IDs. In the application log file for this Function, you will see something similar to the following entries. <\/span><\/p>\n<pre class=\"p1\">2018-05-13T11:36:05.163-04:00 [INFO] \"Created Doc ID:\" \"2\" \r\n2018-05-13T11:36:05.163-04:00 [INFO] \"Created Doc ID:\" \"3\" \r\n2018-05-13T11:36:05.163-04:00 [INFO] \"Created Doc ID:\" \"9\" \r\n2018-05-13T11:36:05.163-04:00 [INFO] \"Created Doc ID:\" \"8\" \r\n2018-05-13T11:36:05.164-04:00 [INFO] \"Created Doc ID:\" \"1\" \r\n2018-05-13T11:36:05.164-04:00 [INFO] \"Created Doc ID:\" \"0\" \r\n2018-05-13T11:36:05.165-04:00 [INFO] \"Created Doc ID:\" \"5\" \r\n2018-05-13T11:36:05.165-04:00 [INFO] \"Created Doc ID:\" \"4\" \r\n2018-05-13T11:36:05.165-04:00 [INFO] \"Created Doc ID:\" \"7\" \r\n2018-05-13T11:36:05.165-04:00 [INFO] \"Created Doc ID:\" \"6\"<\/pre>\n<p><span style=\"font-weight: 400\">\u00a0T<\/span><span style=\"font-weight: 400\">ry undeploying and deploying the above Function and we observe that ordering of the IDs(\/changes) is not the same. You may repeat this step a few times to reinforce this observation.<\/span><\/p>\n<pre class=\"p1 \">2018-05-13T11:59:17.504-04:00 [INFO] \"Created Doc ID:\" \"8\" \r\n2018-05-13T11:59:17.504-04:00 [INFO] \"Created Doc ID:\" \"9\" \r\n2018-05-13T11:59:17.504-04:00 [INFO] \"Created Doc ID:\" \"3\" \r\n2018-05-13T11:59:17.504-04:00 [INFO] \"Created Doc ID:\" \"2\" \r\n2018-05-13T11:59:17.505-04:00 [INFO] \"Created Doc ID:\" \"1\" \r\n2018-05-13T11:59:17.505-04:00 [INFO] \"Created Doc ID:\" \"0\" \r\n2018-05-13T11:59:17.507-04:00 [INFO] \"Created Doc ID:\" \"4\" \r\n2018-05-13T11:59:17.507-04:00 [INFO] \"Created Doc ID:\" \"7\" \r\n2018-05-13T11:59:17.507-04:00 [INFO] \"Created Doc ID:\" \"6\" \r\n2018-05-13T11:59:17.507-04:00 [INFO] \"Created Doc ID:\" \"5\"<\/pre>\n<p><b>Take-Away#1 : Function does not process the documents in the order in which they were inserted.<\/b><\/p>\n<p><span style=\"font-weight: 400\">Now, let us delete one of the documents that was inserted (in our example, I have deleted DocId#2). \u00a0We immediately observe the following entry in the log (which is correct):<\/span><\/p>\n<pre class=\"p1\">2018-05-13T11:43:10.165-04:00 [INFO] \"Deleted Doc ID:\" \"2\"<\/pre>\n<p><span style=\"font-weight: 400\">Now, let us Undeploy the Function and Deploy it back again. We observe the following ordering:<\/span><\/p>\n<pre class=\"p1 \">2018-05-13T11:44:04.808-04:00 [INFO] \"Created Doc ID:\" \"8\" \r\n2018-05-13T11:44:04.808-04:00 [INFO] \"Deleted Doc ID:\" \"2\" \r\n2018-05-13T11:44:04.809-04:00 [INFO] \"Created Doc ID:\" \"1\" \r\n2018-05-13T11:44:04.809-04:00 [INFO] \"Created Doc ID:\" \"0\" \r\n2018-05-13T11:44:04.809-04:00 [INFO] \"Created Doc ID:\" \"3\" \r\n2018-05-13T11:44:04.809-04:00 [INFO] \"Created Doc ID:\" \"9\" \r\n2018-05-13T11:44:04.810-04:00 [INFO] \"Created Doc ID:\" \"4\" \r\n2018-05-13T11:44:04.810-04:00 [INFO] \"Created Doc ID:\" \"7\" \r\n2018-05-13T11:44:04.810-04:00 [INFO] \"Created Doc ID:\" \"6\" \r\n2018-05-13T11:44:04.810-04:00 [INFO] \"Created Doc ID:\" \"5\"<\/pre>\n<p><span style=\"font-weight: 400\">We observe that:<\/span><\/p>\n<ul>\n<li><span style=\"font-weight: 400\">&#8220;Created Doc ID:&#8221; &#8220;2&#8221; \u00a0is missing<\/span><\/li>\n<li><span style=\"font-weight: 400\">&#8220;Deleted Doc ID:&#8221; &#8220;2&#8221; appears before in the order of processing and not latter.<\/span><\/li>\n<\/ul>\n<p><b>Take-Away#2 : De-Duplication<\/b><\/p>\n<p><span style=\"font-weight: 400\">Successive operations (\/changes\/mutations) to a document are coalesced (dedup\u2019ed), when they occur in rapid succession, by the Couchbase Server so that overhead on the disk and memory is minimized. Couchbase Server sends only the latest version of a document in the DCP stream.<\/span><\/p>\n<p><span style=\"font-weight: 400\">In the above example, this is the reason why OnUpdate handler is not triggered as Deletion of DocID was the latest in the sequence of operations on the Document; that is, when UPDATE and DELETE happen in order, then they are coalesced to DELETE, which happens to be later in the timeline. That is, when multiple Updates(or even a single Update) to a document is followed by the Deletion of the document, then only the Delete event is seen by Couchbase Functions, as the updates are coalesced into the final event &#8211; that is the document\u2019s Deletion.<\/span><\/p>\n<p><span style=\"font-weight: 400\">A similar behaviour will be seen, if a document undergoes multiple updates over a small window, and then a Function consumes the changes; only the latest change happening to the document will be seen and the intermediate changes will be lost. This is the case only when a new Function is deployed on an existing bucket with many changes happening to a bucket. <\/span><\/p>\n<p><span style=\"font-weight: 400\">If the Function is deployed and changes happen to a document, then each change will be handled by the Function. But, if the number of changes happening to a document is very high in a small time interval, Couchbase Server still does some amount of Deduplication; and this might lead to not all changes triggering the Function.<\/span><\/p>\n<p><span style=\"font-weight: 400\">That is, if 10 documents were Inserted and one of them Deleted, then when a Function is deployed, it is not guaranteed that the Delete operation(on the Inserted and then the Deleted Document) will be seen at the end by the Function.<\/span><\/p>\n<p><b>Take-Away#3 : Function does not process the mutations in the order they were done. <\/b><\/p>\n<p><span style=\"font-weight: 400\">So, what is going on in here? In <a href=\"https:\/\/www.couchbase.com\/blog\/ordering-couchbase-functions-2\/\">Part-2<\/a> of this blog series, we will dive into under the hood of the Couchbase Eventing Service and understand how Eventing Workers process the mutations.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Couchbase Functions is being introduced in the Couchbase Server 5.5 release under the Couchbase Eventing Service. Couchbase Functions gives you the ability to move data-driven business logic closer to your data. User-defined business logic can be triggered in real-time on [&hellip;]<\/p>\n","protected":false},"author":3013,"featured_media":13873,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1821,1816,2273],"tags":[2226,2133],"ppma_author":[9055],"class_list":["post-5129","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-couchbase-architecture","category-couchbase-server","category-eventing","tag-couchbase-functions","tag-functions"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.3 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Ordering in Couchbase Functions - Part 1 - The Couchbase Blog<\/title>\n<meta name=\"description\" content=\"When compute resides closer to data, it is important to understand how compute behaves when the data, that it is listening to, changes.\u00a0\u00a0Let\u2019s understand Ordering in Couchbase Functions.\" \/>\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\/ordering-couchbase-functions-1\/\" \/>\n<meta property=\"og:locale\" content=\"pt_BR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Ordering in Couchbase Functions - Part 1\" \/>\n<meta property=\"og:description\" content=\"When compute resides closer to data, it is important to understand how compute behaves when the data, that it is listening to, changes.\u00a0\u00a0Let\u2019s understand Ordering in Couchbase Functions.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/pt\/ordering-couchbase-functions-1\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2018-05-15T11:20:15+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-14T05:40:29+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/05\/eventing-fn.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1238\" \/>\n\t<meta property=\"og:image:height\" content=\"650\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Venkat Subramanian, Product Manager\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@venkasub\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Venkat Subramanian, Product Manager\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/ordering-couchbase-functions-1\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/ordering-couchbase-functions-1\\\/\"},\"author\":{\"name\":\"Venkat Subramanian, Product Manager\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/person\\\/0756e2347c2166a32f93f9a7e07e9f90\"},\"headline\":\"Ordering in Couchbase Functions &#8211; Part 1\",\"datePublished\":\"2018-05-15T11:20:15+00:00\",\"dateModified\":\"2025-06-14T05:40:29+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/ordering-couchbase-functions-1\\\/\"},\"wordCount\":658,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/ordering-couchbase-functions-1\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/1\\\/2022\\\/11\\\/couchbase-nosql-dbaas.png\",\"keywords\":[\"Couchbase Functions\",\"functions\"],\"articleSection\":[\"Couchbase Architecture\",\"Couchbase Server\",\"Eventing\"],\"inLanguage\":\"pt-BR\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/ordering-couchbase-functions-1\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/ordering-couchbase-functions-1\\\/\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/ordering-couchbase-functions-1\\\/\",\"name\":\"Ordering in Couchbase Functions - Part 1 - The Couchbase Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/ordering-couchbase-functions-1\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/ordering-couchbase-functions-1\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/1\\\/2022\\\/11\\\/couchbase-nosql-dbaas.png\",\"datePublished\":\"2018-05-15T11:20:15+00:00\",\"dateModified\":\"2025-06-14T05:40:29+00:00\",\"description\":\"When compute resides closer to data, it is important to understand how compute behaves when the data, that it is listening to, changes.\u00a0\u00a0Let\u2019s understand Ordering in Couchbase Functions.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/ordering-couchbase-functions-1\\\/#breadcrumb\"},\"inLanguage\":\"pt-BR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/ordering-couchbase-functions-1\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/ordering-couchbase-functions-1\\\/#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\\\/ordering-couchbase-functions-1\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Ordering in Couchbase Functions &#8211; Part 1\"}]},{\"@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\\\/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\\\/0756e2347c2166a32f93f9a7e07e9f90\",\"name\":\"Venkat Subramanian, Product Manager\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/53cfc83eb606325239f7058417a02969ab8ff0106a374bcdcf5d78f9b749cccd?s=96&d=mm&r=g8f9acdf95e167a15007b71867fe87a9a\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/53cfc83eb606325239f7058417a02969ab8ff0106a374bcdcf5d78f9b749cccd?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/53cfc83eb606325239f7058417a02969ab8ff0106a374bcdcf5d78f9b749cccd?s=96&d=mm&r=g\",\"caption\":\"Venkat Subramanian, Product Manager\"},\"description\":\"Venkat dabbles in product development and product management and has been developing data\\\/analytics platforms &amp; products. Significant chunk of his experience has been with Oracle, where he transitioned from being an Engineer in Oracle\u2019s Enterprise Manager team to Product Manager for Oracle's BI\\\/Analytics suite of products. He has worked in startups in the past helping develop machine-learning\\\/NLP products and distributed decisioning systems. He lurks around at @venkasub.\",\"sameAs\":[\"https:\\\/\\\/x.com\\\/venkasub\"],\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/pt\\\/author\\\/venkatcouchbase-com\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Ordering in Couchbase Functions - Part 1 - The Couchbase Blog","description":"Quando a computa\u00e7\u00e3o reside mais perto dos dados, \u00e9 importante entender como a computa\u00e7\u00e3o se comporta quando os dados, que ela est\u00e1 ouvindo, mudam.  Vamos entender a ordena\u00e7\u00e3o no Couchbase Functions.","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\/ordering-couchbase-functions-1\/","og_locale":"pt_BR","og_type":"article","og_title":"Ordering in Couchbase Functions - Part 1","og_description":"When compute resides closer to data, it is important to understand how compute behaves when the data, that it is listening to, changes.\u00a0\u00a0Let\u2019s understand Ordering in Couchbase Functions.","og_url":"https:\/\/www.couchbase.com\/blog\/pt\/ordering-couchbase-functions-1\/","og_site_name":"The Couchbase Blog","article_published_time":"2018-05-15T11:20:15+00:00","article_modified_time":"2025-06-14T05:40:29+00:00","og_image":[{"width":1238,"height":650,"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/05\/eventing-fn.png","type":"image\/png"}],"author":"Venkat Subramanian, Product Manager","twitter_card":"summary_large_image","twitter_creator":"@venkasub","twitter_misc":{"Written by":"Venkat Subramanian, Product Manager","Est. reading time":"4 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/ordering-couchbase-functions-1\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/ordering-couchbase-functions-1\/"},"author":{"name":"Venkat Subramanian, Product Manager","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/0756e2347c2166a32f93f9a7e07e9f90"},"headline":"Ordering in Couchbase Functions &#8211; Part 1","datePublished":"2018-05-15T11:20:15+00:00","dateModified":"2025-06-14T05:40:29+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/ordering-couchbase-functions-1\/"},"wordCount":658,"commentCount":0,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/ordering-couchbase-functions-1\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","keywords":["Couchbase Functions","functions"],"articleSection":["Couchbase Architecture","Couchbase Server","Eventing"],"inLanguage":"pt-BR","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/ordering-couchbase-functions-1\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/ordering-couchbase-functions-1\/","url":"https:\/\/www.couchbase.com\/blog\/ordering-couchbase-functions-1\/","name":"Ordering in Couchbase Functions - Part 1 - The Couchbase Blog","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/ordering-couchbase-functions-1\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/ordering-couchbase-functions-1\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","datePublished":"2018-05-15T11:20:15+00:00","dateModified":"2025-06-14T05:40:29+00:00","description":"Quando a computa\u00e7\u00e3o reside mais perto dos dados, \u00e9 importante entender como a computa\u00e7\u00e3o se comporta quando os dados, que ela est\u00e1 ouvindo, mudam.  Vamos entender a ordena\u00e7\u00e3o no Couchbase Functions.","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/ordering-couchbase-functions-1\/#breadcrumb"},"inLanguage":"pt-BR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/ordering-couchbase-functions-1\/"]}]},{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/www.couchbase.com\/blog\/ordering-couchbase-functions-1\/#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\/ordering-couchbase-functions-1\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Ordering in Couchbase Functions &#8211; Part 1"}]},{"@type":"WebSite","@id":"https:\/\/www.couchbase.com\/blog\/#website","url":"https:\/\/www.couchbase.com\/blog\/","name":"Blog do Couchbase","description":"Couchbase, o banco de dados 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":"pt-BR"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/blog\/#organization","name":"Blog do Couchbase","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\/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\/0756e2347c2166a32f93f9a7e07e9f90","name":"Venkat Subramanian, gerente de produtos","image":{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/secure.gravatar.com\/avatar\/53cfc83eb606325239f7058417a02969ab8ff0106a374bcdcf5d78f9b749cccd?s=96&d=mm&r=g8f9acdf95e167a15007b71867fe87a9a","url":"https:\/\/secure.gravatar.com\/avatar\/53cfc83eb606325239f7058417a02969ab8ff0106a374bcdcf5d78f9b749cccd?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/53cfc83eb606325239f7058417a02969ab8ff0106a374bcdcf5d78f9b749cccd?s=96&d=mm&r=g","caption":"Venkat Subramanian, Product Manager"},"description":"Venkat trabalha com desenvolvimento e gerenciamento de produtos e vem desenvolvendo plataformas e produtos de dados\/an\u00e1lise. Uma parte significativa de sua experi\u00eancia foi na Oracle, onde passou de engenheiro da equipe de Enterprise Manager da Oracle a gerente de produtos do conjunto de produtos de BI\/Analytics da Oracle. No passado, ele trabalhou em startups, ajudando a desenvolver produtos de aprendizado de m\u00e1quina\/NLP e sistemas de decis\u00e3o distribu\u00eddos. Ele est\u00e1 sempre por perto em @venkasub.","sameAs":["https:\/\/x.com\/venkasub"],"url":"https:\/\/www.couchbase.com\/blog\/pt\/author\/venkatcouchbase-com\/"}]}},"acf":[],"authors":[{"term_id":9055,"user_id":3013,"is_guest":0,"slug":"venkatcouchbase-com","display_name":"Venkat Subramanian, Product Manager","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/53cfc83eb606325239f7058417a02969ab8ff0106a374bcdcf5d78f9b749cccd?s=96&d=mm&r=g","0":null,"1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":""}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/posts\/5129","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\/3013"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/comments?post=5129"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/posts\/5129\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/media\/13873"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/media?parent=5129"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/categories?post=5129"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/tags?post=5129"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/ppma_author?post=5129"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}