{"id":11605,"date":"2014-04-15T14:27:46","date_gmt":"2014-04-15T12:27:46","guid":{"rendered":"https:\/\/blog.trifork.com\/?p=11605"},"modified":"2014-04-15T14:27:46","modified_gmt":"2014-04-15T12:27:46","slug":"elasticsearch-spring-mvc-sencha-touch-2-in-the-cloud-part-1","status":"publish","type":"post","link":"https:\/\/trifork.nl\/blog\/elasticsearch-spring-mvc-sencha-touch-2-in-the-cloud-part-1\/","title":{"rendered":"Elasticsearch &#038; Spring MVC &#038; Sencha Touch 2 in the Cloud &#8211; Part 1"},"content":{"rendered":"<h2><a href=\"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/2013\/04\/elasticsearch-logo.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft  wp-image-7918\" style=\"margin: 1px\" alt=\"elasticsearch-logo\" src=\"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/2013\/04\/elasticsearch-logo.png\" width=\"150\" height=\"50\" \/><\/a><\/h2>\n<h2><\/h2>\n<p>&nbsp;<\/p>\n<h2><\/h2>\n<h2>Introduction<\/h2>\n<p>Welcome to my third blog entry. In this one, I want to show how to connect three different technologies (database, REST service, and a mobile framework) and deploy them into the cloud. Those three technologies are:<\/p>\n<ul>\n<li>Elasticsearch (Database)<\/li>\n<li>Spring MVC (REST service)<\/li>\n<li>Sencha Touch 2 (Client side framework)<\/li>\n<\/ul>\n<p>First, I want to give a short introduction of the three technologies. I am going to start with Elasticsearch, followed by Spring MVC and in the end Sencha Touch 2. In the second part, I will explain the services that I used. The first service is called searchly and is a database service. The second service is cloudbees and is used as cloud host. In the end a conclusion is given. Part 2 of this blog will cover a demo with the steps to connect everything with each other. I wish you fun reading this entry and if there are any questions don&#8217;t hesitate to drop a comment (Of course you can drop also a comment if you just like it).<\/p>\n<p><!--more--><\/p>\n<h2>Technologies<\/h2>\n<h3>Elasticsearch<\/h3>\n<p>Elasticsearch was used as database. It is using a NoSQL approach and it is one of the fastest database at the moment. The data gets stored in a so called document. This document contains key-value pairs and if you are familiar with JSON you should be able to understand and to read it. For more information about Elasticsearch go to their <a href=\"http:\/\/www.elasticsearch.org\/overview\/elasticsearch\/\">website<\/a>.<\/p>\n<h3>Spring MVC<\/h3>\n<p>Spring MVC was used to establish the connection between the database and the client side framework. Spring MVC uses a RESTful web service to receive calls of a client. To connect my Spring MVC application with the database service, I had to include an Elasticsearch java client with the name \u201cJEST\u201d. JEST is a Java HTTP Rest client for elasticsearch and is open source. The source code of the client is in <a href=\"https:\/\/github.com\/searchbox-io\/Jest\">github<\/a> available. Additionally I had to modify the Spring MVC application to work with JSONP. The modification was not difficult because I found a <a href=\"https:\/\/github.com\/bhagyas\/spring-jsonp-support\">github<\/a> project which had the needed implementation to support JSONP.<\/p>\n<h3>Sencha Touch 2<\/h3>\n<p>On the client side, I used <a href=\"http:\/\/www.sencha.com\/products\/touch\/\">Sencha Touch 2<\/a>. Sencha Touch 2 is a framework to create mobile web-based applications. It is open source and provides a lot of features such as native packaging, etc. As default data transfer type Sencha Touch 2 uses JSONP. It is possible to use normal JSON or XML as well. JSONP is such as JSON just with the addition to provide a callback function.<\/p>\n<h2>Services<\/h2>\n<h3>Searchly<\/h3>\n<p><a href=\"http:\/\/www.searchly.com\/\">Searchly<\/a> is service to create Elasticsearch instances in the cloud. The service has the option to create a free account which includes the creation of two Elasticsearch indexes and a total storage of 5 mb (that is handy). That should be also enough for just developing and playing around \ud83d\ude09<\/p>\n<h3>Cloudbees<\/h3>\n<p><a href=\"http:\/\/www.cloudbees.com\/\">Cloudbees<\/a> is a service that offers you to deploy your application in the cloud. There are several other service out such as Heroku etc. I choose for Cloudbees because you can create a free account. Cloudbees also has the option to choose a region (US or EU) where the application should be deployed.<\/p>\n<h2>Conclusion<\/h2>\n<p>An Elasticsearch instance is created which is in a cloud environment. Our Spring MVC project is deployed on a cloud platform and is connected with the database and the mobile framework. We can conclude that all three technologies can work together and it is possible to deploy them into the cloud. Part 2 of this blog will show you guys how to do it.<\/p>\n<h2>Demo Part 1<\/h2>\n<h3>Step 1: Create Searchly Account<\/h3>\n<p><a href=\"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/2014\/03\/Screenshot-2014-03-26-11.01.04.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-11527 alignleft\" style=\"float: left\" alt=\"searchly_1\" src=\"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/2014\/03\/Screenshot-2014-03-26-11.01.04-300x143.png\" width=\"300\" height=\"143\" \/><\/a><\/p>\n<p>To create a Searchly account go to\u00a0<a href=\"https:\/\/dashboard.searchly.com\/users\/sign_up\"> Searchly<\/a>. Fill in there your organization (optional), email (mandatory), password (mandatory), and a password confirmation. You should get an email to confirm your account. After the confirmation you get redirect to create your new app space.<\/p>\n<p><a href=\"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/2014\/03\/Screenshot-2014-03-26-11.09.09_modified.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-11530 alignright\" style=\"float: right\" alt=\"searchly_2\" src=\"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/2014\/03\/Screenshot-2014-03-26-11.09.09_modified-300x131.png\" width=\"300\" height=\"131\" srcset=\"https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2014\/03\/Screenshot-2014-03-26-11.09.09_modified-300x131.png 300w, https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2014\/03\/Screenshot-2014-03-26-11.09.09_modified-1024x447.png 1024w, https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2014\/03\/Screenshot-2014-03-26-11.09.09_modified-768x335.png 768w, https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2014\/03\/Screenshot-2014-03-26-11.09.09_modified.png 1280w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>We need to give a name to the app space and we need to specify the cloud region. In this demo I choose the app space name \u201cElastic-Search-Sencha-Touch-Demo\u201d and as region I took Europe. Click on create and your Elasticsearch instance will be created and you get forwarded to your personal dashboard.<\/p>\n<h3>Step 2: Create Spring MVC Project<\/h3>\n<p><a href=\"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/2014\/03\/Screenshot-2014-03-26-11.48.14.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-11539 alignleft\" style=\"float: left\" alt=\"spring_mvc_1\" src=\"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/2014\/03\/Screenshot-2014-03-26-11.48.14-300x165.png\" width=\"300\" height=\"165\" \/><\/a><\/p>\n<p>I created the Spring MVC application in Intellij as IDE. However, the creation the application should be similar in Eclipse or Netbeans. Click to create a new project and select Spring MVC. Give your project a name and that was it.<br \/>\n<a href=\"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/2014\/03\/Screenshot-2014-03-26-13.01.30.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-11540 alignright\" style=\"float: right\" alt=\"spring_mvc_2\" src=\"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/2014\/03\/Screenshot-2014-03-26-13.01.30-300x149.png\" width=\"300\" height=\"149\" srcset=\"https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2014\/03\/Screenshot-2014-03-26-13.01.30-300x149.png 300w, https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2014\/03\/Screenshot-2014-03-26-13.01.30-1024x509.png 1024w, https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2014\/03\/Screenshot-2014-03-26-13.01.30-768x382.png 768w, https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2014\/03\/Screenshot-2014-03-26-13.01.30.png 1240w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>The next is step is to create a user model (yes the demo was about how to register a user ;)) .Let us create a new package in the java source folder with the name model. In this package we create a new class named User. To keep it simple the user has just three properties an id, an email, and a password.<\/p>\n<p>Okay, we have our user model. Next step is to add the support of JSONP on the server side. There is a github project <a href=\"https:\/\/github.com\/bhagyas\/spring-jsonp-support\">(https:\/\/github.com\/bhagyas\/spring-jsonp-support)<\/a> which provides the needed classes to work with JSONP in Spring. You can include the project to your project or just copy the three classes of the github project and create a new package for example JSONP and paste the three classes in it that is how I did it.<\/p>\n<p><a href=\"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/2014\/03\/Screenshot-2014-03-26-13.13.27.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-11542 alignleft\" style=\"margin-left: 25%\" alt=\"project_structure\" src=\"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/2014\/03\/Screenshot-2014-03-26-13.13.27-300x202.png\" width=\"300\" height=\"202\" \/><\/a><\/p>\n<p>We could use the HelloController for receiving a request of a client but let us create an own controller. Create a new class in the mvc package and name it \u201cRegistrationController\u201d. Add the controller annotation and a request mapping annotation to it. Also we need a method to register a user which should be a return a String.<\/p>\n<p><a href=\"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/2014\/03\/Screenshot-2014-03-27-09.29.46.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-11545 alignright\" style=\"float: right\" alt=\"resources\" src=\"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/2014\/03\/Screenshot-2014-03-27-09.29.46.png\" width=\"260\" height=\"157\" \/><\/a><\/p>\n<p>In addition we need to modify our web.xml and mvc-dispatcher-servlet.xml files. Those files are to find in the webapp folder. I am used to create an extra resources package and to include their xml files. That can comes handy if the project is growing. So let us create a resources folder next to our java and webapp folder. In this demo I use the structure resources\/META-INF\/spring and created two xml files. One with the name search-config the other service-config.<\/p>\n<p><a href=\"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/2014\/03\/Screenshot-2014-03-28-07.43.40.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-11546 alignleft\" style=\"float: left\" alt=\"search_xml\" src=\"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/2014\/03\/Screenshot-2014-03-28-07.43.40-300x83.png\" width=\"300\" height=\"83\" srcset=\"https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2014\/03\/Screenshot-2014-03-28-07.43.40-300x83.png 300w, https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2014\/03\/Screenshot-2014-03-28-07.43.40.png 547w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Both xml files are similar they are just differentiate in one line. On the left side is the search-config.xml file. For the service-config.xml file, we replace the second last line with \u201ccontext:component-scan base-package=&#8221;com.springapp.jsonp&#8221;\u201d.<\/p>\n<p><a href=\"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/2014\/03\/Screenshot-2014-03-28-07.53.53.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-11547 alignright\" style=\"float: right\" alt=\"web_xml\" src=\"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/2014\/03\/Screenshot-2014-03-28-07.53.53-300x235.png\" width=\"300\" height=\"235\" srcset=\"https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2014\/03\/Screenshot-2014-03-28-07.53.53-300x235.png 300w, https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2014\/03\/Screenshot-2014-03-28-07.53.53.png 670w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Alright done \ud83d\ude42 we can modify the web.xml and mvc-dispatcher-servlet.xml file. On the right side is the implementation of the web.xml, below is mvc-dispatcher-servlet.xml.<\/p>\n<p><a href=\"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/2014\/03\/Screenshot-2014-03-28-07.55.41.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-11548\" alt=\"mvc_dispatcher\" src=\"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/2014\/03\/Screenshot-2014-03-28-07.55.41-300x150.png\" width=\"300\" height=\"150\" \/><\/a><\/p>\n<p>The next step is to add a new folder in the webapp\/WEB-INF directory with the name static and last but not least we need to add dependencies to the pom.xml.<\/p>\n<ul>\n<li>jackson-core<\/li>\n<li>jackson-databind<\/li>\n<li>jest<\/li>\n<\/ul>\n<h3>Step 3: Connect Spring MVC with ElasticSearch<\/h3>\n<p><a href=\"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/2014\/03\/Screenshot-2014-03-26-13.31.39.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-11549 alignleft\" style=\"float: left\" alt=\"elasticsearch_package\" src=\"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/2014\/03\/Screenshot-2014-03-26-13.31.39-300x234.png\" width=\"300\" height=\"234\" srcset=\"https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2014\/03\/Screenshot-2014-03-26-13.31.39-300x234.png 300w, https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2014\/03\/Screenshot-2014-03-26-13.31.39.png 343w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>To connect our fresh created Spring MVC project with the database we need to use the JEST client. The JEST client was added as an dependency in the previous step. Let us create a new package with the name elasticsearch and create an interface with the name \u201cDocumentIndexer\u201d and a java class \u201cDocumentIndexerImpl\u201d which implements the interface.<\/p>\n<p><a href=\"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/2014\/03\/Screenshot-2014-03-26-14.27.43.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-11550 alignright\" style=\"float: right\" alt=\"jest_client\" src=\"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/2014\/03\/Screenshot-2014-03-26-14.27.43-300x74.png\" width=\"300\" height=\"74\" srcset=\"https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2014\/03\/Screenshot-2014-03-26-14.27.43-300x74.png 300w, https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2014\/03\/Screenshot-2014-03-26-14.27.43-768x190.png 768w, https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2014\/03\/Screenshot-2014-03-26-14.27.43.png 860w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\nThe interface contains one method which is responsible for the creation of the user index and to insert a user in the index. The DocumentIndexerImpl contains the logic to create the index and to add the user in the index with the help of the JEST client.<\/p>\n<p>The only interesting part is the creation of the client configuration in the first line of the constructor. In the place where stands \u201cYOUR-API-KEY\u201d you need to paste your Searchly API key (you can find the key on your Searchly dashboard).<\/p>\n<p>The createAndAddUserIndex method is defined as<br \/>\n<a href=\"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/2014\/03\/Screenshot-2014-03-26-14.21.55.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-11554\" style=\"margin-left: 25%\" alt=\"create_user\" src=\"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/2014\/03\/Screenshot-2014-03-26-14.21.55-300x167.png\" width=\"300\" height=\"167\" \/><\/a><\/p>\n<p>The Spring MVC project is now connected with the elasticsearch instance and is able to create an index and to insert a new user. Even better the index will just be created if the index is not there.<\/p>\n<p><a href=\"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/2014\/03\/Screenshot-2014-03-27-12.56.17.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-11555 alignright\" style=\"float: right\" alt=\"registrationController\" src=\"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/2014\/03\/Screenshot-2014-03-27-12.56.17-300x94.png\" width=\"300\" height=\"94\" \/><\/a><\/p>\n<p>So far so good, our RegistrationController can register a user when we include the DocumentIndexer to it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; Introduction Welcome to my third blog entry. In this one, I want to show how to connect three different technologies (database, REST service, and a mobile framework) and deploy them into the cloud. Those three technologies are: Elasticsearch (Database) Spring MVC (REST service) Sencha Touch 2 (Client side framework) First, I want to give [&hellip;]<\/p>\n","protected":false},"author":92,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"content-type":"","footnotes":""},"categories":[15,65,10],"tags":[61],"class_list":["post-11605","post","type-post","status-publish","format-standard","hentry","category-enterprise-search","category-big_data_search","category-development","tag-elasticsearch"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Elasticsearch &#038; Spring MVC &#038; Sencha Touch 2 in the Cloud - Part 1 - Trifork 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:\/\/trifork.nl\/blog\/elasticsearch-spring-mvc-sencha-touch-2-in-the-cloud-part-1\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Elasticsearch &#038; Spring MVC &#038; Sencha Touch 2 in the Cloud - Part 1 - Trifork Blog\" \/>\n<meta property=\"og:description\" content=\"&nbsp; Introduction Welcome to my third blog entry. In this one, I want to show how to connect three different technologies (database, REST service, and a mobile framework) and deploy them into the cloud. Those three technologies are: Elasticsearch (Database) Spring MVC (REST service) Sencha Touch 2 (Client side framework) First, I want to give [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/trifork.nl\/blog\/elasticsearch-spring-mvc-sencha-touch-2-in-the-cloud-part-1\/\" \/>\n<meta property=\"og:site_name\" content=\"Trifork Blog\" \/>\n<meta property=\"article:published_time\" content=\"2014-04-15T12:27:46+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/2013\/04\/elasticsearch-logo.png\" \/>\n<meta name=\"author\" content=\"Philipp Darkow\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Philipp Darkow\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/trifork.nl\/blog\/elasticsearch-spring-mvc-sencha-touch-2-in-the-cloud-part-1\/\",\"url\":\"https:\/\/trifork.nl\/blog\/elasticsearch-spring-mvc-sencha-touch-2-in-the-cloud-part-1\/\",\"name\":\"Elasticsearch &#038; Spring MVC &#038; Sencha Touch 2 in the Cloud - Part 1 - Trifork Blog\",\"isPartOf\":{\"@id\":\"https:\/\/trifork.nl\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/trifork.nl\/blog\/elasticsearch-spring-mvc-sencha-touch-2-in-the-cloud-part-1\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/trifork.nl\/blog\/elasticsearch-spring-mvc-sencha-touch-2-in-the-cloud-part-1\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/2013\/04\/elasticsearch-logo.png\",\"datePublished\":\"2014-04-15T12:27:46+00:00\",\"author\":{\"@id\":\"https:\/\/trifork.nl\/blog\/#\/schema\/person\/f0f730670b3fd7af44d237f16fe86339\"},\"breadcrumb\":{\"@id\":\"https:\/\/trifork.nl\/blog\/elasticsearch-spring-mvc-sencha-touch-2-in-the-cloud-part-1\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/trifork.nl\/blog\/elasticsearch-spring-mvc-sencha-touch-2-in-the-cloud-part-1\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/trifork.nl\/blog\/elasticsearch-spring-mvc-sencha-touch-2-in-the-cloud-part-1\/#primaryimage\",\"url\":\"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/2013\/04\/elasticsearch-logo.png\",\"contentUrl\":\"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/2013\/04\/elasticsearch-logo.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/trifork.nl\/blog\/elasticsearch-spring-mvc-sencha-touch-2-in-the-cloud-part-1\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/trifork.nl\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Elasticsearch &#038; Spring MVC &#038; Sencha Touch 2 in the Cloud &#8211; Part 1\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/trifork.nl\/blog\/#website\",\"url\":\"https:\/\/trifork.nl\/blog\/\",\"name\":\"Trifork Blog\",\"description\":\"Keep updated on the technical solutions Trifork is working on!\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/trifork.nl\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/trifork.nl\/blog\/#\/schema\/person\/f0f730670b3fd7af44d237f16fe86339\",\"name\":\"Philipp Darkow\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/trifork.nl\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/152ad8e94d7e45cb38952736dafe9c76?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/152ad8e94d7e45cb38952736dafe9c76?s=96&d=mm&r=g\",\"caption\":\"Philipp Darkow\"},\"url\":\"https:\/\/trifork.nl\/blog\/author\/philippd\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Elasticsearch &#038; Spring MVC &#038; Sencha Touch 2 in the Cloud - Part 1 - Trifork 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:\/\/trifork.nl\/blog\/elasticsearch-spring-mvc-sencha-touch-2-in-the-cloud-part-1\/","og_locale":"en_US","og_type":"article","og_title":"Elasticsearch &#038; Spring MVC &#038; Sencha Touch 2 in the Cloud - Part 1 - Trifork Blog","og_description":"&nbsp; Introduction Welcome to my third blog entry. In this one, I want to show how to connect three different technologies (database, REST service, and a mobile framework) and deploy them into the cloud. Those three technologies are: Elasticsearch (Database) Spring MVC (REST service) Sencha Touch 2 (Client side framework) First, I want to give [&hellip;]","og_url":"https:\/\/trifork.nl\/blog\/elasticsearch-spring-mvc-sencha-touch-2-in-the-cloud-part-1\/","og_site_name":"Trifork Blog","article_published_time":"2014-04-15T12:27:46+00:00","og_image":[{"url":"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/2013\/04\/elasticsearch-logo.png","type":"","width":"","height":""}],"author":"Philipp Darkow","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Philipp Darkow","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/trifork.nl\/blog\/elasticsearch-spring-mvc-sencha-touch-2-in-the-cloud-part-1\/","url":"https:\/\/trifork.nl\/blog\/elasticsearch-spring-mvc-sencha-touch-2-in-the-cloud-part-1\/","name":"Elasticsearch &#038; Spring MVC &#038; Sencha Touch 2 in the Cloud - Part 1 - Trifork Blog","isPartOf":{"@id":"https:\/\/trifork.nl\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/trifork.nl\/blog\/elasticsearch-spring-mvc-sencha-touch-2-in-the-cloud-part-1\/#primaryimage"},"image":{"@id":"https:\/\/trifork.nl\/blog\/elasticsearch-spring-mvc-sencha-touch-2-in-the-cloud-part-1\/#primaryimage"},"thumbnailUrl":"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/2013\/04\/elasticsearch-logo.png","datePublished":"2014-04-15T12:27:46+00:00","author":{"@id":"https:\/\/trifork.nl\/blog\/#\/schema\/person\/f0f730670b3fd7af44d237f16fe86339"},"breadcrumb":{"@id":"https:\/\/trifork.nl\/blog\/elasticsearch-spring-mvc-sencha-touch-2-in-the-cloud-part-1\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/trifork.nl\/blog\/elasticsearch-spring-mvc-sencha-touch-2-in-the-cloud-part-1\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/trifork.nl\/blog\/elasticsearch-spring-mvc-sencha-touch-2-in-the-cloud-part-1\/#primaryimage","url":"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/2013\/04\/elasticsearch-logo.png","contentUrl":"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/2013\/04\/elasticsearch-logo.png"},{"@type":"BreadcrumbList","@id":"https:\/\/trifork.nl\/blog\/elasticsearch-spring-mvc-sencha-touch-2-in-the-cloud-part-1\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/trifork.nl\/blog\/"},{"@type":"ListItem","position":2,"name":"Elasticsearch &#038; Spring MVC &#038; Sencha Touch 2 in the Cloud &#8211; Part 1"}]},{"@type":"WebSite","@id":"https:\/\/trifork.nl\/blog\/#website","url":"https:\/\/trifork.nl\/blog\/","name":"Trifork Blog","description":"Keep updated on the technical solutions Trifork is working on!","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/trifork.nl\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/trifork.nl\/blog\/#\/schema\/person\/f0f730670b3fd7af44d237f16fe86339","name":"Philipp Darkow","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/trifork.nl\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/152ad8e94d7e45cb38952736dafe9c76?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/152ad8e94d7e45cb38952736dafe9c76?s=96&d=mm&r=g","caption":"Philipp Darkow"},"url":"https:\/\/trifork.nl\/blog\/author\/philippd\/"}]}},"_links":{"self":[{"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/posts\/11605","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/users\/92"}],"replies":[{"embeddable":true,"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/comments?post=11605"}],"version-history":[{"count":0,"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/posts\/11605\/revisions"}],"wp:attachment":[{"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/media?parent=11605"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/categories?post=11605"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/tags?post=11605"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}