{"id":2239,"date":"2016-04-29T21:43:46","date_gmt":"2016-04-29T21:43:46","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=2239"},"modified":"2016-04-29T21:43:46","modified_gmt":"2016-04-29T21:43:46","slug":"ratpack-couchbase-rxjava","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/ratpack-couchbase-rxjava\/","title":{"rendered":"Ratpack, Couchbase and RxJava"},"content":{"rendered":"<p><img decoding=\"async\" align=\"right\" alt=\"RxJava\" src=\"\/wp-content\/original-assets\/2016\/april\/ratpack-couchbase-rxjava\/rxjavalogo.png\" \/>Yesterday I left you with rough code that started a Ratpack server and used a synchronous Couchbase repository, leaving the <a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/current\/sdks\/java-2.2\/rxjava.html?utm_source=blogs&#038;utm_medium=link&#038;utm_campaign=blogs\">RxJava<\/a> part out. I intend to fix that today, and also tell you more about Ratpack. I am not going to show you a complete REST API yet, but we&apos;ll get there :)<\/p>\n<p>In my <a href=\"getting-started-ratpack-couchbase\">previous example<\/a>, I was instantiating a new Repository object each time I needed one. Because of the way it was done, It also opened a new Cluter connection each time. There are ways you can avoid this with Ratpack, like the registry.<\/p>\n<h2>The Ratpack Registry<\/h2>\n<p>The ratpack <a href=\"https:\/\/ratpack.io\/manual\/current\/launching.html#registry\">registry<\/a> is a store of objects available from the <a href=\"https:\/\/ratpack.io\/manual\/current\/context.html#context\">context<\/a> of a handler. By default you get an empty registry. You can add object instances in. These\u00a0objects are retrieved by type. They cannot be named. It means you can only have one object per type in your registry. It might seem weird but it&apos;s actually really usful when coding in Groovy. Take a look at <a href=\"https:\/\/github.com\/ratpack\/example-books\/blob\/master\/src\/ratpack\/ratpack.groovy\">this example<\/a> for instance. It&apos;s just so easy to read.<\/p>\n<p>In my code I am only using the Repository object to access Couchbase so that&apos;s the one I will put in the registry:<\/p>\n<pre>\n<code>    public static void main(String... args) throws Exception {\n        RatpackServer.start(server -> server\n                .registryOf(registry ->registry.add(CouchbaseCluster.create().openBucket().repository()))\n                .handlers(chain -> chain.path(\"create\", ctx ->\n        {\n                    EntityDocument<User> document = EntityDocument.create(new User(\"ldoguin\", 31, \"Laurent\", \"Doguin\"));\n                    Blocking.get(() -> {\n                        Repository repo = ctx.get(Repository.class);\n                        return repo.upsert(document);\n                    }).then(entityDoc -> ctx.render(\"OK\"));\n                }).path(\"get\", ctx -> {\n                    Blocking.get(() -> {\n                        Repository repo = ctx.get(Repository.class);\n                        EntityDocument<User> ldoguin = repo.get(\"ldoguin\", User.class);\n                        return ldoguin;\n                    }).then(user -> ctx.render(user.content().toString()));\n                })));\n    }\n<\/code><\/pre>\n<p>As you can see retrieving an object from the registry is easy. You have to call the get method and give the type of the object as parameter.<\/p>\n<p>This works quite well for really lightweight application. It can get a lot more serious using the <a href=\"https:\/\/ratpack.io\/manual\/current\/guice.html#google_guice_integration\">Guice module<\/a>.<\/p>\n<h2>Guice Modules<\/h2>\n<p>Ratpack is not only a simple async,non-blocking web server. It&apos;s also a comprehensive sets of modules allowing you to elegantly add new features. The registry can be easily extended using a DI framework. The most commonly used in Ratpack is Guice but you can use Spring or any other supported one. To activate the Guice module, you\u00a0need to add one line in your <code>build.gradle<\/code> file in the dependency:<\/p>\n<pre>\n<code>    dependencies {\n      compile ratpack.dependency(\"guice\"),\n              \"com.couchbase.client:java-client:2.2.5\" \n    }\n<\/code><\/pre>\n<p>Ratpack has a great Gradle integration. Every Ratpack modules can be added as simply as that. Now that Guice support is enabled, I can start by adding a proper registry configuration. I will add a Bucket and Repository instances to my registry. The first step is to create a Guice module by adding a class that extends Guice&apos;s <a href=\"https:\/\/google.github.io\/guice\/api-docs\/latest\/javadoc\/index.html?com\/google\/inject\/AbstractModule.html\">AbstractModule<\/a>.<\/p>\n<pre>\n<code>    public class Config extends AbstractModule {\n\n        protected void configure() {\n            CouchbaseCluster cc = CouchbaseCluster.create();\n            Bucket bucket = cc.openBucket();\n            bind(Bucket.class).toInstance(bucket);\n            bind(Repository.class).toInstance(bucket.repository());\n        }\n    }\n<\/code><\/pre>\n<p>Once this class is created, I need to add it to my Ratpack registry like so:<\/p>\n<pre>\n<code>RatpackServer.start(server -> server.registry(Guice.registry(b -> b.module(Config.class)))\n<\/code><\/pre>\n<p>And now I have a cleaner configuration for my future instance injections. But everything is still synchronous. So I will change that configuration to use the async version of the Bucket and the Repository:<\/p>\n<pre>\n<code>    public class Config extends AbstractModule {\n\n        protected void configure() {\n            CouchbaseCluster cc = CouchbaseCluster.create();\n            Bucket bucket = cc.openBucket();\n            bind(AsyncBucket.class).toInstance(bucket.async());\n            bind(AsyncRepository.class).toInstance(bucket.repository().async());\n        }\n    }\n<\/code><\/pre>\n<p>The next step here is to make sure I can use my RxJava Observables in Ratpack. And because life is beautiful(some would say bootiful), there is a module for that.<\/p>\n<h2>RxJava Module<\/h2>\n<p>The <a href=\"https:\/\/ratpack.io\/manual\/current\/rxjava.html\">RxJava module<\/a> aims at creating a bridge between Rx Observables and Ratpack Promises. As the Guice module, it can be activated easily by adding the appropiate dependency:<\/p>\n<pre>\n<code>    dependencies {\n      compile ratpack.dependency(\"guice\"),\n              ratpack.dependency(\"rx\"),\n              \"com.couchbase.client:java-client:2.2.5\" \n    }\n<\/code><\/pre>\n<p>You also need to initialize the module once per JVM. So the best place to run the initialization here is before the Ratpack server init. This can be done by calling:<\/p>\n<pre>\n<code>    RxRatpack.initialize();\n<\/code><\/pre>\n<p>The RxRatpack object has static methods to do Observable\/Promise conversion. The simplest one works like this:<\/p>\n<pre>\n<code>    RxRatpack.promise(repo.upsert(document)).then(entityDoc -> ctx.render(\"OK\"));\n<\/code><\/pre>\n<p>It&apos;s worth mentioning that because an Observable can contain zero to any elements, it&apos;s transformed as a List when given to the Promise result. So if you have only one object in your Observable you need to explicitly get the first element of the list.<\/p>\n<pre>\n<code>    public static void main(String... args) throws Exception {\n        RxRatpack.initialize();\n        RatpackServer.start(server -> server.registry(Guice.registry(b -> b.module(Config.class)))\n                .handlers(chain -> chain.path(\"create\", ctx -> {\n                    EntityDocument<User> document = EntityDocument.create(new User(\"ldoguin\", 31, \"Laurent\", \"Doguin\"));\n                    AsyncRepository repo = ctx.get(AsyncRepository.class);\n                    RxRatpack.promise(repo.upsert(document)).then(entityDoc -> ctx.render(\"OK\"));\n                }).path(\"get\", ctx -> {\n                    AsyncRepository repo = ctx.get(AsyncRepository.class);\n                    RxRatpack.promise(repo.get(\"ldoguin\", User.class))\n                            .then(users -> ctx.render(users.get(0).content().toString()));\n                })));\n    }\n<\/code><\/pre>\n<p>What has changed since the previous version is the use of a Guice based registry for DI and the Couchbase calls are now all asynchronous. I am now in a good position to start creating a proper REST API for my users. And this is the topic for another blog post.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Yesterday I left you with rough code that started a Ratpack server and used a synchronous Couchbase repository, leaving the RxJava part out. I intend to fix that today, and also tell you more about Ratpack. I am not going [&hellip;]<\/p>\n","protected":false},"author":49,"featured_media":13873,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1818],"tags":[1635],"ppma_author":[9023],"class_list":["post-2239","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-java","tag-ratpack"],"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>Ratpack, Couchbase and RxJava - The Couchbase Blog<\/title>\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\/ratpack-couchbase-rxjava\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Ratpack, Couchbase and RxJava\" \/>\n<meta property=\"og:description\" content=\"Yesterday I left you with rough code that started a Ratpack server and used a synchronous Couchbase repository, leaving the RxJava part out. I intend to fix that today, and also tell you more about Ratpack. I am not going [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/ratpack-couchbase-rxjava\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2016-04-29T21:43:46+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=\"Laurent Doguin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@ldoguin\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"unstructured.io\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/ratpack-couchbase-rxjava\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/ratpack-couchbase-rxjava\/\"},\"author\":{\"name\":\"Laurent Doguin\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/c0aa9b8f1ed51b7a9e2f7cb755994a5e\"},\"headline\":\"Ratpack, Couchbase and RxJava\",\"datePublished\":\"2016-04-29T21:43:46+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/ratpack-couchbase-rxjava\/\"},\"wordCount\":652,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/ratpack-couchbase-rxjava\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"keywords\":[\"ratpack\"],\"articleSection\":[\"Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/ratpack-couchbase-rxjava\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/ratpack-couchbase-rxjava\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/ratpack-couchbase-rxjava\/\",\"name\":\"Ratpack, Couchbase and RxJava - The Couchbase Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/ratpack-couchbase-rxjava\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/ratpack-couchbase-rxjava\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"datePublished\":\"2016-04-29T21:43:46+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/ratpack-couchbase-rxjava\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/ratpack-couchbase-rxjava\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/ratpack-couchbase-rxjava\/#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\/ratpack-couchbase-rxjava\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.couchbase.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Ratpack, Couchbase and RxJava\"}]},{\"@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\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\",\"name\":\"The Couchbase Blog\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@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\/c0aa9b8f1ed51b7a9e2f7cb755994a5e\",\"name\":\"Laurent Doguin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/12929ce99397769f362b7a90d6b85071\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/b8c466908092b46634af916b6921f30187a051e4367ded7ac9b1a3f2c5692fd2?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/b8c466908092b46634af916b6921f30187a051e4367ded7ac9b1a3f2c5692fd2?s=96&d=mm&r=g\",\"caption\":\"Laurent Doguin\"},\"description\":\"Laurent is a nerdy metal head who lives in Paris. He mostly writes code in Java and structured text in AsciiDoc, and often talks about data, reactive programming and other buzzwordy stuff. He is also a former Developer Advocate for Clever Cloud and Nuxeo where he devoted his time and expertise to helping those communities grow bigger and stronger. He now runs Developer Relations at Couchbase.\",\"sameAs\":[\"https:\/\/x.com\/ldoguin\"],\"honorificPrefix\":\"Mr\",\"birthDate\":\"1985-06-07\",\"gender\":\"male\",\"award\":[\"Devoxx Champion\",\"Couchbase Legend\"],\"knowsAbout\":[\"Java\"],\"knowsLanguage\":[\"English\",\"French\"],\"jobTitle\":\"Director Developer Relation & Strategy\",\"worksFor\":\"Couchbase\",\"url\":\"https:\/\/www.couchbase.com\/blog\/author\/laurent-doguin\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Ratpack, Couchbase and RxJava - The Couchbase Blog","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\/ratpack-couchbase-rxjava\/","og_locale":"en_US","og_type":"article","og_title":"Ratpack, Couchbase and RxJava","og_description":"Yesterday I left you with rough code that started a Ratpack server and used a synchronous Couchbase repository, leaving the RxJava part out. I intend to fix that today, and also tell you more about Ratpack. I am not going [&hellip;]","og_url":"https:\/\/www.couchbase.com\/blog\/ratpack-couchbase-rxjava\/","og_site_name":"The Couchbase Blog","article_published_time":"2016-04-29T21:43:46+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":"Laurent Doguin","twitter_card":"summary_large_image","twitter_creator":"@ldoguin","twitter_misc":{"Written by":"unstructured.io","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/ratpack-couchbase-rxjava\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/ratpack-couchbase-rxjava\/"},"author":{"name":"Laurent Doguin","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/c0aa9b8f1ed51b7a9e2f7cb755994a5e"},"headline":"Ratpack, Couchbase and RxJava","datePublished":"2016-04-29T21:43:46+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/ratpack-couchbase-rxjava\/"},"wordCount":652,"commentCount":0,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/ratpack-couchbase-rxjava\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","keywords":["ratpack"],"articleSection":["Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/ratpack-couchbase-rxjava\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/ratpack-couchbase-rxjava\/","url":"https:\/\/www.couchbase.com\/blog\/ratpack-couchbase-rxjava\/","name":"Ratpack, Couchbase and RxJava - The Couchbase Blog","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/ratpack-couchbase-rxjava\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/ratpack-couchbase-rxjava\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","datePublished":"2016-04-29T21:43:46+00:00","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/ratpack-couchbase-rxjava\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/ratpack-couchbase-rxjava\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/ratpack-couchbase-rxjava\/#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\/ratpack-couchbase-rxjava\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Ratpack, Couchbase and RxJava"}]},{"@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":"en-US"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/blog\/#organization","name":"The Couchbase Blog","url":"https:\/\/www.couchbase.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@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\/c0aa9b8f1ed51b7a9e2f7cb755994a5e","name":"Laurent Doguin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/12929ce99397769f362b7a90d6b85071","url":"https:\/\/secure.gravatar.com\/avatar\/b8c466908092b46634af916b6921f30187a051e4367ded7ac9b1a3f2c5692fd2?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b8c466908092b46634af916b6921f30187a051e4367ded7ac9b1a3f2c5692fd2?s=96&d=mm&r=g","caption":"Laurent Doguin"},"description":"Laurent is a nerdy metal head who lives in Paris. He mostly writes code in Java and structured text in AsciiDoc, and often talks about data, reactive programming and other buzzwordy stuff. He is also a former Developer Advocate for Clever Cloud and Nuxeo where he devoted his time and expertise to helping those communities grow bigger and stronger. He now runs Developer Relations at Couchbase.","sameAs":["https:\/\/x.com\/ldoguin"],"honorificPrefix":"Mr","birthDate":"1985-06-07","gender":"male","award":["Devoxx Champion","Couchbase Legend"],"knowsAbout":["Java"],"knowsLanguage":["English","French"],"jobTitle":"Director Developer Relation & Strategy","worksFor":"Couchbase","url":"https:\/\/www.couchbase.com\/blog\/author\/laurent-doguin\/"}]}},"authors":[{"term_id":9023,"user_id":49,"is_guest":0,"slug":"laurent-doguin","display_name":"Laurent Doguin","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/b8c466908092b46634af916b6921f30187a051e4367ded7ac9b1a3f2c5692fd2?s=96&d=mm&r=g","author_category":"","last_name":"Doguin","first_name":"Laurent","job_title":"","user_url":"","description":"Laurent is a nerdy metal head who lives in Paris. He mostly writes code in Java and structured text in AsciiDoc, and often talks about data, reactive programming and other buzzwordy stuff. He is also a former Developer Advocate for Clever Cloud and Nuxeo where he devoted his time and expertise to helping those communities grow bigger and stronger. He now runs Developer Relations at Couchbase."}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/2239","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/users\/49"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/comments?post=2239"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/2239\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media\/13873"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media?parent=2239"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/categories?post=2239"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/tags?post=2239"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=2239"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}