You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by bu...@apache.org on 2014/03/23 01:02:35 UTC

svn commit: r903025 - in /websites/staging/thrift/trunk/content: ./ index.html sitemap.html

Author: buildbot
Date: Sun Mar 23 00:02:34 2014
New Revision: 903025

Log:
Staging update by buildbot for thrift

Modified:
    websites/staging/thrift/trunk/content/   (props changed)
    websites/staging/thrift/trunk/content/index.html
    websites/staging/thrift/trunk/content/sitemap.html

Propchange: websites/staging/thrift/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Sun Mar 23 00:02:34 2014
@@ -1 +1 @@
-1580382
+1580383

Modified: websites/staging/thrift/trunk/content/index.html
==============================================================================
--- websites/staging/thrift/trunk/content/index.html (original)
+++ websites/staging/thrift/trunk/content/index.html Sun Mar 23 00:02:34 2014
@@ -14,7 +14,7 @@
 	  <script src="/static/js/bootstrap-dropdown.js"></script>
     <script src="/static/js/bootstrap-tab.js"></script>
 	
-    <title>Apache Thrift - Home</title>
+    <title>Apache Thrift - Index</title>
   </head>
   <body>
   	<div class="navbar">
@@ -67,135 +67,15 @@
 </div>
 
   	<div class="container">
