{"id":1575,"date":"2012-07-06T01:00:00","date_gmt":"2012-07-06T01:00:00","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/2012\/10\/apache-thrift-with-java-quickstart.html"},"modified":"2014-09-21T12:01:52","modified_gmt":"2014-09-21T09:01:52","slug":"apache-thrift-with-java-quickstart","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2012\/07\/apache-thrift-with-java-quickstart.html","title":{"rendered":"Apache Thrift with Java quickstart"},"content":{"rendered":"<div dir=\"ltr\" style=\"text-align: left\">Apache Thrift is a RPC framework founded by facebook and now it is an Apache project. Thrift lets you define data types and service interfaces in a language neutral definition file. That definition file is used as the input for the compiler to generate code for building RPC clients and servers that communicate over different programming languages. You can refer                      <a href=\"http:\/\/thrift.apache.org\/static\/thrift-20070401.pdf\">Thrift white paper<\/a> also.                     <\/p>\n<p>According to the                      <a href=\"http:\/\/thrift.apache.org\/\">official web site<\/a> Apache Thrift is a,                      <i>                     <i>software framework, for scalable cross-language services development, combines a software stack with a code generation engine to build services that work efficiently and seamlessly between C++, Java, Python, PHP, Ruby, Erlang, Perl, Haskell, C#, Cocoa, JavaScript, Node.js, Smalltalk, OCaml and Delphi and other languages.<\/i>                    <\/i>                                                                                           Image courtesy wikipedia<\/p>\n<div class=\"separator\" style=\"clear: both;text-align: center\"><a href=\"http:\/\/2.bp.blogspot.com\/-nQD6UzLqCG0\/T_Vv-kz41wI\/AAAAAAAAAnU\/dkTtnUhHVHU\/s1600\/331px-Apache_Thrift_architecture.png\"><img decoding=\"async\" border=\"0\" height=\"400\" src=\"http:\/\/2.bp.blogspot.com\/-nQD6UzLqCG0\/T_Vv-kz41wI\/AAAAAAAAAnU\/dkTtnUhHVHU\/s400\/331px-Apache_Thrift_architecture.png\" width=\"221\" \/><\/a><\/div>\n<p><strong>Installing Apache Thrift in Windows<\/strong>                    <\/p>\n<p>Installation Thrift can be a tiresome process. But for windows the compiler is available as a prebuilt exe. Download                      <a href=\"http:\/\/www.apache.org\/dyn\/closer.cgi?path=\/thrift\/0.8.0\/thrift-0.8.0.exe\">thrift.exe<\/a> and add it into your environment variables.                     <\/p>\n<p><strong>Writing Thrift definition file (.thrift file)<\/strong>                      <\/p>\n<p>Writing the Thrift definition file becomes really easy once you get used to it. I found this                      <a href=\"http:\/\/wiki.apache.org\/thrift\/Tutorial\">tutorial<\/a> quite useful to begin with.                     <div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p><i>Example definition file (add.thrift)<\/i>                      <\/p>\n<pre class=\"brush:java\">namespace java com.eviac.blog.samples.thrift.server  \/\/ defines the namespace \r\n\r\ntypedef i32 int  \/\/typedefs to get convenient names for your types\r\n\r\nservice AdditionService {  \/\/ defines the service to add two numbers\r\n        int add(1:int n1, 2:int n2), \/\/defines a method\r\n}\r\n\r\n<\/pre>\n<p><strong>Compiling Thrift definition file<\/strong>                      <\/p>\n<p>To compile the .thrift file use the following command.                      <\/p>\n<pre class=\"brush:java\"> \r\nthrift --gen &lt;language&gt; &lt;Thrift filename&gt;\r\n<\/pre>\n<p>For my example the command is,                      <\/p>\n<pre class=\"brush:java\"> \r\nthrift --gen java add.thrift\r\n<\/pre>\n<p>After performing the command, inside                      <i>gen-java <\/i> directory you&#8217;ll find the source codes which is useful for building RPC clients and server. In my example it will create a java code called                      <i>AdditionService.java<\/i>                      <\/p>\n<p><strong>Writing a service handler<\/strong>                    <\/p>\n<p>Service handler class is required to implement the                      <i>AdditionService.Iface<\/i> interface.                      <\/p>\n<p><i>Example service handler (AdditionServiceHandler.java)<\/i>                      <\/p>\n<pre class=\"brush:java\">package com.eviac.blog.samples.thrift.server;\r\n\r\nimport org.apache.thrift.TException;\r\n\r\npublic class AdditionServiceHandler implements AdditionService.Iface {\r\n\r\n @Override\r\n public int add(int n1, int n2) throws TException {\r\n  return n1 + n2;\r\n }\r\n\r\n}&nbsp;<\/pre>\n<p> <strong>Writing a simple server<\/strong>                    <\/p>\n<p>Following is an example code to initiate a simple thrift server. To enable the multithreaded server uncomment the commented parts of the example code.                     <\/p>\n<p><i>Example server (MyServer.java)<\/i>                      <\/p>\n<pre class=\"brush:java\">package com.eviac.blog.samples.thrift.server;\r\n\r\nimport org.apache.thrift.transport.TServerSocket;\r\nimport org.apache.thrift.transport.TServerTransport;\r\nimport org.apache.thrift.server.TServer;\r\nimport org.apache.thrift.server.TServer.Args;\r\nimport org.apache.thrift.server.TSimpleServer;\r\n\r\npublic class MyServer {\r\n\r\n public static void StartsimpleServer(AdditionService.Processor&lt;AdditionServiceHandler&gt; processor) {\r\n  try {\r\n   TServerTransport serverTransport = new TServerSocket(9090);\r\n   TServer server = new TSimpleServer(\r\n     new Args(serverTransport).processor(processor));\r\n\r\n   \/\/ Use this for a multithreaded server\r\n   \/\/ TServer server = new TThreadPoolServer(new\r\n   \/\/ TThreadPoolServer.Args(serverTransport).processor(processor));\r\n\r\n   System.out.println(\"Starting the simple server...\");\r\n   server.serve();\r\n  } catch (Exception e) {\r\n   e.printStackTrace();\r\n  }\r\n }\r\n \r\n public static void main(String[] args) {\r\n  StartsimpleServer(new AdditionService.Processor&lt;AdditionServiceHandler&gt;(new AdditionServiceHandler()));\r\n }\r\n\r\n}\r\n\r\n<\/pre>\n<p><strong>Writing the client<\/strong>                    <\/p>\n<p>Following is an example java client code which consumes the service provided by AdditionService.                     <\/p>\n<p><i>Example client code (AdditionClient.java)<\/i>                      <\/p>\n<pre class=\"brush:java\">package com.eviac.blog.samples.thrift.client;\r\n\r\nimport org.apache.thrift.TException;\r\nimport org.apache.thrift.protocol.TBinaryProtocol;\r\nimport org.apache.thrift.protocol.TProtocol;\r\nimport org.apache.thrift.transport.TSocket;\r\nimport org.apache.thrift.transport.TTransport;\r\nimport org.apache.thrift.transport.TTransportException;\r\n\r\npublic class AdditionClient {\r\n\r\n public static void main(String[] args) {\r\n\r\n  try {\r\n   TTransport transport;\r\n\r\n   transport = new TSocket(\"localhost\", 9090);\r\n   transport.open();\r\n\r\n   TProtocol protocol = new TBinaryProtocol(transport);\r\n   AdditionService.Client client = new AdditionService.Client(protocol);\r\n\r\n   System.out.println(client.add(100, 200));\r\n\r\n   transport.close();\r\n  } catch (TTransportException e) {\r\n   e.printStackTrace();\r\n  } catch (TException x) {\r\n   x.printStackTrace();\r\n  }\r\n }\r\n\r\n}\r\n<\/pre>\n<p>Run the server code(MyServer.java). It should output following and will listen to the requests.                     <\/p>\n<pre class=\"brush:java\">Starting the simple server...\r\n<\/pre>\n<p>Then run the client code(AdditionClient.java). It should output following.                     <\/p>\n<pre class=\"brush:java\">300\r\n<\/pre>\n<p><strong><i>Reference: <\/i><\/strong><a href=\"http:\/\/blog.eviac.net\/2012\/07\/apache-thrift-with-java-quickstart.html\">Apache Thrift with Java quickstart  <\/a> from our <a href=\"http:\/\/www.javacodegeeks.com\/p\/jcg.html\">JCG partner<\/a> Pavithra Siriwardena at the <a href=\"http:\/\/blog.eviac.net\/\">EVIAC<\/a> blog.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Apache Thrift is a RPC framework founded by facebook and now it is an Apache project. Thrift lets you define data types and service interfaces in a language neutral definition file. That definition file is used as the input for the compiler to generate code for building RPC clients and servers that communicate over different &hellip;<\/p>\n","protected":false},"author":170,"featured_media":82,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[406],"class_list":["post-1575","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-apache-thrift"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Apache Thrift with Java quickstart - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"Apache Thrift is a RPC framework founded by facebook and now it is an Apache project. Thrift lets you define data types and service interfaces in a\" \/>\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.javacodegeeks.com\/2012\/07\/apache-thrift-with-java-quickstart.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Apache Thrift with Java quickstart - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"Apache Thrift is a RPC framework founded by facebook and now it is an Apache project. Thrift lets you define data types and service interfaces in a\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2012\/07\/apache-thrift-with-java-quickstart.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2012-07-06T01:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2014-09-21T09:01:52+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-thrift-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Pavithra Siriwardena\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Pavithra Siriwardena\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/07\\\/apache-thrift-with-java-quickstart.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/07\\\/apache-thrift-with-java-quickstart.html\"},\"author\":{\"name\":\"Pavithra Siriwardena\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/786e7973ceced64f8bf483ec0bfa4de4\"},\"headline\":\"Apache Thrift with Java quickstart\",\"datePublished\":\"2012-07-06T01:00:00+00:00\",\"dateModified\":\"2014-09-21T09:01:52+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/07\\\/apache-thrift-with-java-quickstart.html\"},\"wordCount\":364,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/07\\\/apache-thrift-with-java-quickstart.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/apache-thrift-logo.jpg\",\"keywords\":[\"Apache Thrift\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/07\\\/apache-thrift-with-java-quickstart.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/07\\\/apache-thrift-with-java-quickstart.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/07\\\/apache-thrift-with-java-quickstart.html\",\"name\":\"Apache Thrift with Java quickstart - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/07\\\/apache-thrift-with-java-quickstart.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/07\\\/apache-thrift-with-java-quickstart.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/apache-thrift-logo.jpg\",\"datePublished\":\"2012-07-06T01:00:00+00:00\",\"dateModified\":\"2014-09-21T09:01:52+00:00\",\"description\":\"Apache Thrift is a RPC framework founded by facebook and now it is an Apache project. Thrift lets you define data types and service interfaces in a\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/07\\\/apache-thrift-with-java-quickstart.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/07\\\/apache-thrift-with-java-quickstart.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/07\\\/apache-thrift-with-java-quickstart.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/apache-thrift-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/apache-thrift-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/07\\\/apache-thrift-with-java-quickstart.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/enterprise-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Apache Thrift with Java quickstart\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/786e7973ceced64f8bf483ec0bfa4de4\",\"name\":\"Pavithra Siriwardena\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/1774c418cd9aeb9a68960676854bba91e435eaba319a4b3eec6408a015067443?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/1774c418cd9aeb9a68960676854bba91e435eaba319a4b3eec6408a015067443?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/1774c418cd9aeb9a68960676854bba91e435eaba319a4b3eec6408a015067443?s=96&d=mm&r=g\",\"caption\":\"Pavithra Siriwardena\"},\"sameAs\":[\"http:\\\/\\\/blog.eviac.net\\\/\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/Pavithra-Siriwardena\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Apache Thrift with Java quickstart - Java Code Geeks","description":"Apache Thrift is a RPC framework founded by facebook and now it is an Apache project. Thrift lets you define data types and service interfaces in a","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.javacodegeeks.com\/2012\/07\/apache-thrift-with-java-quickstart.html","og_locale":"en_US","og_type":"article","og_title":"Apache Thrift with Java quickstart - Java Code Geeks","og_description":"Apache Thrift is a RPC framework founded by facebook and now it is an Apache project. Thrift lets you define data types and service interfaces in a","og_url":"https:\/\/www.javacodegeeks.com\/2012\/07\/apache-thrift-with-java-quickstart.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2012-07-06T01:00:00+00:00","article_modified_time":"2014-09-21T09:01:52+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-thrift-logo.jpg","type":"image\/jpeg"}],"author":"Pavithra Siriwardena","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Pavithra Siriwardena","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2012\/07\/apache-thrift-with-java-quickstart.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/07\/apache-thrift-with-java-quickstart.html"},"author":{"name":"Pavithra Siriwardena","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/786e7973ceced64f8bf483ec0bfa4de4"},"headline":"Apache Thrift with Java quickstart","datePublished":"2012-07-06T01:00:00+00:00","dateModified":"2014-09-21T09:01:52+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/07\/apache-thrift-with-java-quickstart.html"},"wordCount":364,"commentCount":0,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/07\/apache-thrift-with-java-quickstart.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-thrift-logo.jpg","keywords":["Apache Thrift"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2012\/07\/apache-thrift-with-java-quickstart.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2012\/07\/apache-thrift-with-java-quickstart.html","url":"https:\/\/www.javacodegeeks.com\/2012\/07\/apache-thrift-with-java-quickstart.html","name":"Apache Thrift with Java quickstart - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/07\/apache-thrift-with-java-quickstart.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/07\/apache-thrift-with-java-quickstart.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-thrift-logo.jpg","datePublished":"2012-07-06T01:00:00+00:00","dateModified":"2014-09-21T09:01:52+00:00","description":"Apache Thrift is a RPC framework founded by facebook and now it is an Apache project. Thrift lets you define data types and service interfaces in a","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/07\/apache-thrift-with-java-quickstart.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2012\/07\/apache-thrift-with-java-quickstart.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2012\/07\/apache-thrift-with-java-quickstart.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-thrift-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-thrift-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2012\/07\/apache-thrift-with-java-quickstart.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/enterprise-java"},{"@type":"ListItem","position":4,"name":"Apache Thrift with Java quickstart"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/786e7973ceced64f8bf483ec0bfa4de4","name":"Pavithra Siriwardena","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/1774c418cd9aeb9a68960676854bba91e435eaba319a4b3eec6408a015067443?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/1774c418cd9aeb9a68960676854bba91e435eaba319a4b3eec6408a015067443?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1774c418cd9aeb9a68960676854bba91e435eaba319a4b3eec6408a015067443?s=96&d=mm&r=g","caption":"Pavithra Siriwardena"},"sameAs":["http:\/\/blog.eviac.net\/"],"url":"https:\/\/www.javacodegeeks.com\/author\/Pavithra-Siriwardena"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/1575","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/170"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=1575"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/1575\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/82"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=1575"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=1575"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=1575"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}