{"id":2314,"date":"2017-01-04T17:39:32","date_gmt":"2017-01-04T17:39:31","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=2314"},"modified":"2023-08-10T23:41:25","modified_gmt":"2023-08-11T06:41:25","slug":"microservices-wildfly-swarm-docker-couchbase","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/microservices-wildfly-swarm-docker-couchbase\/","title":{"rendered":"Microservices using WildFly Swarm, Docker and Couchbase"},"content":{"rendered":"<p>Containers, Microsoervices, and NoSQL provide an awesome threesome for building your modern applications. These applications\u00a0need to be agile, meet\u00a0constantly evolving customer demands, be pervasive, and should work across mobile, web and IoT platforms.<\/p>\n<p>This blog will\u00a0explain a simple microservices stack using <a href=\"https:\/\/wildfly-swarm.io\/\">WildFly Swarm<\/a>, <a href=\"https:\/\/docs.docker.com\">Docker<\/a>, and <a href=\"https:\/\/developer.couchbase.com\/server\">Couchbase<\/a>. Complete code and instructions in this blog are documented at:\u00a0<a href=\"https:\/\/github.com\/arun-gupta\/wildfly-swarm-couchbase\">github.com\/arun-gupta\/wildfly-swarm-couchbase<\/a>.<\/p>\n<p>Let&#8217;s\u00a0understand the key components of this stack first!<\/p>\n<p><a href=\"https:\/\/wildfly-swarm.io\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-14041 alignleft\" src=\"\/wp-content\/original-assets\/june-2016\/microservices-using-wildfly-swarm-docker-and-couchbase\/wildfly-swarm-logo.png\" alt=\"wildfly-swarm-logo\" width=\"269\" height=\"74\" \/><\/a><a href=\"https:\/\/wildfly-swarm.io\/\">WildFly Swarm<\/a> allows\u00a0to package and run JavaEE applications by packaging them with just enough of the server runtime to <code>java -jar<\/code> your application. With built-in service discovery, <a href=\"https:\/\/keycloak.jboss.org\/\">single sign-on using Keycloak<\/a>, <a href=\"https:\/\/www.hawkular.org\/\">monitoring using Hawkular<\/a>, and many more features, WildFly Swarm provides all the necessary components to\u00a0develop your\u00a0microservice.<\/p>\n<p><a href=\"https:\/\/docs.docker.com\/docker-for-mac\/\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-14042 alignleft\" src=\"\/wp-content\/original-assets\/june-2016\/microservices-using-wildfly-swarm-docker-and-couchbase\/docker-for-mac-1024x457.png\" alt=\"docker-for-mac\" width=\"376\" height=\"168\" \/><\/a><\/p>\n<p><a href=\"https:\/\/docs.docker.com\/docker-for-mac\/\">Docker for Mac<\/a> provides native support for running Docker containers on Mac OSX. It relies upon <code>Hypervisor.framework<\/code>\u00a0in OSX.\u00a0Docker engine runs in an Alpine Linux distribution on top of an <code>xhyve<\/code> Virtual Machine, and even the VM is managed by Docker.\u00a0There is no need for\u00a0Docker Machine or VirtualBox, and it integrates with OSX security sandbox model.\u00a0DockerCon 2016\u00a0removed the private beta restriction from\u00a0Docker for Mac, and so its available for everybody now. <img loading=\"lazy\" decoding=\"async\" class=\"wp-image-13243 alignleft\" src=\"\/wp-content\/original-assets\/june-2016\/microservices-using-wildfly-swarm-docker-and-couchbase\/couchbase-logo-1-e1450329453533.png\" alt=\"Couchbase Logo\" width=\"298\" height=\"78\" \/><\/p>\n<p><a href=\"https:\/\/www.couchbase.com\/get-started-developing-nosql\/\">NoSQL<\/a> provides the\u00a0agility and flexibility of\u00a0schema-less databases. This allows the application to evolve independently and rapidly\u00a0without going through cumbersome\u00a0database migrations. Couchbase offers true horizontal scaling with <a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/current\/architecture\/architecture-intro.html\">homogenous architecture<\/a>, as opposed to\u00a0non-scalable master\/slave architecture. It also offers auto-sharding, <a href=\"https:\/\/www.couchbase.com\/products\/n1ql\/\">SQL-like query language for JSON<\/a> (N1QL), <a href=\"https:\/\/www.couchbase.com\/developers\/mobile\/\">mobile database<\/a>\u00a0and synchronization with the backend server, and much more. The complete sample application in this blog is at:\u00a0<a href=\"https:\/\/github.com\/arun-gupta\/wildfly-swarm-couchbase\">github.com\/arun-gupta\/wildfly-swarm-couchbase<\/a>.<\/p>\n<h2>WildFly Swarm Application<\/h2>\n<p>Let&#8217;s look at the Java\u00a0EE\u00a0REST endpoint:<\/p>\n<pre class=\"lang:default decode:true\">package com.couchbase.wildfly.swarm;\r\n\r\n. . .\r\n\r\n@Path(\"airline\")\r\npublic class AirlineResource {\r\n\r\n    @Inject Database database;\r\n        \r\n    @GET\r\n    public String getAll() {\r\n        N1qlQuery query = N1qlQuery.simple(\"SELECT * FROM `travel-sample` LIMIT 10\");\r\n        N1qlQueryResult result = database.getBucket().query(query);\r\n        return result.allRows().toString();\r\n    }\r\n    \r\n. . .\r\n}<\/pre>\n<p>It uses standard JAX-RS annotation to convert a POJO into a REST endpoint.\u00a0<a href=\"https:\/\/docs.couchbase.com\/sdk-api\/couchbase-java-client-2.3.1\/\">Couchbase Java API<\/a>\u00a0provide a fluent API and used N1QL statement to query the\u00a0documents and return the results. The N1QL statement returns the first 10 elements from\u00a0the query result. Learn more about N1QL syntax in this <a href=\"https:\/\/query.pub.couchbase.com\/tutorial\/#1\">interactive tutorial<\/a>. Database\u00a0abstraction is defined as:<\/p>\n<pre class=\"lang:default decode:true\">package com.couchbase.wildfly.swarm;\r\n\r\n. . .\r\n\r\n@Singleton\r\n@Startup\r\npublic class Database {\r\n    \r\n    CouchbaseCluster cluster;\r\n    Bucket bucket;\r\n        \r\n    public CouchbaseCluster getCluster() {\r\n        if (null == cluster) {\r\n            String couchbaseURI = System.getenv(\"COUCHBASE_URI\");\r\n            if (null == couchbaseURI) {\r\n                System.err.println(\"WARING: No COUCHBASE_URI specified, defaulting to localhost\");\r\n                couchbaseURI = \"localhost:8093\";\r\n            }\r\n            System.out.println(\"Couchbase endpoint: \" + System.getenv(\"COUCHBASE_URI\"));\r\n            cluster = CouchbaseCluster.create(couchbaseURI);\r\n        }\r\n        return cluster;\r\n    }\r\n    \r\n    public Bucket getBucket() {\r\n        if (null == bucket) {\r\n            bucket = getCluster().openBucket(\"travel-sample\");\r\n        }\r\n        return bucket;\r\n    }\r\n}<\/pre>\n<p>This is a singleton EJB that is eagerly initialized. It uses <a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/current\/sdk\/java\/start-using-sdk.html\">Couchbase Java SDK<\/a> to connect to Couchbase.\u00a0Database endpoint can be specified using the\u00a0<code>COUCHBASE_URI<\/code> environment variable. Next up is\u00a0<code>pom.xml<\/code>\u00a0for configuring\u00a0the\u00a0WildFly Swarm and <a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/current\/sdk\/java\/start-using-sdk.html\">Couchbase Java Client<\/a>:<\/p>\n<pre class=\"lang:default decode:true\">        \r\n            \r\n                org.wildfly.swarm\r\n                bom\r\n                ${version.wildfly-swarm}\r\n                pom\r\n                import\r\n            \r\n        \r\n    \r\n    \r\n        \r\n            javax\r\n            javaee-web-api\r\n            7.0\r\n            provided\r\n        \r\n        \r\n            org.wildfly.swarm\r\n            jaxrs-cdi\r\n        \r\n        \r\n            org.wildfly.swarm\r\n            ejb\r\n        \r\n        \r\n            com.couchbase.client\r\n            java-client\r\n            2.2.5\r\n        \r\n<\/pre>\n<p>It uses WildFly Swarm &#8220;bill of materials&#8221; to pull in all the dependencies. Only the specific\u00a0dependencies needed for the build are specified in <code><\/code>. These are then packaged in the &#8220;fat jar&#8221;. WildFly Swarm Maven plugin is used to package and run the application:<\/p>\n<pre class=\"lang:default decode:true\">                org.wildfly.swarm\r\n                wildfly-swarm-plugin\r\n                ${version.wildfly-swarm}\r\n                \r\n                    \r\n                        \r\n                            package\r\n                        \r\n                    \r\n                \r\n                \r\n                    \r\n                        ${COUCHBASE_URI}\r\n                    \r\n                \r\n<\/pre>\n<p><code>COUCHBASE_URI<\/code> is used to read the\u00a0host of where Couchbase database server is running.<\/p>\n<h2>Run Couchbase Server<\/h2>\n<p>Run the Couchbase server using Docker for Mac:<\/p>\n<pre class=\"lang:default decode:true\">docker run -d --name db -p 8091-8093:8091-8093 -p 11210:11210 arungupta\/couchbase<\/pre>\n<p>The <code>arungupta\/couchbase<\/code>\u00a0is built upon the <a href=\"https:\/\/hub.docker.com\/_\/couchbase\/\">standard Couchbase image<\/a>\u00a0and uses <a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/current\/rest-api\/rest-intro.html\">Couchbase REST API<\/a> to configure the server. Wait for a couple of minutes for the sample bucket to be populated with the JSON documents. Invoke the <a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/current\/tools\/cbq-shell.html\">Couchbase CLI tool cbq<\/a>\u00a0create a primary index on the sample bucket:<\/p>\n<pre class=\"lang:default decode:true\">docker run -it --link db:db arungupta\/couchbase cbq -u Administrator -p password -engine https:\/\/db:8093 -s \"create primary index `travel-sample-primary-index` on `travel-sample`;\"<\/pre>\n<p>This will show the output as:<\/p>\n<pre class=\"lang:default decode:true\"> Connected to : https:\/\/db:8093\/. Type Ctrl-D or QUIT to exit.\r\n\r\n Path to history file for the shell : \/root\/.cbq_history \r\n{\r\n    \"requestID\": \"d0b2e4dd-b702-49e2-971c-a4c640ddb498\",\r\n    \"signature\": null,\r\n    \"results\": [\r\n    ],\r\n    \"status\": \"success\",\r\n    \"metrics\": {\r\n        \"elapsedTime\": \"3.154540272s\",\r\n        \"executionTime\": \"3.154493281s\",\r\n        \"resultCount\": 0,\r\n        \"resultSize\": 0\r\n    }\r\n}<\/pre>\n<p>This output shows that result of creating index was successful. One of the advantages of running Docker for Mac is that all the containers are accessible at <code>localhost<\/code>. This means <a href=\"https:\/\/docs.couchbase.com\/server\/6.0\/manage\/management-tools.html\">Couchbase\u00a0Web Console<\/a> can be accessed at\u00a0<a href=\"https:\/\/localhost:8091\">localhost:8091<\/a>. <a href=\"\/wp-content\/original-assets\/june-2016\/microservices-using-wildfly-swarm-docker-and-couchbase\/couchbase-web-console-docker-mac-wildfly-swarm-microsoervice-1024x593.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-14045\" src=\"\/wp-content\/original-assets\/june-2016\/microservices-using-wildfly-swarm-docker-and-couchbase\/couchbase-web-console-docker-mac-wildfly-swarm-microsoervice-1024x593.png\" alt=\"couchbase-web-console-docker-mac-wildfly-swarm-microsoervice\" width=\"604\" height=\"350\" \/><\/a><\/p>\n<p>This screen ensures that\u00a0Couchbase is configured \u00a0correctly.<\/p>\n<h2>Run WildFly Swarm Microservice<\/h2>\n<p>Package and run the\u00a0self-contained microservice as:<\/p>\n<pre class=\"lang:default decode:true\">mvn wildfly-swarm:run<\/pre>\n<p>If Couchbase is running on a different host, then the command will change to:<\/p>\n<pre class=\"lang:default decode:true\">mvn -DCOUCHBASE_URI= wildfly-swarm:run<\/pre>\n<p>It shows the output as:<\/p>\n<pre class=\"lang:default decode:true\">[INFO] Scanning for projects...\r\n[INFO]                                                                         \r\n[INFO] ------------------------------------------------------------------------\r\n[INFO] Building nosql-microservices 1.0-SNAPSHOT\r\n[INFO] ------------------------------------------------------------------------\r\n[INFO] \r\n\r\n. . . \r\n\r\n2016-06-27 22:21:47,170 WARN  [org.jboss.as.dependency.private] (MSC service thread 1-6) WFLYSRV0018: Deployment \"deployment.nosql-microservices.war\" is using a private module (\"org.jboss.jts:main\") which may be changed or removed in future versions without notice.\r\n2016-06-27 22:21:47,203 INFO  [org.jboss.weld.deployer] (MSC service thread 1-1) WFLYWELD0003: Processing weld deployment nosql-microservices.war\r\n2016-06-27 22:21:47,542 INFO  [org.hibernate.validator.internal.util.Version] (MSC service thread 1-1) HV000001: Hibernate Validator 5.2.3.Final\r\n2016-06-27 22:21:47,600 INFO  [org.jboss.as.ejb3.deployment] (MSC service thread 1-1) WFLYEJB0473: JNDI bindings for session bean named 'Database' in deployment unit 'deployment \"nosql-microservices.war\"' are as follows:\r\n\r\n java:global\/nosql-microservices\/Database!com.couchbase.wildfly.swarm.Database\r\n java:app\/nosql-microservices\/Database!com.couchbase.wildfly.swarm.Database\r\n java:module\/Database!com.couchbase.wildfly.swarm.Database\r\n java:global\/nosql-microservices\/Database\r\n java:app\/nosql-microservices\/Database\r\n java:module\/Database\r\n\r\n2016-06-27 22:21:47,731 INFO  [org.jboss.weld.deployer] (MSC service thread 1-3) WFLYWELD0006: Starting Services for CDI deployment: nosql-microservices.war\r\n2016-06-27 22:21:47,758 INFO  [org.jboss.weld.Version] (MSC service thread 1-3) WELD-000900: 2.3.2 (Final)\r\n2016-06-27 22:21:47,780 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-1) WFLYUT0018: Host default-host starting\r\n2016-06-27 22:21:47,788 INFO  [org.jboss.weld.deployer] (MSC service thread 1-8) WFLYWELD0009: Starting weld service for deployment nosql-microservices.war\r\n2016-06-27 22:21:48,180 INFO  [stdout] (ServerService Thread Pool -- 10) Couchbase endpoint: \r\n2016-06-27 22:21:48,275 INFO  [com.couchbase.client.core.CouchbaseCore] (ServerService Thread Pool -- 10) CouchbaseEnvironment: {sslEnabled=false, sslKeystoreFile='null', sslKeystorePassword='null', queryEnabled=false, queryPort=8093, bootstrapHttpEnabled=true, bootstrapCarrierEnabled=true, bootstrapHttpDirectPort=8091, bootstrapHttpSslPort=18091, bootstrapCarrierDirectPort=11210, bootstrapCarrierSslPort=11207, ioPoolSize=8, computationPoolSize=8, responseBufferSize=16384, requestBufferSize=16384, kvServiceEndpoints=1, viewServiceEndpoints=1, queryServiceEndpoints=1, searchServiceEndpoints=1, ioPool=NioEventLoopGroup, coreScheduler=CoreScheduler, eventBus=DefaultEventBus, packageNameAndVersion=couchbase-jvm-core\/1.2.5 (git: 1.2.5), dcpEnabled=false, retryStrategy=BestEffort, maxRequestLifetime=75000, retryDelay=ExponentialDelay{growBy 1.0 MICROSECONDS, powers of 2; lower=100, upper=100000}, reconnectDelay=ExponentialDelay{growBy 1.0 MILLISECONDS, powers of 2; lower=32, upper=4096}, observeIntervalDelay=ExponentialDelay{growBy 1.0 MICROSECONDS, powers of 2; lower=10, upper=100000}, keepAliveInterval=30000, autoreleaseAfter=2000, bufferPoolingEnabled=true, tcpNodelayEnabled=true, mutationTokensEnabled=false, socketConnectTimeout=1000, dcpConnectionBufferSize=20971520, dcpConnectionBufferAckThreshold=0.2, queryTimeout=75000, viewTimeout=75000, kvTimeout=2500, connectTimeout=5000, disconnectTimeout=25000, dnsSrvEnabled=false}\r\n2016-06-27 22:21:48,829 INFO  [com.couchbase.client.core.node.Node] (cb-io-1-1) Connected to Node localhost\r\n2016-06-27 22:21:49,035 INFO  [com.couchbase.client.core.config.ConfigurationProvider] (cb-computations-1) Opened bucket travel-sample\r\n2016-06-27 22:21:49,415 INFO  [org.jboss.resteasy.resteasy_jaxrs.i18n] (ServerService Thread Pool -- 10) RESTEASY002225: Deploying javax.ws.rs.core.Application: class com.couchbase.wildfly.swarm.MyApplication\r\n2016-06-27 22:21:49,438 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 10) WFLYUT0021: Registered web context: \/\r\n2016-06-27 22:21:49,457 INFO  [org.jboss.as.server] (main) WFLYSRV0010: Deployed \"nosql-microservices.war\" (runtime-name : \"nosql-microservices.war\")<\/pre>\n<p>Now the application can be accessed as:<\/p>\n<pre class=\"lang:default decode:true\">curl https:\/\/localhost:8080\/webresources\/airline<\/pre>\n<p>And\u00a0a formatted output looks like:<\/p>\n<pre class=\"lang:default decode:true\">[\r\n  {\r\n    \"travel-sample\": {\r\n      \"country\": \"United States\",\r\n      \"iata\": \"Q5\",\r\n      \"callsign\": \"MILE-AIR\",\r\n      \"name\": \"40-Mile Air\",\r\n      \"icao\": \"MLA\",\r\n      \"id\": 10,\r\n      \"type\": \"airline\"\r\n    }\r\n  },\r\n\r\n  . . .\r\n\r\n  {\r\n    \"travel-sample\": {\r\n      \"country\": \"France\",\r\n      \"iata\": \"A5\",\r\n      \"callsign\": \"AIRLINAIR\",\r\n      \"name\": \"Airlinair\",\r\n      \"icao\": \"RLA\",\r\n      \"id\": 1203,\r\n      \"type\": \"airline\"\r\n    }\r\n  }\r\n]<\/pre>\n<p>So you built a simple microservice using WildFly Swarm accessing a Couchbase database running as a Docker container. Now, ideally this WildFly Swarm\u00a0service should be packaged as a Docker image and then that Docker image would serve as the service.\u00a0A\u00a0Maven profile with the name <code>docker<\/code> is already added to <code>pom.xml<\/code> but <a href=\"https:\/\/github.com\/arun-gupta\/wildfly-swarm-couchbase\/issues\/3\">issue #3<\/a> is\u00a0making that scenario fail.<\/p>\n<h2>Microservices References<\/h2>\n<ul>\n<li><a href=\"https:\/\/docs.docker.com\">docs.docker.com<\/a><\/li>\n<li><a href=\"https:\/\/wildfly-swarm.io\">WildFly Swarm<\/a><\/li>\n<li><a href=\"https:\/\/www.couchbase.com\/get-started-developing-nosql\/\">Getting Started with NoSQL<\/a><\/li>\n<li>GitHub Repo:\u00a0<a href=\"https:\/\/github.com\/arun-gupta\/wildfly-swarm-couchbase\">github.com\/arun-gupta\/wildfly-swarm-couchbase<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Containers, Microsoervices, and NoSQL provide an awesome threesome for building your modern applications. These applications\u00a0need to be agile, meet\u00a0constantly evolving customer demands, be pervasive, and should work across mobile, web and IoT platforms. This blog will\u00a0explain a simple microservices stack [&hellip;]<\/p>\n","protected":false},"author":58,"featured_media":13873,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1816],"tags":[],"ppma_author":[8933],"class_list":["post-2314","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-couchbase-server"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.8 (Yoast SEO v25.8) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Microservices using WildFly Swarm, Docker and Couchbase - 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\/microservices-wildfly-swarm-docker-couchbase\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Microservices using WildFly Swarm, Docker and Couchbase\" \/>\n<meta property=\"og:description\" content=\"Containers, Microsoervices, and NoSQL provide an awesome threesome for building your modern applications. These applications\u00a0need to be agile, meet\u00a0constantly evolving customer demands, be pervasive, and should work across mobile, web and IoT platforms. This blog will\u00a0explain a simple microservices stack [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/microservices-wildfly-swarm-docker-couchbase\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2017-01-04T17:39:31+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-08-11T06:41:25+00:00\" \/>\n<meta name=\"author\" content=\"Arun Gupta, VP, Developer Advocacy, Couchbase\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@arungupta\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Arun Gupta, VP, Developer Advocacy, Couchbase\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/microservices-wildfly-swarm-docker-couchbase\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/microservices-wildfly-swarm-docker-couchbase\/\"},\"author\":{\"name\":\"Arun Gupta, VP, Developer Advocacy, Couchbase\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/39d8caed0f536489b6aa6e8d31ee631f\"},\"headline\":\"Microservices using WildFly Swarm, Docker and Couchbase\",\"datePublished\":\"2017-01-04T17:39:31+00:00\",\"dateModified\":\"2023-08-11T06:41:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/microservices-wildfly-swarm-docker-couchbase\/\"},\"wordCount\":672,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/microservices-wildfly-swarm-docker-couchbase\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"articleSection\":[\"Couchbase Server\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/microservices-wildfly-swarm-docker-couchbase\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/microservices-wildfly-swarm-docker-couchbase\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/microservices-wildfly-swarm-docker-couchbase\/\",\"name\":\"Microservices using WildFly Swarm, Docker and Couchbase - The Couchbase Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/microservices-wildfly-swarm-docker-couchbase\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/microservices-wildfly-swarm-docker-couchbase\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"datePublished\":\"2017-01-04T17:39:31+00:00\",\"dateModified\":\"2023-08-11T06:41:25+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/microservices-wildfly-swarm-docker-couchbase\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/microservices-wildfly-swarm-docker-couchbase\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/microservices-wildfly-swarm-docker-couchbase\/#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\/microservices-wildfly-swarm-docker-couchbase\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.couchbase.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Microservices using WildFly Swarm, Docker and Couchbase\"}]},{\"@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\/39d8caed0f536489b6aa6e8d31ee631f\",\"name\":\"Arun Gupta, VP, Developer Advocacy, Couchbase\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/8900a75409c646948fe0bd80f6240337\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f912e10b5f39748ee4f1a0b0da6f42747f0b3a94fe7acb511791468656f5e726?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f912e10b5f39748ee4f1a0b0da6f42747f0b3a94fe7acb511791468656f5e726?s=96&d=mm&r=g\",\"caption\":\"Arun Gupta, VP, Developer Advocacy, Couchbase\"},\"description\":\"Arun Gupta is the vice president of developer advocacy at Couchbase. He has built and led developer communities for 10+ years at Sun, Oracle, and Red Hat. He has deep expertise in leading cross-functional teams to develop and execute strategy, planning and execution of content, marketing campaigns, and programs. Prior to that he led engineering teams at Sun and is a founding member of the Java EE team. Gupta has authored more than 2,000 blog posts on technology. He has extensive speaking experience in more than 40 countries on myriad topics and is a JavaOne Rock Star for three years in a row. Gupta also founded the Devoxx4Kids chapter in the US and continues to promote technology education among children. An author of several books on technology, an avid runner, a globe trotter, a Java Champion, a JUG leader, NetBeans Dream Team member, and a Docker Captain, he is easily accessible at @arungupta.\",\"sameAs\":[\"https:\/\/x.com\/arungupta\"],\"url\":\"https:\/\/www.couchbase.com\/blog\/author\/arun-gupta\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Microservices using WildFly Swarm, Docker and Couchbase - 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\/microservices-wildfly-swarm-docker-couchbase\/","og_locale":"en_US","og_type":"article","og_title":"Microservices using WildFly Swarm, Docker and Couchbase","og_description":"Containers, Microsoervices, and NoSQL provide an awesome threesome for building your modern applications. These applications\u00a0need to be agile, meet\u00a0constantly evolving customer demands, be pervasive, and should work across mobile, web and IoT platforms. This blog will\u00a0explain a simple microservices stack [&hellip;]","og_url":"https:\/\/www.couchbase.com\/blog\/microservices-wildfly-swarm-docker-couchbase\/","og_site_name":"The Couchbase Blog","article_published_time":"2017-01-04T17:39:31+00:00","article_modified_time":"2023-08-11T06:41:25+00:00","author":"Arun Gupta, VP, Developer Advocacy, Couchbase","twitter_card":"summary_large_image","twitter_creator":"@arungupta","twitter_misc":{"Written by":"Arun Gupta, VP, Developer Advocacy, Couchbase","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/microservices-wildfly-swarm-docker-couchbase\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/microservices-wildfly-swarm-docker-couchbase\/"},"author":{"name":"Arun Gupta, VP, Developer Advocacy, Couchbase","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/39d8caed0f536489b6aa6e8d31ee631f"},"headline":"Microservices using WildFly Swarm, Docker and Couchbase","datePublished":"2017-01-04T17:39:31+00:00","dateModified":"2023-08-11T06:41:25+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/microservices-wildfly-swarm-docker-couchbase\/"},"wordCount":672,"commentCount":0,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/microservices-wildfly-swarm-docker-couchbase\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","articleSection":["Couchbase Server"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/microservices-wildfly-swarm-docker-couchbase\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/microservices-wildfly-swarm-docker-couchbase\/","url":"https:\/\/www.couchbase.com\/blog\/microservices-wildfly-swarm-docker-couchbase\/","name":"Microservices using WildFly Swarm, Docker and Couchbase - The Couchbase Blog","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/microservices-wildfly-swarm-docker-couchbase\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/microservices-wildfly-swarm-docker-couchbase\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","datePublished":"2017-01-04T17:39:31+00:00","dateModified":"2023-08-11T06:41:25+00:00","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/microservices-wildfly-swarm-docker-couchbase\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/microservices-wildfly-swarm-docker-couchbase\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/microservices-wildfly-swarm-docker-couchbase\/#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\/microservices-wildfly-swarm-docker-couchbase\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Microservices using WildFly Swarm, Docker and Couchbase"}]},{"@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\/39d8caed0f536489b6aa6e8d31ee631f","name":"Arun Gupta, VP, Developer Advocacy, Couchbase","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/8900a75409c646948fe0bd80f6240337","url":"https:\/\/secure.gravatar.com\/avatar\/f912e10b5f39748ee4f1a0b0da6f42747f0b3a94fe7acb511791468656f5e726?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f912e10b5f39748ee4f1a0b0da6f42747f0b3a94fe7acb511791468656f5e726?s=96&d=mm&r=g","caption":"Arun Gupta, VP, Developer Advocacy, Couchbase"},"description":"Arun Gupta is the vice president of developer advocacy at Couchbase. He has built and led developer communities for 10+ years at Sun, Oracle, and Red Hat. He has deep expertise in leading cross-functional teams to develop and execute strategy, planning and execution of content, marketing campaigns, and programs. Prior to that he led engineering teams at Sun and is a founding member of the Java EE team. Gupta has authored more than 2,000 blog posts on technology. He has extensive speaking experience in more than 40 countries on myriad topics and is a JavaOne Rock Star for three years in a row. Gupta also founded the Devoxx4Kids chapter in the US and continues to promote technology education among children. An author of several books on technology, an avid runner, a globe trotter, a Java Champion, a JUG leader, NetBeans Dream Team member, and a Docker Captain, he is easily accessible at @arungupta.","sameAs":["https:\/\/x.com\/arungupta"],"url":"https:\/\/www.couchbase.com\/blog\/author\/arun-gupta\/"}]}},"authors":[{"term_id":8933,"user_id":58,"is_guest":0,"slug":"arun-gupta","display_name":"Arun Gupta, VP, Developer Advocacy, Couchbase","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/f912e10b5f39748ee4f1a0b0da6f42747f0b3a94fe7acb511791468656f5e726?s=96&d=mm&r=g","author_category":"","last_name":"Gupta","first_name":"Arun","job_title":"","user_url":"","description":"Arun Gupta is the vice president of developer advocacy at Couchbase. He has built and led developer communities for 10+ years at Sun, Oracle, and Red Hat. He has deep expertise in leading cross-functional teams to develop and execute strategy, planning and execution of content, marketing campaigns, and programs. Prior to that he led engineering teams at Sun and is a founding member of the Java EE team.\r\n\r\nGupta has authored more than 2,000 blog posts on technology. He has extensive speaking experience in more than 40 countries on myriad topics and is a JavaOne Rock Star for three years in a row. Gupta also founded the Devoxx4Kids chapter in the US and continues to promote technology education among children. An author of several books on technology, an avid runner, a globe trotter, a Java Champion, a JUG leader, NetBeans Dream Team member, and a Docker Captain, he is easily accessible at @arungupta."}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/2314","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\/58"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/comments?post=2314"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/2314\/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=2314"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/categories?post=2314"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/tags?post=2314"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=2314"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}