-          <div class="row">
-  <div class="span8">
-    <p>
-      The Apache Thrift 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.
-    </p>
-    <h3>Getting Started</h3>
-    <p>
-      <ul>
-        <li>
-          <b>Download Apache Thrift</b>
-          <p>To get started, <a href="/download">download</a> a copy of Thrift.</p>
-        </li>
-        <li>
-          <b>Build and Install the Apache Thrift compiler</b>
-          <p>You will then need to <a href="/docs/BuildingFromSource">build</a> the Apache Thrift compiler and install it. See the <a href="/docs/install">installing Thrift</a> guide for any help with this step.</p>
-        </li>
-        <li>
-          <b>Writing a .thrift file</b>
-          <p>After the Thrift compiler is installed you will need to create a thrift file. This file is an <a href="/docs/idl">interface definition</a> made up of <a href="/docs/types">thrift types</a> and Services. The services you define in this file are implemented by the server and are called by any clients. The Thrift compiler is used to generate your Thrift File into source code which is used by the different client libraries and the server you write. To generate the source from a thrift file run</p>
-          <pre>
-            <code>thrift --gen &lt;language&gt; &lt;Thrift filename&gt;</code>
-          </pre>
-          <p>The sample tutorial.thrift file used for all the client and server tutorials can be found <a href="https://git-wip-us.apache.org/repos/asf/thrift/?p=thrift.git;a=tree;f=tutorial">here</a>. </p>
-        </li>
-      </ul>
-    </p>
-    <br />
-    <p>
-      To learn more about Apache Thrift <a href="/static/files/thrift-20070401.pdf">Read the Whitepaper</a>
-    </p>
-  </div>
-  <div class="span3 well center pull-right">
-    <h2>Download</h2>
-    <p>Apache Thrift v0.9.1</p>
-    <p>
-      <a class="btn btn-large" href="http://www.apache.org/dyn/closer.cgi?path=/thrift/0.9.1/thrift-0.9.1.tar.gz">
-          Download <small>v0.9.1</small>
-      </a>
-    </p>
-    <p>
-      <small>
-       <a href="https://dist.apache.org/repos/dist/release/thrift/0.9.1/thrift-0.9.1.tar.gz.md5">MD5</a>
-      </small>
-      |
-      <small>
-       <a href="https://dist.apache.org/repos/dist/release/thrift/0.9.1/thrift-0.9.1.tar.gz.asc">PGP</a>
-      </small>
-    </p>
-    <p>
-      <h4>[<a href="/download">Other Downloads</a>]</h4>
-    </p>
-  </div>
-</div>
-
-<hr />
-
-<h3 id="example">Example</h3>
-<p>Apache Thrift allows you to define data types and service interfaces in a simple definition file. Taking that file as input, the compiler generates code to be used to easily build RPC clients and servers that communicate seamlessly across programming languages. Instead of writing a load of boilerplate code to serialize and transport your objects and invoke remote methods, you can get right down to business.</p>
-<p>The following example is a simple service to store user objects for a web front end.</p>
-<div class="tabbable">
-  <ul class="nav nav-tabs">
-    <li class="active"><a href="#1" data-toggle="tab">Thrift Definition File</a></li>
-    <li><a href="#2" data-toggle="tab">Python Client</a></li>
-    <li><a href="#3" data-toggle="tab">Java Server</a></li>
-  </ul>
-  <div class="tab-content">
-  <div class="tab-pane active" id="1">
-<div class="codehilite"><pre>service Calculator extends shared.SharedService {
-
-  /**
-   * A method definition looks like C code. It has a return type, arguments,
-   * and optionally a list of exceptions that it may throw. Note that argument
-   * lists and exception lists are specified using the exact same syntax as
-   * field lists in struct or exception definitions.
-   */
-
-   void ping(),
-
-   i32 add(1:i32 num1, 2:i32 num2),
-
-   i32 calculate(1:i32 logid, 2:Work w) throws (1:InvalidOperation ouch),
-
-   /**
-    * This method has a oneway modifier. That means the client only makes
-    * a request and does not listen for any response at all. Oneway methods
-    * must be void.
-    */
-   oneway void zip()
-
-}
-</pre></div>
-
-<p></div>
-  <div class="tab-pane" id="2">
-<div class="codehilite"><pre>  <span class="c"># Make socket</span>
-  <span class="n">transport</span> <span class="o">=</span> <span class="n">TSocket</span><span class="o">.</span><span class="n">TSocket</span><span class="p">(</span><span class="s">&#39;localhost&#39;</span><span class="p">,</span> <span class="mi">9090</span><span class="p">)</span></p>
-<p><span class="c"># Buffering is critical. Raw sockets are very slow</span>
-  <span class="n">transport</span> <span class="o">=</span> <span class="n">TTransport</span><span class="o">.</span><span class="n">TBufferedTransport</span><span class="p">(</span><span class="n">transport</span><span class="p">)</span></p>
-<p><span class="c"># Wrap in a protocol</span>
-  <span class="n">protocol</span> <span class="o">=</span> <span class="n">TBinaryProtocol</span><span class="o">.</span><span class="n">TBinaryProtocol</span><span class="p">(</span><span class="n">transport</span><span class="p">)</span></p>
-<p><span class="c"># Create a client to use the protocol encoder</span>
-  <span class="n">client</span> <span class="o">=</span> <span class="n">Calculator</span><span class="o">.</span><span class="n">Client</span><span class="p">(</span><span class="n">protocol</span><span class="p">)</span></p>
-<p><span class="c"># Connect!</span>
-  <span class="n">transport</span><span class="o">.</span><span class="n">open</span><span class="p">()</span></p>
-<p><span class="n">client</span><span class="o">.</span><span class="n">ping</span><span class="p">()</span>
-  <span class="k">print</span> <span class="s">&#39;ping()&#39;</span></p>
-<p><span class="nb">sum</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="mi">1</span><span class="p">)</span>
-  <span class="k">print</span> <span class="s">&#39;1+1=</span><span class="si">%d</span><span class="s">&#39;</span> <span class="o">%</span> <span class="p">(</span><span class="nb">sum</span><span class="p">)</span>
-</pre></div>
-  </div></p>
-<div class="tab-pane" id="3">
-
-<div class="codehilite"><pre>    <span class="k">try</span> <span class="o">{</span>
-      <span class="n">TServerTransport</span> <span class="n">serverTransport</span> <span class="o">=</span> <span class="k">new</span> <span class="n">TServerSocket</span><span class="o">(</span><span class="mi">9090</span><span class="o">);</span>
-      <span class="n">TServer</span> <span class="n">server</span> <span class="o">=</span> <span class="k">new</span> <span class="n">TSimpleServer</span><span class="o">(</span><span class="k">new</span> <span class="n">Args</span><span class="o">(</span><span class="n">serverTransport</span><span class="o">).</span><span class="na">processor</span><span class="o">(</span><span class="n">processor</span><span class="o">));</span>
-
-      <span class="c1">// Use this for a multithreaded server</span>
-      <span class="c1">// TServer server = new TThreadPoolServer(new TThreadPoolServer.Args(serverTransport).processor(processor));</span>
-
-      <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;Starting the simple server...&quot;</span><span class="o">);</span>
-      <span class="n">server</span><span class="o">.</span><span class="na">serve</span><span class="o">();</span>
-    <span class="o">}</span> <span class="k">catch</span> <span class="o">(</span><span class="n">Exception</span> <span class="n">e</span><span class="o">)</span> <span class="o">{</span>
-      <span class="n">e</span><span class="o">.</span><span class="na">printStackTrace</span><span class="o">();</span>
-    <span class="o">}</span>
-</pre></div>
-
-<p></div>
-  </div>
-</div></p>
+          <ul>
+<li><a href="/">Home</a></li>
+<li><a href="/about.html">About</a></li>
+<li><a href="/developers.html">Developers</a></li>
+<li><a href="/docs/">Index of docs/</a></li>
+<li><a href="/download.html">Download</a></li>
+<li><a href="/mailing.html">Mailing Lists</a></li>
+<li><a href="/tutorial/">Index of tutorial/</a></li>
+</ul>
 	</div>
 	<div class="container">
 	<hr>

Modified: websites/staging/thrift/trunk/content/sitemap.html
==============================================================================
--- websites/staging/thrift/trunk/content/sitemap.html (original)
+++ websites/staging/thrift/trunk/content/sitemap.html Sun Mar 23 00:02:34 2014
@@ -68,7 +68,7 @@
 
   	<div class="container">
           <ul>
-<li><a href="/">Home</a><ul>
+<li><a href="/">Index of //</a><ul>
 <li><a href="/about.html">About</a></li>
 <li><a href="/developers.html">Developers</a></li>
 <li><a href="/docs/">Index of docs/</a><ul>