Modified: websites/staging/thrift/trunk/content/docs/install/index.html
==============================================================================
--- websites/staging/thrift/trunk/content/docs/install/index.html (original)
+++ websites/staging/thrift/trunk/content/docs/install/index.html Sat Sep 26
12:54:26 2015
@@ -73,8 +73,31 @@
</div>
<div class="container">
- <hr />
+ <style type="text/css">
+/* The following code is added by mdx_elementid.py
+ It was originally lifted from http://subversion.apache.org/style/site.css */
+/*
+ * Hide class="elementid-permalink", except when an enclosing heading
+ * has the :hover property.
+ */
+.headerlink, .elementid-permalink {
+ visibility: hidden;
+}
+h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink,
h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink,
dt:hover > .elementid-permalink { visibility: visible }</style>
+<hr />
<p>Apache Thrift's compiler is written in C++ and designed to be portable, but
there are some system requirements which must be installed prior to use. Select
your os below for a guide on setting up your system to get started</p>
+<style type="text/css">
+/* The following code is added by mdx_elementid.py
+ It was originally lifted from http://subversion.apache.org/style/site.css */
+/*
+ * Hide class="elementid-permalink", except when an enclosing heading
+ * has the :hover property.
+ */
+.headerlink, .elementid-permalink {
+ visibility: hidden;
+}
+h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink,
h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink,
dt:hover > .elementid-permalink { visibility: visible }</style>
+
<ul>
<li><a href="/docs/install/centos">Centos 6.5 Install</a></li>
<li><a href="/docs/install/debian">Debian/Ubuntu install</a></li>
@@ -83,7 +106,7 @@
</ul>
<hr />
-<h2 id="basic-requirements">Basic requirements</h2>
+<h2 id="basic-requirements">Basic requirements<a class="headerlink"
href="#basic-requirements" title="Permanent link">¶</a></h2>
<ul>
<li>A relatively POSIX-compliant *NIX system<ul>
<li>Cygwin or MinGW can be used on Windows (but there are better options, see
below)</li>
@@ -93,7 +116,7 @@
<li>boost 1.53.0</li>
<li>Runtime libraries for lex and yacc might be needed for the compiler.</li>
</ul>
-<h2 id="requirements-for-building-from-source">Requirements for building from
source</h2>
+<h2 id="requirements-for-building-from-source">Requirements for building from
source<a class="headerlink" href="#requirements-for-building-from-source"
title="Permanent link">¶</a></h2>
<ul>
<li>GNU build tools: <ul>
<li>autoconf 2.65</li>
@@ -105,12 +128,12 @@
<li>lex and yacc (developed primarily with flex and bison)</li>
<li>libssl-dev</li>
</ul>
-<h2
id="requirements-for-building-the-compiler-from-source-on-windows">Requirements
for building the compiler from source on Windows</h2>
+<h2
id="requirements-for-building-the-compiler-from-source-on-windows">Requirements
for building the compiler from source on Windows<a class="headerlink"
href="#requirements-for-building-the-compiler-from-source-on-windows"
title="Permanent link">¶</a></h2>
<ul>
<li>Visual Studio C++ </li>
<li>Flex and Bison (e.g. the WinFlexBison package)</li>
</ul>
-<h2 id="language-requirements">Language requirements</h2>
+<h2 id="language-requirements">Language requirements<a class="headerlink"
href="#language-requirements" title="Permanent link">¶</a></h2>
<p>These are only required if you choose to build the libraries for the given
language</p>
<ul>
<li>C++<ul>
Modified: websites/staging/thrift/trunk/content/docs/install/os_x.html
==============================================================================
--- websites/staging/thrift/trunk/content/docs/install/os_x.html (original)
+++ websites/staging/thrift/trunk/content/docs/install/os_x.html Sat Sep 26
12:54:26 2015
@@ -73,16 +73,27 @@
</div>
<div class="container">
- <h2 id="os-x-setup">OS X Setup</h2>
+ <style type="text/css">
+/* The following code is added by mdx_elementid.py
+ It was originally lifted from http://subversion.apache.org/style/site.css */
+/*
+ * Hide class="elementid-permalink", except when an enclosing heading
+ * has the :hover property.
+ */
+.headerlink, .elementid-permalink {
+ visibility: hidden;
+}
+h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink,
h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink,
dt:hover > .elementid-permalink { visibility: visible }</style>
+<h2 id="os-x-setup">OS X Setup<a class="headerlink" href="#os-x-setup"
title="Permanent link">¶</a></h2>
<p>The following command install all the required tools and libraries to build
and install the Apache Thrift compiler on a OS X based system. </p>
-<h3 id="install-boost">Install Boost</h3>
+<h3 id="install-boost">Install Boost<a class="headerlink"
href="#install-boost" title="Permanent link">¶</a></h3>
<p>Download the boost library from <a
href="http://www.boost.org">boost.org</a> untar compile with</p>
<div class="codehilite"><pre><span class="o">./</span><span
class="n">bootstrap</span><span class="p">.</span><span class="n">sh</span>
<span class="n">sudo</span> <span class="o">./</span><span class="n">b2</span>
<span class="n">threading</span><span class="p">=</span><span
class="n">multi</span> <span class="n">address</span><span
class="o">-</span><span class="n">model</span><span class="p">=</span>64 <span
class="n">variant</span><span class="p">=</span><span class="n">release</span>
<span class="n">stage</span> <span class="n">install</span>
</pre></div>
-<h3 id="install-libevent">Install libevent</h3>
+<h3 id="install-libevent">Install libevent<a class="headerlink"
href="#install-libevent" title="Permanent link">¶</a></h3>
<p>Download <a href="http://monkey.org/~provos/libevent">libevent</a>, untar
and compile with</p>
<div class="codehilite"><pre><span class="o">./</span><span
class="n">configure</span> <span class="o">--</span><span
class="n">prefix</span><span class="p">=</span><span class="o">/</span><span
class="n">usr</span><span class="o">/</span><span class="n">local</span>
<span class="n">make</span>
@@ -90,13 +101,13 @@
</pre></div>
-<h3 id="building-apache-thrift">Building Apache Thrift</h3>
+<h3 id="building-apache-thrift">Building Apache Thrift<a class="headerlink"
href="#building-apache-thrift" title="Permanent link">¶</a></h3>
<p>Download the latest version of <a href="/download">Apache Thrift</a>, untar
and compile with</p>
<div class="codehilite"><pre><span class="o">./</span><span
class="n">configure</span> <span class="o">--</span><span
class="n">prefix</span><span class="p">=</span><span class="o">/</span><span
class="n">usr</span><span class="o">/</span><span class="n">local</span><span
class="o">/</span> <span class="o">--</span><span class="n">with</span><span
class="o">-</span><span class="n">boost</span><span class="p">=</span><span
class="o">/</span><span class="n">usr</span><span class="o">/</span><span
class="n">local</span> <span class="o">--</span><span
class="n">with</span><span class="o">-</span><span
class="n">libevent</span><span class="p">=</span><span class="o">/</span><span
class="n">usr</span><span class="o">/</span><span class="n">local</span>
</pre></div>
-<h2 id="additional-reading">Additional reading</h2>
+<h2 id="additional-reading">Additional reading<a class="headerlink"
href="#additional-reading" title="Permanent link">¶</a></h2>
<p>For more information on the requirements see: <a
href="/docs/install">Apache Thrift Requirements</a></p>
<p>For more information on building and installing Thrift see: <a
href="/docs/BuildingFromSource">Building from source</a></p>
<p class='snippet_footer'>
Modified: websites/staging/thrift/trunk/content/docs/install/windows.html
==============================================================================
--- websites/staging/thrift/trunk/content/docs/install/windows.html (original)
+++ websites/staging/thrift/trunk/content/docs/install/windows.html Sat Sep 26
12:54:26 2015
@@ -73,34 +73,45 @@
</div>
<div class="container">
- <h2 id="windows-setup">Windows Setup</h2>
+ <style type="text/css">
+/* The following code is added by mdx_elementid.py
+ It was originally lifted from http://subversion.apache.org/style/site.css */
+/*
+ * Hide class="elementid-permalink", except when an enclosing heading
+ * has the :hover property.
+ */
+.headerlink, .elementid-permalink {
+ visibility: hidden;
+}
+h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink,
h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink,
dt:hover > .elementid-permalink { visibility: visible }</style>
+<h2 id="windows-setup">Windows Setup<a class="headerlink"
href="#windows-setup" title="Permanent link">¶</a></h2>
<p>The Thrift environment consists of two main parts: The Thrift compiler EXE
and the language-dependent libraries. Most of these libraries will require some
kind of build and/or installation. But regarding the Thrift compiler utility
there are a number of different alternatives. </p>
<p>The first one of these alternatives is to download the <strong>pre-built
Thrift Compiler EXE</strong> and only build the libraries needed from source,
following one of the "Setup from source" methods outlined below.</p>
<p>The other two options are to build the Thrift compiler from source. The
most recommended way to achieve this is by means of the <strong>Visual Studio
C++ build project</strong>. Alternatively, the Thrift compiler can also be
built via <strong>Cygwin</strong> or <strong>MinGW</strong> build environments,
however this method is not only less comfortable, but more time-consuming and
requires much more manual effort. </p>
-<h2 id="prebuilt-thrift-compiler">Prebuilt Thrift compiler</h2>
+<h2 id="prebuilt-thrift-compiler">Prebuilt Thrift compiler<a
class="headerlink" href="#prebuilt-thrift-compiler" title="Permanent
link">¶</a></h2>
<p>The windows Thrift compiler is available as a prebuilt exe available <a
href="/download">here</a>. Note that there is no installation tool, rather this
EXE file <em>is</em> already the Thrift compiler utility. Download the file and
put it into some suitable location of your choice.</p>
<p>Now pick one of the "Build and install target libraries" below to
continue.</p>
-<h2 id="setup-from-source-via-visual-studio-c-recommended">Setup from source
via Visual Studio C++ (recommended)</h2>
-<h3 id="requirements">Requirements</h3>
+<h2 id="setup-from-source-via-visual-studio-c-recommended">Setup from source
via Visual Studio C++ (recommended)<a class="headerlink"
href="#setup-from-source-via-visual-studio-c-recommended" title="Permanent
link">¶</a></h2>
+<h3 id="requirements">Requirements<a class="headerlink" href="#requirements"
title="Permanent link">¶</a></h3>
<p>Thrift's compiler is written in C++ and designed to be portable, but there
are some system requirements. Thrift's runtime libraries are written in various
languages, which are also required for the particular language interface.</p>
<ul>
<li>Visual Studio C++, any recent version should do</li>
<li>Flex and Bison, e.g. the WinFlexBison package</li>
<li><a href="/docs/install">Apache Thrift Requirements</a></li>
</ul>
-<h3 id="build-and-install-the-compiler">Build and install the compiler</h3>
+<h3 id="build-and-install-the-compiler">Build and install the compiler<a
class="headerlink" href="#build-and-install-the-compiler" title="Permanent
link">¶</a></h3>
<p>After all requirements are in place, use the
<code>compiler/cpp/compiler.vcxproj</code> build project to build the Thrift
compiler. Copy the resulting EXE file to a location of your choice. </p>
-<h3 id="build-and-install-target-libraries">Build and install target
libraries</h3>
+<h3 id="build-and-install-target-libraries">Build and install target
libraries<a class="headerlink" href="#build-and-install-target-libraries"
title="Permanent link">¶</a></h3>
<p>A few of the target language libraries also do provide Visual Studio
project files, such as C++ and C#. These are located in the
<code>lib/<language>/</code> folders. </p>
<p>Most of the language packages must be built and installed manually using
build tools better suited to those languages. Typical examples are Java, Ruby,
Delphi, or PHP. Look for the <code>README.md</code> file in the
<code>lib/<language>/</code> folder for more details on how to build and
install each language's library package.</p>
-<h2 id="setup-from-source-via-cygwin">Setup from source via Cygwin</h2>
-<h3 id="requirements_1">Requirements</h3>
+<h2 id="setup-from-source-via-cygwin">Setup from source via Cygwin<a
class="headerlink" href="#setup-from-source-via-cygwin" title="Permanent
link">¶</a></h2>
+<h3 id="requirements_1">Requirements<a class="headerlink"
href="#requirements_1" title="Permanent link">¶</a></h3>
<p>Thrift's compiler is written in C++ and designed to be portable, but there
are some system requirements. Thrift's runtime libraries are written in various
languages, which are also required for the particular language interface.</p>
<ul>
<li>Cygwin or MinGW </li>
<li><a href="/docs/install">Apache Thrift Requirements</a></li>
</ul>
-<h3 id="installing-from-source">Installing from source</h3>
+<h3 id="installing-from-source">Installing from source<a class="headerlink"
href="#installing-from-source" title="Permanent link">¶</a></h3>
<p>If you are building from the first time out of the source repository, you
will need to generate the configure scripts. (This is not necessary if you
downloaded a tarball.) From the top directory, do:</p>
<div class="codehilite"><pre><span class="o">./</span><span
class="n">bootstrap</span><span class="p">.</span><span class="n">sh</span>
</pre></div>
@@ -124,11 +135,11 @@
</pre></div>
-<h3 id="build-and-install-target-libraries_1">Build and install target
libraries</h3>
+<h3 id="build-and-install-target-libraries_1">Build and install target
libraries<a class="headerlink" href="#build-and-install-target-libraries_1"
title="Permanent link">¶</a></h3>
<p>Some language packages must be installed manually using build tools better
suited to those languages. Typical examples are Java, Ruby, or PHP. Look for
the README file in the <code>lib/<language>/</code> folder for more
details on the installation of each language library package.</p>
-<h3 id="possible-issues-with-cygwin-install">Possible issues with Cygwin
install</h3>
+<h3 id="possible-issues-with-cygwin-install">Possible issues with Cygwin
install<a class="headerlink" href="#possible-issues-with-cygwin-install"
title="Permanent link">¶</a></h3>
<p>See also Possible issues with MinGW install.</p>
-<h4 id="syntax-error-in-configure">Syntax error in ./configure</h4>
+<h4 id="syntax-error-in-configure">Syntax error in ./configure<a
class="headerlink" href="#syntax-error-in-configure" title="Permanent
link">¶</a></h4>
<p>The following error occurs for some users when running ./configure:</p>
<div class="codehilite"><pre><span class="o">./</span><span
class="n">configure</span><span class="p">:</span> <span class="n">line</span>
21183<span class="p">:</span> <span class="n">syntax</span> <span
class="n">error</span> <span class="n">near</span> <span
class="n">unexpected</span> <span class="n">token</span> `<span
class="n">MONO</span><span class="p">,</span><span class="s">'</span>
<span class="s">./configure: line 21183: ` PKG_CHECK_MODULES(MONO, mono >=
1.2.6, have_mono=yes, have_mono=no)'</span>
@@ -141,7 +152,7 @@
<p>Finally, re-run ./bootstrap.sh and ./configure. (Note that pkg.m4 is
created by the pkg-config tool. If your /usr/share/aclocal directory doesn't
contain the pkg.m4 file, you may not have pkg-config installed.)</p>
-<h4 id="installing-perl-runtime-libraries">Installing perl runtime
libraries</h4>
+<h4 id="installing-perl-runtime-libraries">Installing perl runtime libraries<a
class="headerlink" href="#installing-perl-runtime-libraries" title="Permanent
link">¶</a></h4>
<p>Sometimes, there will be an error during the install of the perl libraries
with chmod.</p>
<p>A workaround is to avoid installing the perl libraries if they are not
needed.</p>
<p>If you don't need perl, run configure with --without-perl.</p>
@@ -150,7 +161,7 @@
</pre></div>
-<h4 id="linking-to-installed-c-runtime-libraries">Linking to installed C++
runtime libraries</h4>
+<h4 id="linking-to-installed-c-runtime-libraries">Linking to installed C++
runtime libraries<a class="headerlink"
href="#linking-to-installed-c-runtime-libraries" title="Permanent
link">¶</a></h4>
<p>Sometimes, the installed libthrift.a will not link using g++, with linker
errors about missing vtables and exceptions for Thrift classes.</p>
<p>A workaround is to link the compiled object files directly from your Thrift
build, corresponding to the missing classes.</p>
<p>This can be implemented in a Makefile using the following lines:</p>
@@ -164,12 +175,12 @@
</pre></div>
-<h4 id="c-runtime-segfault-with-cygwin-175-1-g-434-fork-and-throw">C++ runtime
segfault with cygwin 1.7.5-1, g++-4.3.4, fork() and throw</h4>
+<h4 id="c-runtime-segfault-with-cygwin-175-1-g-434-fork-and-throw">C++ runtime
segfault with cygwin 1.7.5-1, g++-4.3.4, fork() and throw<a class="headerlink"
href="#c-runtime-segfault-with-cygwin-175-1-g-434-fork-and-throw"
title="Permanent link">¶</a></h4>
<p>If your thrift C++ programs segfault on throw after fork()ing, compile them
with g++-3.</p>
<p>The issue and patch are described on the Cygwin mailing list at
http://cygwin.com/ml/cygwin/2010-05/msg00203.html</p>
<p>This issue should be fixed in Cygwin versions after 1.7.5-1, or g++
4.5.0.</p>
-<h2 id="setup-from-source-via-mingw">Setup from source via MinGW</h2>
-<h3 id="requirements_2">Requirements</h3>
+<h2 id="setup-from-source-via-mingw">Setup from source via MinGW<a
class="headerlink" href="#setup-from-source-via-mingw" title="Permanent
link">¶</a></h2>
+<h3 id="requirements_2">Requirements<a class="headerlink"
href="#requirements_2" title="Permanent link">¶</a></h3>
<p>To compile the Thrift generator & runtime libraries (untested) without
the cygwin.dll dependency you need to install MinGW (www.mingw.org). </p>
<ul>
<li>MinGW </li>
@@ -211,19 +222,19 @@
</pre></div>
-<h3 id="possible-issues-with-mingw-install">Possible issues with MinGW
install</h3>
+<h3 id="possible-issues-with-mingw-install">Possible issues with MinGW
install<a class="headerlink" href="#possible-issues-with-mingw-install"
title="Permanent link">¶</a></h3>
<p>See also Possible issues with Cygwin install, including the discussion
about PTHREAD_MUTEX_RECURSIVE_NP.</p>
-<h4 id="yywrap-is-not-found">yywrap is not found</h4>
+<h4 id="yywrap-is-not-found">yywrap is not found<a class="headerlink"
href="#yywrap-is-not-found" title="Permanent link">¶</a></h4>
<p>Make sure you add -lfl in your cxxflags in Makefile, also try adding
-Lc:/cygwin/libs</p>
-<h4 id="boost-is-not-found">boost is not found</h4>
+<h4 id="boost-is-not-found">boost is not found<a class="headerlink"
href="#boost-is-not-found" title="Permanent link">¶</a></h4>
<p>Try and change the include dir to use the windows path from c like this:
Edit compiler/cpp/Makefile, look for the declaration of BOOST_CPPFLAGS, change
that line for</p>
<div class="codehilite"><pre><span class="n">BOOST_CPPFLAGS</span> <span
class="p">=</span> <span class="o">-</span><span class="n">Ic</span><span
class="p">:</span><span class="o">/</span><span class="n">cygwin</span><span
class="o">/</span><span class="n">usr</span><span class="o">/</span><span
class="n">include</span><span class="o">/</span><span
class="n">boost</span><span class="o">-</span>1<span class="n">_53_0</span>
</pre></div>
-<h4 id="realpath-is-not-found">realpath is not found</h4>
+<h4 id="realpath-is-not-found">realpath is not found<a class="headerlink"
href="#realpath-is-not-found" title="Permanent link">¶</a></h4>
<p>add -DMINGW -mno-cygwin to the CXXDEFS variable in Makefile</p>
-<h2 id="additional-reading">Additional reading</h2>
+<h2 id="additional-reading">Additional reading<a class="headerlink"
href="#additional-reading" title="Permanent link">¶</a></h2>
<p>For more information on the requirements see: <a
href="/docs/install">Apache Thrift Requirements</a></p>
<p>For more information on building and installing Thrift see: <a
href="/docs/BuildingFromSource">Building from source</a></p>
<p class='snippet_footer'>
Modified: websites/staging/thrift/trunk/content/docs/types.html
==============================================================================
--- websites/staging/thrift/trunk/content/docs/types.html (original)
+++ websites/staging/thrift/trunk/content/docs/types.html Sat Sep 26 12:54:26
2015
@@ -73,9 +73,20 @@
</div>
<div class="container">
- <h2 id="thrift-types">Thrift Types</h2>
+ <style type="text/css">
+/* The following code is added by mdx_elementid.py
+ It was originally lifted from http://subversion.apache.org/style/site.css */
+/*
+ * Hide class="elementid-permalink", except when an enclosing heading
+ * has the :hover property.
+ */
+.headerlink, .elementid-permalink {
+ visibility: hidden;
+}
+h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink,
h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink,
dt:hover > .elementid-permalink { visibility: visible }</style>
+<h2 id="thrift-types">Thrift Types<a class="headerlink" href="#thrift-types"
title="Permanent link">¶</a></h2>
<p>The Thrift type system is intended to allow programmers to use native types
as much as possible, no matter what programming language they are working in.
This information is based on, and supersedes, the information in the <a
href="/static/files/thrift-20070401.pdf">Thrift Whitepaper</a>. The <a
href="/docs/idl">Thrift IDL</a> provides descriptions of the types which are
used to generate code for each target language.</p>
-<h3 id="base-types">Base Types</h3>
+<h3 id="base-types">Base Types<a class="headerlink" href="#base-types"
title="Permanent link">¶</a></h3>
<p>The base types were selected with the goal of simplicity and clarity rather
than abundance, focusing on the key types available in all programming
languages.</p>
<ul>
<li>bool: A boolean value (true or false)</li>
@@ -87,12 +98,12 @@
<li>string: A text string encoded using UTF-8 encoding</li>
</ul>
<p>Note the absence of unsigned integer types. This is due to the fact that
there are no native unsigned integer types in many programming languages.</p>
-<h3 id="special-types">Special Types</h3>
+<h3 id="special-types">Special Types<a class="headerlink"
href="#special-types" title="Permanent link">¶</a></h3>
<p>binary: a sequence of unencoded bytes</p>
<p>N.B.: This is currently a specialized form of the string type above, added
to provide better interoperability with Java. The current plan-of-record is to
elevate this to a base type at some point.</p>
-<h3 id="structs">Structs</h3>
+<h3 id="structs">Structs<a class="headerlink" href="#structs" title="Permanent
link">¶</a></h3>
<p>Thrift structs define a common object -- they are essentially equivalent to
classes in OOP languages, but without inheritance. A struct has a set of
strongly typed fields, each with a unique name identifier. Fields may have
various annotations (numeric field IDs, optional default values, etc.) that are
described in the <a href="/docs/idl">Thrift IDL</a>.</p>
-<h3 id="containers">Containers</h3>
+<h3 id="containers">Containers<a class="headerlink" href="#containers"
title="Permanent link">¶</a></h3>
<p>Thrift containers are strongly typed containers that map to commonly used
and commonly available container types in most programming languages.</p>
<p>There are three container types:</p>
<p>list<type>: An ordered list of elements. Translates to an STL vector, Java
ArrayList, native arrays in scripting languages, etc.
@@ -101,9 +112,9 @@ map<type1,type2>: A map of strictly uniq
While defaults are provided, the type mappings are not explicitly fixed.
Custom code generator directives have been added to allow substitution of
custom types in various destination languages.</p>
<p>Container elements may be of any valid Thrift Type.</p>
<p>N.B.: For maximal compatibility, the key type for map should be a basic
type rather than a struct or container type. There are some languages which do
not support more complex key types in their native map types. In addition the
JSON protocol only supports key types that are base types.</p>
-<h3 id="exceptions">Exceptions</h3>
+<h3 id="exceptions">Exceptions<a class="headerlink" href="#exceptions"
title="Permanent link">¶</a></h3>
<p>Exceptions are functionally equivalent to structs, except that they inherit
from the native exception base class as appropriate in each target programming
language, in order to seamlessly integrate with the native exception handling
in any given language.</p>
-<h3 id="services">Services</h3>
+<h3 id="services">Services<a class="headerlink" href="#services"
title="Permanent link">¶</a></h3>
<p>Services are defined using Thrift types. Definition of a service is
semantically equivalent to defining an interface (or a pure virtual abstract
class) in object oriented programming. The Thrift compiler generates fully
functional client and server stubs that implement the interface.</p>
<p>A service consists of a set of named functions, each with a list of
parameters and a return type.</p>
<p>Note that void is a valid type for a function return, in addition to all
other defined Thrift types. Additionally, an oneway modifier keyword may be
added to a void function, which will generate code that does not wait for a
response. Note that a pure void function will return a response to the client
which guarantees that the operation has completed on the server side. With
oneway method calls the client will only be guaranteed that the request
succeeded at the transport layer. Oneway method calls of the same client may be
executed in parallel/out of order by the server.</p>
Modified: websites/staging/thrift/trunk/content/download.html
==============================================================================
--- websites/staging/thrift/trunk/content/download.html (original)
+++ websites/staging/thrift/trunk/content/download.html Sat Sep 26 12:54:26 2015
@@ -73,14 +73,25 @@
</div>
<div class="container">
- <h2 id="release">Release</h2>
+ <style type="text/css">
+/* The following code is added by mdx_elementid.py
+ It was originally lifted from http://subversion.apache.org/style/site.css */
+/*
+ * Hide class="elementid-permalink", except when an enclosing heading
+ * has the :hover property.
+ */
+.headerlink, .elementid-permalink {
+ visibility: hidden;
+}
+h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink,
h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink,
dt:hover > .elementid-permalink { visibility: visible }</style>
+<h2 id="release">Release<a class="headerlink" href="#release" title="Permanent
link">¶</a></h2>
<p>The latest stable release of Thrift is 0.9.2 (released on 2014-11-07).</p>
<ul>
<li><a
href="http://www.apache.org/dyn/closer.cgi?path=/thrift/0.9.2/thrift-0.9.2.tar.gz">thrift-0.9.2.tar.gz</a>
[<a
href="https://www.apache.org/dist/thrift/0.9.2/thrift-0.9.2.tar.gz.asc">PGP</a>]
[<a
href="https://www.apache.org/dist/thrift/0.9.2/thrift-0.9.2.tar.gz.md5">MD5</a>]</li>
<li><a
href="http://www.apache.org/dyn/closer.cgi?path=/thrift/0.9.2/thrift-0.9.2.exe">Thrift
compiler for Windows (thrift-0.9.2.exe)</a> [<a
href="https://www.apache.org/dist/thrift/0.9.2/thrift-0.9.2.exe.asc">PGP</a>]
[<a
href="https://www.apache.org/dist/thrift/0.9.2/thrift-0.9.2.exe.md5">MD5</a>]</li>
</ul>
-<h2 id="maven-artifact">Maven artifact</h2>
+<h2 id="maven-artifact">Maven artifact<a class="headerlink"
href="#maven-artifact" title="Permanent link">¶</a></h2>
<p><pre><code>
<dependency>
<groupId>org.apache.thrift</groupId>
@@ -90,11 +101,11 @@
</code></pre></p>
<p>When downloading from a mirror, please be sure to <a
href="http://www.apache.org/info/verification.html">verify</a> the checksums
and signature (see the MD5 and PGP links above). The <a
href="https://www.apache.org/dist/thrift/KEYS">KEYS</a> file contains the
public key(s) used for signing releases.</p>
<hr />
-<h2 id="incubator-releases">Incubator Releases</h2>
+<h2 id="incubator-releases">Incubator Releases<a class="headerlink"
href="#incubator-releases" title="Permanent link">¶</a></h2>
<p>Releases from the incubator ( less than 0.6.0 ) are available at the <a
href="http://archive.apache.org/dist/incubator/thrift">Thrift Incubator
Archive</a></p>
<p>Releases from 0.6.0 up to the current release are available at the <a
href="http://archive.apache.org/dist/thrift">Apache Thrift Archive</a></p>
<hr />
-<h2 id="git-checkout">GIT Checkout</h2>
+<h2 id="git-checkout">GIT Checkout<a class="headerlink" href="#git-checkout"
title="Permanent link">¶</a></h2>
<p>For those who would like to participate in Thrift development, you may
checkout Thrift from the <a
href="https://git-wip-us.apache.org/repos/asf?p=thrift.git">Apache GIT
repository</a>.
<pre><code>
git clone https://git-wip-us.apache.org/repos/asf/thrift.git thrift
Modified: websites/staging/thrift/trunk/content/index.html
==============================================================================
--- websites/staging/thrift/trunk/content/index.html (original)
+++ websites/staging/thrift/trunk/content/index.html Sat Sep 26 12:54:26 2015
@@ -143,7 +143,18 @@
</ul>
<div class="tab-content">
<div class="tab-pane active" id="1">
- <div class="codehilite"><pre> */
+ <style type="text/css">
+/* The following code is added by mdx_elementid.py
+ It was originally lifted from http://subversion.apache.org/style/site.css */
+/*
+ * Hide class="elementid-permalink", except when an enclosing heading
+ * has the :hover property.
+ */
+.headerlink, .elementid-permalink {
+ visibility: hidden;
+}
+h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink,
h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink,
dt:hover > .elementid-permalink { visibility: visible }</style>
+<div class="codehilite"><pre> */
service Calculator extends shared.SharedService {
/**
@@ -173,7 +184,18 @@ service Calculator extends shared.Shared
</div>
<div class="tab-pane" id="2">
- <div class="codehilite"><pre> <span class="c"># Make socket</span>
+ <style type="text/css">
+/* The following code is added by mdx_elementid.py
+ It was originally lifted from http://subversion.apache.org/style/site.css */
+/*
+ * Hide class="elementid-permalink", except when an enclosing heading
+ * has the :hover property.
+ */
+.headerlink, .elementid-permalink {
+ visibility: hidden;
+}
+h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink,
h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink,
dt:hover > .elementid-permalink { visibility: visible }</style>
+<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">'localhost'</span><span class="p">,</span> <span
class="mi">9090</span><span class="p">)</span>
<span class="c"># Buffering is critical. Raw sockets are very slow</span>
@@ -202,7 +224,18 @@ service Calculator extends shared.Shared
</div>
<div class="tab-pane" id="3">
Initialize the Server:
- <div class="codehilite"><pre> <span class="k">try</span> <span
class="o">{</span>
+ <style type="text/css">
+/* The following code is added by mdx_elementid.py
+ It was originally lifted from http://subversion.apache.org/style/site.css */
+/*
+ * Hide class="elementid-permalink", except when an enclosing heading
+ * has the :hover property.
+ */
+.headerlink, .elementid-permalink {
+ visibility: hidden;
+}
+h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink,
h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink,
dt:hover > .elementid-permalink { visibility: visible }</style>
+<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>
@@ -222,7 +255,18 @@ service Calculator extends shared.Shared
The CalculatorHandler:
- <div class="codehilite"><pre><span class="kd">public</span> <span
class="kd">class</span> <span class="nc">CalculatorHandler</span> <span
class="kd">implements</span> <span class="n">Calculator</span><span
class="o">.</span><span class="na">Iface</span> <span class="o">{</span>
+ <style type="text/css">
+/* The following code is added by mdx_elementid.py
+ It was originally lifted from http://subversion.apache.org/style/site.css */
+/*
+ * Hide class="elementid-permalink", except when an enclosing heading
+ * has the :hover property.
+ */
+.headerlink, .elementid-permalink {
+ visibility: hidden;
+}
+h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink,
h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink,
dt:hover > .elementid-permalink { visibility: visible }</style>
+<div class="codehilite"><pre><span class="kd">public</span> <span
class="kd">class</span> <span class="nc">CalculatorHandler</span> <span
class="kd">implements</span> <span class="n">Calculator</span><span
class="o">.</span><span class="na">Iface</span> <span class="o">{</span>
<span class="kd">private</span> <span class="n">HashMap</span><span
class="o"><</span><span class="n">Integer</span><span
class="o">,</span><span class="n">SharedStruct</span><span
class="o">></span> <span class="n">log</span><span class="o">;</span>
@@ -255,7 +299,7 @@ service Calculator extends shared.Shared
<span class="k">case</span> <span class="nl">DIVIDE:</span>
<span class="k">if</span> <span class="o">(</span><span
class="n">work</span><span class="o">.</span><span class="na">num2</span> <span
class="o">==</span> <span class="mi">0</span><span class="o">)</span> <span
class="o">{</span>
<span class="n">InvalidOperation</span> <span class="n">io</span>
<span class="o">=</span> <span class="k">new</span> <span
class="n">InvalidOperation</span><span class="o">();</span>
- <span class="n">io</span><span class="o">.</span><span
class="na">what</span> <span class="o">=</span> <span
class="n">work</span><span class="o">.</span><span class="na">op</span><span
class="o">.</span><span class="na">getValue</span><span class="o">();</span>
+ <span class="n">io</span><span class="o">.</span><span
class="na">whatOp</span> <span class="o">=</span> <span
class="n">work</span><span class="o">.</span><span class="na">op</span><span
class="o">.</span><span class="na">getValue</span><span class="o">();</span>
<span class="n">io</span><span class="o">.</span><span
class="na">why</span> <span class="o">=</span> <span class="s">"Cannot
divide by 0"</span><span class="o">;</span>
<span class="k">throw</span> <span class="n">io</span><span
class="o">;</span>
<span class="o">}</span>
@@ -263,7 +307,7 @@ service Calculator extends shared.Shared
<span class="k">break</span><span class="o">;</span>
<span class="k">default</span><span class="o">:</span>
<span class="n">InvalidOperation</span> <span class="n">io</span> <span
class="o">=</span> <span class="k">new</span> <span
class="n">InvalidOperation</span><span class="o">();</span>
- <span class="n">io</span><span class="o">.</span><span
class="na">what</span> <span class="o">=</span> <span
class="n">work</span><span class="o">.</span><span class="na">op</span><span
class="o">.</span><span class="na">getValue</span><span class="o">();</span>
+ <span class="n">io</span><span class="o">.</span><span
class="na">whatOp</span> <span class="o">=</span> <span
class="n">work</span><span class="o">.</span><span class="na">op</span><span
class="o">.</span><span class="na">getValue</span><span class="o">();</span>
<span class="n">io</span><span class="o">.</span><span
class="na">why</span> <span class="o">=</span> <span class="s">"Unknown
operation"</span><span class="o">;</span>
<span class="k">throw</span> <span class="n">io</span><span
class="o">;</span>
<span class="o">}</span>
Modified: websites/staging/thrift/trunk/content/lib/c_glib.html
==============================================================================
--- websites/staging/thrift/trunk/content/lib/c_glib.html (original)
+++ websites/staging/thrift/trunk/content/lib/c_glib.html Sat Sep 26 12:54:26
2015
@@ -73,10 +73,21 @@
</div>
<div class="container">
- <h1 id="using-thrift-with-c">Using Thrift with C</h1>
+ <style type="text/css">
+/* The following code is added by mdx_elementid.py
+ It was originally lifted from http://subversion.apache.org/style/site.css */
+/*
+ * Hide class="elementid-permalink", except when an enclosing heading
+ * has the :hover property.
+ */
+.headerlink, .elementid-permalink {
+ visibility: hidden;
+}
+h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink,
h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink,
dt:hover > .elementid-permalink { visibility: visible }</style>
+<h1 id="using-thrift-with-c">Using Thrift with C<a class="headerlink"
href="#using-thrift-with-c" title="Permanent link">¶</a></h1>
<p>The Thrift C libraries are built using the GNU tools. Follow the
instructions
in the top-level README in order to generate the Makefiles.</p>
-<h1 id="dependencies">Dependencies</h1>
+<h1 id="dependencies">Dependencies<a class="headerlink" href="#dependencies"
title="Permanent link">¶</a></h1>
<p>GLib
http://www.gtk.org/
<p class='snippet_footer'>
Modified: websites/staging/thrift/trunk/content/lib/cpp.html
==============================================================================
--- websites/staging/thrift/trunk/content/lib/cpp.html (original)
+++ websites/staging/thrift/trunk/content/lib/cpp.html Sat Sep 26 12:54:26 2015
@@ -73,7 +73,18 @@
</div>
<div class="container">
- <h1 id="using-thrift-with-c">Using Thrift with C++</h1>
+ <style type="text/css">
+/* The following code is added by mdx_elementid.py
+ It was originally lifted from http://subversion.apache.org/style/site.css */
+/*
+ * Hide class="elementid-permalink", except when an enclosing heading
+ * has the :hover property.
+ */
+.headerlink, .elementid-permalink {
+ visibility: hidden;
+}
+h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink,
h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink,
dt:hover > .elementid-permalink { visibility: visible }</style>
+<h1 id="using-thrift-with-c">Using Thrift with C++<a class="headerlink"
href="#using-thrift-with-c" title="Permanent link">¶</a></h1>
<p>The Thrift C++ libraries are built using the GNU tools. Follow the
instructions
in the top-level README.md</p>
<p>In case you do not want to open another README.md file, do this thrift
src:</p>
@@ -95,7 +106,7 @@ in the top-level README.md</p>
To link this library you will also need to link libevent.</p>
</li>
</ul>
-<h2 id="linking-against-thrift">Linking Against Thrift</h2>
+<h2 id="linking-against-thrift">Linking Against Thrift<a class="headerlink"
href="#linking-against-thrift" title="Permanent link">¶</a></h2>
<p>After you build and install Thrift the libraries are installed to
/usr/local/lib by default. Make sure this is in your LDPATH.</p>
<p>On Linux, the best way to do this is to ensure that /usr/local/lib is in
@@ -104,12 +115,12 @@ your /etc/ld.so.conf and then run /sbin/
your build environment it set up, you may need to include additional
libraries when linking against thrift, such as librt and/or libpthread. If
you are using libthriftnb you will also need libevent.</p>
-<h2 id="dependencies">Dependencies</h2>
+<h2 id="dependencies">Dependencies<a class="headerlink" href="#dependencies"
title="Permanent link">¶</a></h2>
<p>boost shared pointers
http://www.boost.org/libs/smart_ptr/smart_ptr.htm</p>
<p>libevent (for libthriftnb only)
http://monkey.org/~provos/libevent/</p>
-<h1 id="using-thrift-with-c-on-windows">Using Thrift with C++ on Windows</h1>
+<h1 id="using-thrift-with-c-on-windows">Using Thrift with C++ on Windows<a
class="headerlink" href="#using-thrift-with-c-on-windows" title="Permanent
link">¶</a></h1>
<p>You need to define an environment variables for 3rd party components
separately:</p>
<p>BOOST_ROOT : For boost, e.g. D:\boost_1_55_0
OPENSSL_ROOT_DIR : For OpenSSL, e.g. D:\OpenSSL-Win32</p>
@@ -127,20 +138,20 @@ OPENSSL_ROOT_DIR : For OpenSSL, e.g. D:\
To link this library you will also need to link libevent.</p>
</li>
</ul>
-<h2 id="linking-against-thrift_1">Linking Against Thrift</h2>
+<h2 id="linking-against-thrift_1">Linking Against Thrift<a class="headerlink"
href="#linking-against-thrift_1" title="Permanent link">¶</a></h2>
<p>You need to link your project that uses thrift against all the thrift
dependencies; in the case of libthrift, boost and for
libthriftnb, libevent.</p>
<p>In the project properties you must also set HAVE_CONFIG_H as force include
the config header: "windows/confg.h"</p>
-<h2 id="dependencies_1">Dependencies</h2>
+<h2 id="dependencies_1">Dependencies<a class="headerlink"
href="#dependencies_1" title="Permanent link">¶</a></h2>
<p>boost shared pointers
http://www.boost.org/libs/smart_ptr/smart_ptr.htm</p>
<p>boost thread
http://www.boost.org/doc/libs/release/doc/html/thread.html</p>
<p>libevent (for libthriftnb only)
http://monkey.org/~provos/libevent/</p>
-<h2 id="notes-on-boost-thread-static-vs-shared">Notes on boost thread (static
vs shared):</h2>
+<h2 id="notes-on-boost-thread-static-vs-shared">Notes on boost thread (static
vs shared):<a class="headerlink" href="#notes-on-boost-thread-static-vs-shared"
title="Permanent link">¶</a></h2>
<p>By default lib/cpp/windows/force_inc.h defines:</p>
<div class="codehilite"><pre><span class="c">#define BOOST_ALL_NO_LIB 1</span>
<span class="c">#define BOOST_THREAD_NO_LIB 1</span>
@@ -151,7 +162,7 @@ http://monkey.org/~provos/libevent/</p>
to have to link with boost thread as a static library.</p>
<p>If you wanted instead to link with boost thread as a shared library,
you'll need to uncomment those two lines, and recompile.</p>
-<h2 id="windows-version-compatibility">Windows version compatibility</h2>
+<h2 id="windows-version-compatibility">Windows version compatibility<a
class="headerlink" href="#windows-version-compatibility" title="Permanent
link">¶</a></h2>
<p>The Thrift library targets Windows XP for broadest compatbility. A notable
difference is in the Windows-specific implementation of the socket poll
function. To target Vista, Win7 or other versions, comment out the line</p>
@@ -159,22 +170,22 @@ function. To target Vista, Win7 or other
</pre></div>
-<h2 id="named-pipes">Named Pipes</h2>
+<h2 id="named-pipes">Named Pipes<a class="headerlink" href="#named-pipes"
title="Permanent link">¶</a></h2>
<p>Named Pipe transport has been added in the TPipe and TPipeServer classes.
This
is currently Windows-only. Named pipe transport for <em>NIX has not been
implemented. Domain sockets are a better choice for local IPC under non-Windows
OS's. </em>NIX named pipes only support 1:1 client-server connection.</p>
-<h1 id="thriftssl">Thrift/SSL</h1>
-<h2 id="scope">Scope</h2>
+<h1 id="thriftssl">Thrift/SSL<a class="headerlink" href="#thriftssl"
title="Permanent link">¶</a></h1>
+<h2 id="scope">Scope<a class="headerlink" href="#scope" title="Permanent
link">¶</a></h2>
<p>This SSL only supports blocking mode socket I/O. It can only be used with
TSimpleServer, TThreadedServer, and TThreadPoolServer.</p>
-<h2 id="implementation">Implementation</h2>
+<h2 id="implementation">Implementation<a class="headerlink"
href="#implementation" title="Permanent link">¶</a></h2>
<p>There're two main classes TSSLSocketFactory and TSSLSocket. Instances of
TSSLSocket are always created from TSSLSocketFactory.</p>
<p>PosixSSLThreadFactory creates PosixSSLThread. The only difference from the
PthreadThread type is that it cleanups OpenSSL error queue upon exiting
the thread. Ideally, OpenSSL APIs should only be called from
PosixSSLThread.</p>
-<h2 id="how-to-use-ssl-apis">How to use SSL APIs</h2>
+<h2 id="how-to-use-ssl-apis">How to use SSL APIs<a class="headerlink"
href="#how-to-use-ssl-apis" title="Permanent link">¶</a></h2>
<p>This is for demo. In real code, typically only one TSSLSocketFactory
instance is needed.</p>
<div class="codehilite"><pre><span class="n">shared_ptr</span><span
class="o"><</span><span class="n">TSSLSocketFactory</span><span
class="o">></span> <span class="n">getSSLSocketFactory</span><span
class="p">()</span> <span class="p">{</span>
@@ -210,7 +221,7 @@ instance is needed.</p>
</pre></div>
-<h2 id="accessmanager">AccessManager</h2>
+<h2 id="accessmanager">AccessManager<a class="headerlink"
href="#accessmanager" title="Permanent link">¶</a></h2>
<p>AccessManager defines a callback interface. It has three callback
methods:</p>
<p>(a) Decision verify(const sockaddr_storage& sa);</p>
<p>(b) Decision verify(const string& host, const char* name, int size);</p>
@@ -248,12 +259,12 @@ examined. At that point, if there's stil
terminated.</p>
<p>Thread safety, an access manager should not store state information if it's
to be used by many SSL sockets.</p>
-<h2 id="sigpipe-signal">SIGPIPE signal</h2>
+<h2 id="sigpipe-signal">SIGPIPE signal<a class="headerlink"
href="#sigpipe-signal" title="Permanent link">¶</a></h2>
<p>Applications running OpenSSL over network connections may crash if SIGPIPE
is not ignored. This happens when they receive a connection reset by remote
peer exception, which somehow triggers a SIGPIPE signal. If not handled,
this signal would kill the application.</p>
-<h2 id="how-to-run-test-clientserver-in-ssl-mode">How to run test
client/server in SSL mode</h2>
+<h2 id="how-to-run-test-clientserver-in-ssl-mode">How to run test
client/server in SSL mode<a class="headerlink"
href="#how-to-run-test-clientserver-in-ssl-mode" title="Permanent
link">¶</a></h2>
<p>The server and client expects the followings from the directory /test/</p>
<ul>
<li>keys/server.crt</li>
@@ -276,7 +287,7 @@ one of the followings is included in "ke
<p>If "-h <host>" is used to run client, the above "localhost" in the above
keys/server.crt has to be replaced with that host name.</p>
-<h2 id="tsslsocketfactoryrandomize">TSSLSocketFactory::randomize()</h2>
+<h2 id="tsslsocketfactoryrandomize">TSSLSocketFactory::randomize()<a
class="headerlink" href="#tsslsocketfactoryrandomize" title="Permanent
link">¶</a></h2>
<p>The default implementation of OpenSSLSocketFactory::randomize() simply calls
OpenSSL's RAND_poll() when OpenSSL library is first initialized.</p>
<p>The PRNG seed is key to the application security. This method should be
Modified: websites/staging/thrift/trunk/content/lib/csharp.html
==============================================================================
--- websites/staging/thrift/trunk/content/lib/csharp.html (original)
+++ websites/staging/thrift/trunk/content/lib/csharp.html Sat Sep 26 12:54:26
2015
@@ -73,7 +73,18 @@
</div>
<div class="container">
- <h1 id="using-thrift-with-c">Using Thrift with C#</h1>
+ <style type="text/css">
+/* The following code is added by mdx_elementid.py
+ It was originally lifted from http://subversion.apache.org/style/site.css */
+/*
+ * Hide class="elementid-permalink", except when an enclosing heading
+ * has the :hover property.
+ */
+.headerlink, .elementid-permalink {
+ visibility: hidden;
+}
+h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink,
h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink,
dt:hover > .elementid-permalink { visibility: visible }</style>
+<h1 id="using-thrift-with-c">Using Thrift with C#<a class="headerlink"
href="#using-thrift-with-c" title="Permanent link">¶</a></h1>
<p>Thrift requires Mono >= 1.2.6 or .NET framework >= 3.5
<p class='snippet_footer'>
This page was generated by Apache Thrift's <strong>source tree docs</strong>:
Modified: websites/staging/thrift/trunk/content/lib/d.html
==============================================================================
--- websites/staging/thrift/trunk/content/lib/d.html (original)
+++ websites/staging/thrift/trunk/content/lib/d.html Sat Sep 26 12:54:26 2015
@@ -73,7 +73,18 @@
</div>
<div class="container">
- <h2 id="testing">Testing</h2>
+ <style type="text/css">
+/* The following code is added by mdx_elementid.py
+ It was originally lifted from http://subversion.apache.org/style/site.css */
+/*
+ * Hide class="elementid-permalink", except when an enclosing heading
+ * has the :hover property.
+ */
+.headerlink, .elementid-permalink {
+ visibility: hidden;
+}
+h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink,
h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink,
dt:hover > .elementid-permalink { visibility: visible }</style>
+<h2 id="testing">Testing<a class="headerlink" href="#testing" title="Permanent
link">¶</a></h2>
<p>D support in Thrift is covered by two sets of tests: first,
the unit test blocks contained in the D source files, and
second, the more extensive testing applications in the test/
Modified: websites/staging/thrift/trunk/content/lib/delphi.html
==============================================================================
--- websites/staging/thrift/trunk/content/lib/delphi.html (original)
+++ websites/staging/thrift/trunk/content/lib/delphi.html Sat Sep 26 12:54:26
2015
@@ -73,7 +73,18 @@
</div>
<div class="container">
- <h1 id="using-thrift-with-delphi">Using Thrift with Delphi</h1>
+ <style type="text/css">
+/* The following code is added by mdx_elementid.py
+ It was originally lifted from http://subversion.apache.org/style/site.css */
+/*
+ * Hide class="elementid-permalink", except when an enclosing heading
+ * has the :hover property.
+ */
+.headerlink, .elementid-permalink {
+ visibility: hidden;
+}
+h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink,
h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink,
dt:hover > .elementid-permalink { visibility: visible }</style>
+<h1 id="using-thrift-with-delphi">Using Thrift with Delphi<a
class="headerlink" href="#using-thrift-with-delphi" title="Permanent
link">¶</a></h1>
<p>The Thrift Delphi Library requires at least Delphi 2010.</p>
<p>Because the Library heavily relies on generics, using it
with earlier versions (such as Delphi 7) will <em>not</em> work.
Modified: websites/staging/thrift/trunk/content/lib/erl.html
==============================================================================
--- websites/staging/thrift/trunk/content/lib/erl.html (original)
+++ websites/staging/thrift/trunk/content/lib/erl.html Sat Sep 26 12:54:26 2015
@@ -73,14 +73,26 @@
</div>
<div class="container">
- <h2 id="release-notes">Release Notes</h2>
-<h3 id="092">0.9.2</h3>
+ <style type="text/css">
+/* The following code is added by mdx_elementid.py
+ It was originally lifted from http://subversion.apache.org/style/site.css */
+/*
+ * Hide class="elementid-permalink", except when an enclosing heading
+ * has the :hover property.
+ */
+.headerlink, .elementid-permalink {
+ visibility: hidden;
+}
+h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink,
h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink,
dt:hover > .elementid-permalink { visibility: visible }</style>
+<h2 id="release-notes">Release Notes<a class="headerlink"
href="#release-notes" title="Permanent link">¶</a></h2>
+<h3 id="092">0.9.2<a class="headerlink" href="#092" title="Permanent
link">¶</a></h3>
<p>as of 0.9.2 struct and function naming conventions have changed. to retain
the
old naming conventions (for backwards compatibility) use the compiler option
<code>legacynames</code></p>
-<h2 id="example">Example</h2>
+<h2 id="example">Example<a class="headerlink" href="#example" title="Permanent
link">¶</a></h2>
<p>Example session using thrift_client:</p>
-<p>1> {ok, C0} = thrift_client_util:new("localhost", 9090,
thriftTest_thrift, []), ok.
+<p><code>erl
+1> {ok, C0} = thrift_client_util:new("localhost", 9090, thrift_test_thrift,
[]), ok.
ok
2> {C1, R1} = thrift_client:call(C0, testVoid, []), R1.
{ok,ok}
@@ -95,7 +107,7 @@ ok
7> {C6, R6} = thrift_client:call(C5, testException, ["foo"]), R6.
{ok,ok}
8> {C7, R7} = (catch thrift_client:call(C6, testException, ["Xception"])),
R7.
-{exception,{xception,1001,<<"Xception">>}}
+{exception,{xception,1001,<<"Xception">>}}</code>
<p class='snippet_footer'>
This page was generated by Apache Thrift's <strong>source tree docs</strong>:
<a
href="http://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob;f=lib/erl/README.md;hb=HEAD"</a>lib/erl/README.md</a>
Modified: websites/staging/thrift/trunk/content/lib/go.html
==============================================================================
--- websites/staging/thrift/trunk/content/lib/go.html (original)
+++ websites/staging/thrift/trunk/content/lib/go.html Sat Sep 26 12:54:26 2015
@@ -73,15 +73,26 @@
</div>
<div class="container">
- <h1 id="using-thrift-with-go">Using Thrift with Go</h1>
+ <style type="text/css">
+/* The following code is added by mdx_elementid.py
+ It was originally lifted from http://subversion.apache.org/style/site.css */
+/*
+ * Hide class="elementid-permalink", except when an enclosing heading
+ * has the :hover property.
+ */
+.headerlink, .elementid-permalink {
+ visibility: hidden;
+}
+h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink,
h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink,
dt:hover > .elementid-permalink { visibility: visible }</style>
+<h1 id="using-thrift-with-go">Using Thrift with Go<a class="headerlink"
href="#using-thrift-with-go" title="Permanent link">¶</a></h1>
<p>In following Go conventions, we recommend you use the 'go' tool to install
Thrift for go.</p>
-<div class="codehilite"><pre>$ <span class="n">go</span> <span
class="n">get</span> <span class="n">git</span><span class="o">-</span><span
class="n">wip</span><span class="o">-</span><span class="n">us</span><span
class="p">.</span><span class="n">apache</span><span class="p">.</span><span
class="n">org</span><span class="o">/</span><span class="n">repos</span><span
class="o">/</span><span class="n">asf</span><span class="o">/</span><span
class="n">thrift</span><span class="p">.</span><span class="n">git</span><span
class="o">/</span><span class="n">lib</span><span class="o">/</span><span
class="n">go</span><span class="o">/</span><span class="n">thrift</span>
+<div class="codehilite"><pre>$ <span class="n">go</span> <span
class="n">get</span> <span class="n">git</span><span class="p">.</span><span
class="n">apache</span><span class="p">.</span><span class="n">org</span><span
class="o">/</span><span class="n">thrift</span><span class="p">.</span><span
class="n">git</span><span class="o">/</span><span class="n">lib</span><span
class="o">/</span><span class="n">go</span><span class="o">/</span><span
class="n">thrift</span><span class="o">/</span><span class="p">...</span>
</pre></div>
<p>Will retrieve and install the most recent version of the package.</p>
-<h1 id="a-note-about-optional-fields">A note about optional fields</h1>
+<h1 id="a-note-about-optional-fields">A note about optional fields<a
class="headerlink" href="#a-note-about-optional-fields" title="Permanent
link">¶</a></h1>
<p>The thrift-to-Go compiler tries to represent thrift IDL structs as Go
structs.
We must be able to distinguish between optional fields that are set to their
default value and optional values which are actually unset, so the generated
Modified: websites/staging/thrift/trunk/content/lib/haxe.html
==============================================================================
--- websites/staging/thrift/trunk/content/lib/haxe.html (original)
+++ websites/staging/thrift/trunk/content/lib/haxe.html Sat Sep 26 12:54:26 2015
@@ -73,17 +73,71 @@
</div>
<div class="container">
- <h1 id="using-thrift-with-haxe">Using Thrift with Haxe</h1>
-<p>Thrift requires Haxe 3.1.3.</p>
-<p>Thrift Haxe bindings can be set up via the <code>haxelib</code> tool from
github.</p>
+ <style type="text/css">
+/* The following code is added by mdx_elementid.py
+ It was originally lifted from http://subversion.apache.org/style/site.css */
+/*
+ * Hide class="elementid-permalink", except when an enclosing heading
+ * has the :hover property.
+ */
+.headerlink, .elementid-permalink {
+ visibility: hidden;
+}
+h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink,
h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink,
dt:hover > .elementid-permalink { visibility: visible }</style>
+<h1 id="using-thrift-with-haxe">Using Thrift with Haxe<a class="headerlink"
href="#using-thrift-with-haxe" title="Permanent link">¶</a></h1>
+<h2 id="haxe-setup">Haxe setup<a class="headerlink" href="#haxe-setup"
title="Permanent link">¶</a></h2>
+<p>Thrift requires Haxe 3.1.3. Installers for Windows and OSX
+platforms are available at <code>http://haxe.org/download</code>. </p>
+<p>Depending on the desired targets, you may have to install the appropriate
HaxeLibs
+after installing Haxe itself. For example, if you plan to target C#, Java and
C++,
+enter the following commands after installing Haxe:</p>
+<div class="codehilite"><pre><span class="n">haxelib</span> <span
class="n">install</span> <span class="n">hxcpp</span>
+<span class="n">haxelib</span> <span class="n">install</span> <span
class="n">hxjava</span>
+<span class="n">haxelib</span> <span class="n">install</span> <span
class="n">hxcs</span>
+</pre></div>
+
+
+<p>For other targets, please consult the Haxe documentation whether or not any
additional
+target libraries need to be installed and how to achieve this.</p>
+<h2 id="haxe-on-linux">Haxe on Linux<a class="headerlink"
href="#haxe-on-linux" title="Permanent link">¶</a></h2>
+<p>For Linux platforms it is recommended not to download the
+binaries manually, instead use the Haxe installation shell
+script which can be found at <code>http://www.openfl.org/download</code>.</p>
+<p>If you run into the error message </p>
+<div class="codehilite"><pre><span class="n">Uncaught</span> <span
class="n">exception</span> <span class="o">-</span> <span
class="n">load</span><span class="p">.</span><span class="n">c</span><span
class="p">(</span>237<span class="p">)</span> <span class="p">:</span> <span
class="n">Failed</span> <span class="n">to</span> <span class="n">load</span>
<span class="n">library</span> <span class="p">:</span> <span
class="o">/</span><span class="n">usr</span><span class="o">/</span><span
class="n">lib</span><span class="o">/</span><span class="n">neko</span><span
class="o">/</span><span class="n">regexp</span><span class="p">.</span><span
class="n">ndll</span>
+<span class="p">(</span><span class="n">libpcre</span><span
class="p">.</span><span class="n">so</span><span class="p">.</span>3<span
class="p">:</span> <span class="n">cannot</span> <span class="n">open</span>
<span class="n">shared</span> <span class="n">object</span> <span
class="n">file</span><span class="p">:</span> <span class="n">No</span> <span
class="n">such</span> <span class="n">file</span> <span class="n">or</span>
<span class="n">directory</span><span class="p">)</span>
+</pre></div>
+
+
+<p>this can be solved depending on your OSes bitness by either</p>
+<div class="codehilite"><pre><span class="n">sudo</span> <span
class="n">ln</span> <span class="o">-</span><span class="n">sf</span> <span
class="o">/</span><span class="n">usr</span><span class="o">/</span><span
class="n">lib</span><span class="o">/</span><span class="n">libpcre</span><span
class="p">.</span><span class="n">so</span><span class="p">.</span>1 <span
class="o">/</span><span class="n">usr</span><span class="o">/</span><span
class="n">lib</span><span class="o">/</span><span class="n">libpcre</span><span
class="p">.</span><span class="n">so</span><span class="p">.</span>3
+<span class="n">sudo</span> <span class="n">ldconfig</span>
+</pre></div>
+
+
+<p>or</p>
+<div class="codehilite"><pre><span class="n">sudo</span> <span
class="n">ln</span> <span class="o">-</span><span class="n">sf</span> <span
class="o">/</span><span class="n">usr</span><span class="o">/</span><span
class="n">lib64</span><span class="o">/</span><span
class="n">libpcre</span><span class="p">.</span><span class="n">so</span><span
class="p">.</span>1 <span class="o">/</span><span class="n">usr</span><span
class="o">/</span><span class="n">lib64</span><span class="o">/</span><span
class="n">libpcre</span><span class="p">.</span><span class="n">so</span><span
class="p">.</span>3
+<span class="n">sudo</span> <span class="n">ldconfig</span>
+</pre></div>
+
+
+<h2 id="thrift-haxe-bindings">Thrift Haxe bindings<a class="headerlink"
href="#thrift-haxe-bindings" title="Permanent link">¶</a></h2>
+<p>Thrift Haxe bindings can be set up via the <code>haxelib</code> tool<br />
+either from the official ASF repo, or via the github mirror.</p>
<ul>
<li>
<p>To set up any <strong>stable version</strong>, choose the appropriate
branch (e.g. <code>0.9.3</code>):</p>
-<p><code>haxelib git thrift https://github.com/apache/thrift.git 0.9.3
lib/haxe</code></p>
+<ul>
+<li><code>haxelib git thrift https://git.apache.org/thrift.git 0.9.3
lib/haxe</code></li>
+<li><code>haxelib git thrift https://github.com/apache/thrift.git 0.9.3
lib/haxe</code></li>
+</ul>
</li>
<li>
<p>To set up the current <strong>development version</strong>, use the
<code>master</code> branch:</p>
-<p><code>haxelib git thrift https://github.com/apache/thrift.git master
lib/haxe</code></p>
+<ul>
+<li><code>haxelib git thrift https://git.apache.org/thrift.git master
lib/haxe</code> </li>
+<li><code>haxelib git thrift https://github.com/apache/thrift.git master
lib/haxe</code></li>
+</ul>
</li>
</ul>
<p>As usual, the installed library can be updated using <code>haxelib
upgrade</code>
@@ -94,36 +148,21 @@ downloads and more information can be fo
<p>To get started, visit the /tutorial/haxe and /test/haxe dirs for examples.
If you are using HIDE or the FlashDevelop IDE, you'll find appropriate
project files in these folders.</p>
-<h1 id="current-status">Current status</h1>
+<h1 id="current-status">Current status<a class="headerlink"
href="#current-status" title="Permanent link">¶</a></h1>
<ul>
<li>tested with Haxe C++ target</li>
<li>transports: Socket, HTTP (client only), Stream</li>
-<li>protocols: Binary, JSON, Multiplex</li>
+<li>protocols: Binary, JSON, Multiplex, Compact</li>
<li>tutorial client and server available</li>
<li>cross-test client and server available </li>
</ul>
-<h1 id="further-developments">Further developments</h1>
+<h1 id="further-developments">Further developments<a class="headerlink"
href="#further-developments" title="Permanent link">¶</a></h1>
<ul>
<li>improve to work with C#, Java and JavaScript Haxe/OpenFL targets</li>
<li>improve to work with more (ideally all) Haxe/OpenFL targets</li>
<li>add HTTP server, update tutorial and tests accordingly</li>
</ul>
-<h1 id="dependencies">Dependencies</h1>
-<p>Haxe Targets:
-Depending on the desired targets, you may have to install the appropriate
HaxeLibs
-after installing Haxe itself. For example, if you plan to target C#, Java and
C++,
-enter the following commands after installing Haxe:</p>
-<div class="codehilite"><pre><span class="n">haxelib</span> <span
class="n">install</span> <span class="n">hxcpp</span>
-<span class="n">haxelib</span> <span class="n">install</span> <span
class="n">hxjava</span>
-<span class="n">haxelib</span> <span class="n">install</span> <span
class="n">hxcs</span>
-</pre></div>
-
-
-<p>For other targets, please consult the Haxe documentation whether or not any
additional
-target libraries need to be installed and how to achieve this.</p>
-<p>Haxe Libraries:
-- None (at the time of writing)</p>
-<h1 id="known-restrictions">Known restrictions</h1>
+<h1 id="known-restrictions">Known restrictions<a class="headerlink"
href="#known-restrictions" title="Permanent link">¶</a></h1>
<p>Although designed with maximum portability in mind, for technical reasons
some platforms
may only support parts of the library, or not be compatible at all.</p>
<p>Javascript:
Modified: websites/staging/thrift/trunk/content/lib/hs.html
==============================================================================
--- websites/staging/thrift/trunk/content/lib/hs.html (original)
+++ websites/staging/thrift/trunk/content/lib/hs.html Sat Sep 26 12:54:26 2015
@@ -73,7 +73,18 @@
</div>
<div class="container">
- <h1 id="compile">Compile</h1>
+ <style type="text/css">
+/* The following code is added by mdx_elementid.py
+ It was originally lifted from http://subversion.apache.org/style/site.css */
+/*
+ * Hide class="elementid-permalink", except when an enclosing heading
+ * has the :hover property.
+ */
+.headerlink, .elementid-permalink {
+ visibility: hidden;
+}
+h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink,
h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink,
dt:hover > .elementid-permalink { visibility: visible }</style>
+<h1 id="compile">Compile<a class="headerlink" href="#compile" title="Permanent
link">¶</a></h1>
<p>Use Cabal to compile and install; ./configure uses Cabal underneath, and
that
path is not yet well tested. Thrift's library and generated code should compile
with pretty much any GHC extensions or warnings you enable (or disable).
@@ -81,11 +92,11 @@ Please report this not being the case as
https://issues.apache.org/jira/secure/CreateIssue!default.jspa</p>
<p>Chances you'll need to muck a bit with Cabal flags to install Thrift:</p>
<p>CABAL_CONFIGURE_FLAGS="--user" ./configure</p>
-<h1 id="base-types">Base Types</h1>
+<h1 id="base-types">Base Types<a class="headerlink" href="#base-types"
title="Permanent link">¶</a></h1>
<p>The mapping from Thrift types to Haskell's is:</p>
<ul>
<li>double -> Double</li>
-<li>byte -> Data.Word.Word8</li>
+<li>byte -> Data.Int.Int8</li>
<li>i16 -> Data.Int.Int16</li>
<li>i32 -> Data.Int.Int32</li>
<li>i64 -> Data.Int.Int64</li>
@@ -93,29 +104,29 @@ https://issues.apache.org/jira/secure/Cr
<li>binary -> Data.ByteString.Lazy</li>
<li>bool -> Boolean</li>
</ul>
-<h1 id="enums">Enums</h1>
+<h1 id="enums">Enums<a class="headerlink" href="#enums" title="Permanent
link">¶</a></h1>
<p>Become Haskell 'data' types. Use fromEnum to get out the int value.</p>
-<h1 id="lists">Lists</h1>
+<h1 id="lists">Lists<a class="headerlink" href="#lists" title="Permanent
link">¶</a></h1>
<p>Become Data.Vector.Vector from the vector package.</p>
-<h1 id="maps-and-sets">Maps and Sets</h1>
+<h1 id="maps-and-sets">Maps and Sets<a class="headerlink"
href="#maps-and-sets" title="Permanent link">¶</a></h1>
<p>Become Data.HashMap.Strict.Map and Data.HashSet.Set from the
unordered-containers package.</p>
-<h1 id="structs">Structs</h1>
+<h1 id="structs">Structs<a class="headerlink" href="#structs" title="Permanent
link">¶</a></h1>
<p>Become records. Field labels are ugly, of the form f_STRUCTNAME_FIELDNAME.
All
fields are Maybe types.</p>
-<h1 id="exceptions">Exceptions</h1>
+<h1 id="exceptions">Exceptions<a class="headerlink" href="#exceptions"
title="Permanent link">¶</a></h1>
<p>Identical to structs. Use them with throw and catch from
Control.Exception.</p>
-<h1 id="client">Client</h1>
+<h1 id="client">Client<a class="headerlink" href="#client" title="Permanent
link">¶</a></h1>
<p>Just a bunch of functions. You may have to import a bunch of client files to
deal with inheritance.</p>
-<h1 id="interface">Interface</h1>
+<h1 id="interface">Interface<a class="headerlink" href="#interface"
title="Permanent link">¶</a></h1>
<p>You should only have to import the last one in the chain of inheritors. To
make
an interface, declare a label:</p>
<p>data MyIface = MyIface</p>
<p>and then declare it an instance of each iface class, starting with the
superest
-class and proceding down (all the while defining the methods). Then pass your
+class and proceeding down (all the while defining the methods). Then pass your
label to process as the handler.</p>
-<h1 id="processor">Processor</h1>
+<h1 id="processor">Processor<a class="headerlink" href="#processor"
title="Permanent link">¶</a></h1>
<p>Just a function that takes a handler label, protocols. It calls the
superclasses process if there is a superclass.
<p class='snippet_footer'>
Modified: websites/staging/thrift/trunk/content/lib/index.html
==============================================================================
--- websites/staging/thrift/trunk/content/lib/index.html (original)
+++ websites/staging/thrift/trunk/content/lib/index.html Sat Sep 26 12:54:26
2015
@@ -74,7 +74,18 @@
<div class="container">
-<h1 id="apache-thrift-libraries">Apache Thrift Libraries</h1>
+<style type="text/css">
+/* The following code is added by mdx_elementid.py
+ It was originally lifted from http://subversion.apache.org/style/site.css */
+/*
+ * Hide class="elementid-permalink", except when an enclosing heading
+ * has the :hover property.
+ */
+.headerlink, .elementid-permalink {
+ visibility: hidden;
+}
+h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink,
h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink,
dt:hover > .elementid-permalink { visibility: visible }</style>
+<h1 id="apache-thrift-libraries">Apache Thrift Libraries<a class="headerlink"
href="#apache-thrift-libraries" title="Permanent link">¶</a></h1>
<p>Each supported language needs the Apache Thrift Libraries and the generated
code made by the Apache Thrift Compiler.</p>
<p>Some language specific documentation is for the Apache Thrift Libraries are
generated from lib/${language}/README.md files:</p>
<ul>
Modified: websites/staging/thrift/trunk/content/lib/java.html
==============================================================================
--- websites/staging/thrift/trunk/content/lib/java.html (original)
+++ websites/staging/thrift/trunk/content/lib/java.html Sat Sep 26 12:54:26 2015
@@ -73,7 +73,18 @@
</div>
<div class="container">
- <h1 id="using-thrift-with-java">Using Thrift with Java</h1>
+ <style type="text/css">
+/* The following code is added by mdx_elementid.py
+ It was originally lifted from http://subversion.apache.org/style/site.css */
+/*
+ * Hide class="elementid-permalink", except when an enclosing heading
+ * has the :hover property.
+ */
+.headerlink, .elementid-permalink {
+ visibility: hidden;
+}
+h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink,
h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink,
dt:hover > .elementid-permalink { visibility: visible }</style>
+<h1 id="using-thrift-with-java">Using Thrift with Java<a class="headerlink"
href="#using-thrift-with-java" title="Permanent link">¶</a></h1>
<p>The Thrift Java source is not build using the GNU tools, but rather uses
the Apache Ant build system, which tends to be predominant amongst Java
developers.</p>
@@ -95,7 +106,7 @@ classpath, or install if in your default
</pre></div>
-<h1 id="dependencies">Dependencies</h1>
+<h1 id="dependencies">Dependencies<a class="headerlink" href="#dependencies"
title="Permanent link">¶</a></h1>
<p>Apache Ant
http://ant.apache.org/
<p class='snippet_footer'>
Modified: websites/staging/thrift/trunk/content/lib/js.html
==============================================================================
--- websites/staging/thrift/trunk/content/lib/js.html (original)
+++ websites/staging/thrift/trunk/content/lib/js.html Sat Sep 26 12:54:26 2015
@@ -73,7 +73,18 @@
</div>
<div class="container">
- <h2 id="grunt-build">Grunt Build</h2>
+ <style type="text/css">
+/* The following code is added by mdx_elementid.py
+ It was originally lifted from http://subversion.apache.org/style/site.css */
+/*
+ * Hide class="elementid-permalink", except when an enclosing heading
+ * has the :hover property.
+ */
+.headerlink, .elementid-permalink {
+ visibility: hidden;
+}
+h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink,
h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink,
dt:hover > .elementid-permalink { visibility: visible }</style>
+<h2 id="grunt-build">Grunt Build<a class="headerlink" href="#grunt-build"
title="Permanent link">¶</a></h2>
<p>This is the base directory for the Apache Thrift JavaScript
library. This directory contains a Gruntfile.js and a
package.json. Many of the build and test tools used here
@@ -99,7 +110,7 @@ documentation.</p>
like this:</p>
<p>sudo npm install -g grunt-cli
npm install grunt --save-dev</p>
-<h2 id="tree">Tree</h2>
+<h2 id="tree">Tree<a class="headerlink" href="#tree" title="Permanent
link">¶</a></h2>
<p>The following directories are present (some only after the
grunt build):
/src - The JavaScript Apache Thrift source
@@ -108,19 +119,19 @@ grunt build):
/test - Various tests, this is a good place to look for
example code
/node_modules - Build support files installed by npm</p>
-<h2 id="example-javascript-client-and-server">Example JavaScript Client and
Server</h2>
+<h2 id="example-javascript-client-and-server">Example JavaScript Client and
Server<a class="headerlink" href="#example-javascript-client-and-server"
title="Permanent link">¶</a></h2>
<p>The listing below demonstrates a simple browser based JavaScript
Thrift client and Node.js JavaScript server for the hello_svc
service. </p>
-<h3 id="hellothrift-service-idl">hello.thrift - Service IDL</h3>
-<h3 id="build-with-thrift-gen-js-gen-jsnode-hellothrift">build with: $ thrift
-gen js -gen js:node hello.thrift</h3>
+<h3 id="hellothrift-service-idl">hello.thrift - Service IDL<a
class="headerlink" href="#hellothrift-service-idl" title="Permanent
link">¶</a></h3>
+<h3 id="build-with-thrift-gen-js-gen-jsnode-hellothrift">build with: $ thrift
-gen js -gen js:node hello.thrift<a class="headerlink"
href="#build-with-thrift-gen-js-gen-jsnode-hellothrift" title="Permanent
link">¶</a></h3>
<div class="codehilite"><pre><span class="n">service</span> <span
class="n">hello_svc</span> <span class="p">{</span>
<span class="n">string</span> <span class="n">get_message</span><span
class="p">(</span>1<span class="p">:</span> <span class="n">string</span> <span
class="n">name</span><span class="p">)</span>
<span class="p">}</span>
</pre></div>
-<h3 id="hellohtml-browser-client">hello.html - Browser Client</h3>
+<h3 id="hellohtml-browser-client">hello.html - Browser Client<a
class="headerlink" href="#hellohtml-browser-client" title="Permanent
link">¶</a></h3>
<div class="codehilite"><pre><span class="cp"><!DOCTYPE html></span>
<span class="nt"><html</span> <span class="na">lang=</span><span
class="s">"en"</span><span class="nt">></span>
<span class="nt"><head></span>
@@ -154,7 +165,7 @@ service. </p>
</pre></div>
-<h3 id="hellojs-node-server">hello.js - Node Server</h3>
+<h3 id="hellojs-node-server">hello.js - Node Server<a class="headerlink"
href="#hellojs-node-server" title="Permanent link">¶</a></h3>
<div class="codehilite"><pre><span class="n">var</span> <span
class="n">thrift</span> <span class="p">=</span> <span
class="n">require</span><span class="p">(</span><span
class="s">'thrift'</span><span class="p">);</span>
<span class="n">var</span> <span class="n">hello_svc</span> <span
class="p">=</span> <span class="n">require</span><span class="p">(</span><span
class="s">'./gen-nodejs/hello_svc.js'</span><span class="p">);</span>
@@ -186,7 +197,7 @@ service. </p>
</pre></div>
-<h2 id="typescript">TypeScript</h2>
+<h2 id="typescript">TypeScript<a class="headerlink" href="#typescript"
title="Permanent link">¶</a></h2>
<p>TypeScript definition files can also be generated by running:</p>
<div class="codehilite"><pre><span class="n">thrift</span> <span
class="o">--</span><span class="n">gen</span> <span class="n">js</span><span
class="p">:</span><span class="n">ts</span> <span class="n">file</span><span
class="p">.</span><span class="n">thrift</span>
</pre></div>
Modified: websites/staging/thrift/trunk/content/lib/nodejs.html
==============================================================================
--- websites/staging/thrift/trunk/content/lib/nodejs.html (original)
+++ websites/staging/thrift/trunk/content/lib/nodejs.html Sat Sep 26 12:54:26
2015
@@ -73,18 +73,29 @@
</div>
<div class="container">
- <h2 id="install">Install</h2>
+ <style type="text/css">
+/* The following code is added by mdx_elementid.py
+ It was originally lifted from http://subversion.apache.org/style/site.css */
+/*
+ * Hide class="elementid-permalink", except when an enclosing heading
+ * has the :hover property.
+ */
+.headerlink, .elementid-permalink {
+ visibility: hidden;
+}
+h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink,
h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink,
dt:hover > .elementid-permalink { visibility: visible }</style>
+<h2 id="install">Install<a class="headerlink" href="#install" title="Permanent
link">¶</a></h2>
<div class="codehilite"><pre><span class="n">npm</span> <span
class="n">install</span> <span class="n">thrift</span>
</pre></div>
-<h2 id="thrift-compiler">Thrift Compiler</h2>
+<h2 id="thrift-compiler">Thrift Compiler<a class="headerlink"
href="#thrift-compiler" title="Permanent link">¶</a></h2>
<p>You can compile IDL sources for Node.js with the following command:</p>
<div class="codehilite"><pre><span class="n">thrift</span> <span
class="o">--</span><span class="n">gen</span> <span class="n">js</span><span
class="p">:</span><span class="n">node</span> <span class="n">thrift_file</span>
</pre></div>
-<h2 id="cassandra-client-example">Cassandra Client Example:</h2>
+<h2 id="cassandra-client-example">Cassandra Client Example:<a
class="headerlink" href="#cassandra-client-example" title="Permanent
link">¶</a></h2>
<p>Here is a Cassandra example:</p>
<div class="codehilite"><pre><span class="n">var</span> <span
class="n">thrift</span> <span class="p">=</span> <span
class="n">require</span><span class="p">(</span><span
class="s">'thrift'</span><span class="p">),</span>
<span class="n">Cassandra</span> <span class="p">=</span> <span
class="n">require</span><span class="p">(</span><span
class="s">'./gen-nodejs/Cassandra'</span><span class="p">)</span>
@@ -109,14 +120,10 @@
<p><a name="int64"></a></p>
-<h2 id="int64">Int64</h2>
+<h2 id="int64">Int64<a class="headerlink" href="#int64" title="Permanent
link">¶</a></h2>
<p>Since JavaScript represents all numbers as doubles, int64 values cannot be
accurately represented naturally. To solve this, int64 values in responses will
be wrapped with Thirft.Int64 objects. The Int64 implementation used is <a
href="https://github.com/broofa/node-int64">broofa/node-int64</a>.</p>
-<h2 id="libraries-using-node-thrift">Libraries using node-thrift</h2>
-<ul>
-<li><a
href="https://github.com/yukim/node_cassandra">yukim/node_cassandra</a></li>
-</ul>
-<h2 id="custom-client-and-server-example">Custom client and server example</h2>
-<p>An example based on the one shown on the Thrift front page is included in
the examples/ folder.
+<h2 id="client-and-server-examples">Client and server examples<a
class="headerlink" href="#client-and-server-examples" title="Permanent
link">¶</a></h2>
+<p>Several example clients and servers are included in the
thrift/lib/nodejs/examples folder and the cross language tutorial
thrift/tutorial/nodejs folder.
<p class='snippet_footer'>
This page was generated by Apache Thrift's <strong>source tree docs</strong>:
<a
href="http://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob;f=lib/nodejs/README.md;hb=HEAD"</a>lib/nodejs/README.md</a>
Modified: websites/staging/thrift/trunk/content/lib/ocaml.html
==============================================================================
--- websites/staging/thrift/trunk/content/lib/ocaml.html (original)
+++ websites/staging/thrift/trunk/content/lib/ocaml.html Sat Sep 26 12:54:26
2015
@@ -73,7 +73,18 @@
</div>
<div class="container">
- <h1 id="library">Library</h1>
+ <style type="text/css">
+/* The following code is added by mdx_elementid.py
+ It was originally lifted from http://subversion.apache.org/style/site.css */
+/*
+ * Hide class="elementid-permalink", except when an enclosing heading
+ * has the :hover property.
+ */
+.headerlink, .elementid-permalink {
+ visibility: hidden;
+}
+h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink,
h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink,
dt:hover > .elementid-permalink { visibility: visible }</style>
+<h1 id="library">Library<a class="headerlink" href="#library" title="Permanent
link">¶</a></h1>
<p>The library abstract classes, exceptions, and general use functions
are mostly jammed in Thrift.ml (an exception being
TServer).</p>
@@ -84,25 +95,18 @@ often called t, exceptions are called E.
TSocket, TThreadedServer, TSimpleServer, and TServerSocket.</p>
<p>A note on making the library: Running make should create native, debug
code libraries, and a toplevel.</p>
-<h2 id="struct-format">Struct format</h2>
+<h2 id="struct-format">Struct format<a class="headerlink"
href="#struct-format" title="Permanent link">¶</a></h2>
<p>Structs are turned into classes. The fields are all option types and
are initially None. Write is a method, but reading is done by a
separate function (since there is no such thing as a static
class). The class type is t and is in a module with the name of the
struct.</p>
-<h2 id="enum-format">enum format</h2>
+<h2 id="enum-format">enum format<a class="headerlink" href="#enum-format"
title="Permanent link">¶</a></h2>
<p>Enums are put in their own module along with
functions to_i and of_i which convert the ocaml types into ints. For
example:</p>
-<p>enum Numberz
-{
- ONE = 1,
- TWO,
- THREE,
- FIVE = 5,
- SIX,
- EIGHT = 8
-}</p>
+<p ONE="ONE" _="
+">enum Numberz</p>
<p>==></p>
<p>module Numberz =
struct
@@ -116,12 +120,12 @@ type t =
<p>let of_i = ...
let to_i = ...
end</p>
-<h2 id="typedef-format">typedef format</h2>
+<h2 id="typedef-format">typedef format<a class="headerlink"
href="#typedef-format" title="Permanent link">¶</a></h2>
<p>Typedef turns into the type declaration:
typedef i64 UserId</p>
<p>==></p>
<p>type userid Int64.t</p>
-<h2 id="exception-format">exception format</h2>
+<h2 id="exception-format">exception format<a class="headerlink"
href="#exception-format" title="Permanent link">¶</a></h2>
<p>The same as structs except that the module also has an exception type
E of t that is raised/caught.</p>
<p>For example, with an exception Xception,
@@ -130,11 +134,11 @@ and
try
...
with Xception.E e -> ...</p>
-<h2 id="list-format">list format</h2>
+<h2 id="list-format">list format<a class="headerlink" href="#list-format"
title="Permanent link">¶</a></h2>
<p>Lists are turned into OCaml native lists.</p>
-<h2 id="mapset-formats">Map/Set formats</h2>
+<h2 id="mapset-formats">Map/Set formats<a class="headerlink"
href="#mapset-formats" title="Permanent link">¶</a></h2>
<p>These are both turned into Hashtbl.t's. Set values are bool.</p>
-<h2 id="services">Services</h2>
+<h2 id="services">Services<a class="headerlink" href="#services"
title="Permanent link">¶</a></h2>
<p>The client is a class "client" parametrized on input and output
protocols. The processor is a class parametrized on a handler. A
handler is a class inheriting the iface abstract class. Unlike other
Modified: websites/staging/thrift/trunk/content/lib/perl.html
==============================================================================
--- websites/staging/thrift/trunk/content/lib/perl.html (original)
+++ websites/staging/thrift/trunk/content/lib/perl.html Sat Sep 26 12:54:26 2015
@@ -73,16 +73,32 @@
</div>
<div class="container">
- <h1 id="using-thrift-with-perl">Using Thrift with Perl</h1>
+ <style type="text/css">
+/* The following code is added by mdx_elementid.py
+ It was originally lifted from http://subversion.apache.org/style/site.css */
+/*
+ * Hide class="elementid-permalink", except when an enclosing heading
+ * has the :hover property.
+ */
+.headerlink, .elementid-permalink {
+ visibility: hidden;
+}
+h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink,
h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink,
dt:hover > .elementid-permalink { visibility: visible }</style>
+<h1 id="using-thrift-with-perl">Using Thrift with Perl<a class="headerlink"
href="#using-thrift-with-perl" title="Permanent link">¶</a></h1>
<p>Thrift requires Perl >= 5.6.0</p>
-<p>Exceptions are thrown with die so be sure to wrap eval{} statments
-around any code that contains exceptions.</p>
-<p>The 64bit Integers work only upto 2^42 on my machine :-?
-Math::BigInt is probably needed.</p>
-<p>Please see tutoral and test dirs for examples...</p>
-<h1 id="dependencies">Dependencies</h1>
-<p>Bit::Vector - comes with modern perl installations.
+<p>Unexpected exceptions in a service handler are converted to
+TApplicationException with type INTERNAL ERROR and the string
+of the exception is delivered as the message.</p>
+<p>On the client side, exceptions are thrown with die, so be sure
+to wrap eval{} statments around any code that contains exceptions.</p>
+<p>Please see tutoral and test dirs for examples.</p>
+<h1 id="dependencies">Dependencies<a class="headerlink" href="#dependencies"
title="Permanent link">¶</a></h1>
+<p>Bit::Vector - comes with modern perl installations.
Class::Accessor
+IO::Socket::INET - comes with modern perl installations.
+IO::Socket::SSL - required if using SSL/TLS.
+NET::SSLeay
+Crypt::SSLeay - for make cross
<p class='snippet_footer'>
This page was generated by Apache Thrift's <strong>source tree docs</strong>:
<a
href="http://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob;f=lib/perl/README.md;hb=HEAD"</a>lib/perl/README.md</a>