README.md
1Thrift Javascript Library
2=========================
3This browser based Apache Thrift implementation supports
4RPC clients using the JSON protocol over Http[s] with XHR
5and WebSocket.
6
7License
8-------
9Licensed to the Apache Software Foundation (ASF) under one
10or more contributor license agreements. See the NOTICE file
11distributed with this work for additional information
12regarding copyright ownership. The ASF licenses this file
13to you under the Apache License, Version 2.0 (the
14"License"); you may not use this file except in compliance
15with the License. You may obtain a copy of the License at
16
17 http://www.apache.org/licenses/LICENSE-2.0
18
19Unless required by applicable law or agreed to in writing,
20software distributed under the License is distributed on an
21"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
22KIND, either express or implied. See the License for the
23specific language governing permissions and limitations
24under the License.
25
26Test Servers
27------------
28drwxr-xr-x 2 randy randy 4096 Feb 8 15:44 sec
29-rw-r--r-- 1 randy randy 2183 Feb 9 04:01 server_http.js
30-rw-r--r-- 1 randy randy 2386 Feb 9 05:39 server_https.js
31
32server_http.js is a Node.js web server which support the
33standard Apache Thrift test suite (thrift/test/ThriftTest.thrift).
34The server supports Apache Thrift XHR and WebSocket clients.
35
36server_https.js is the same but uses SSL/TLS. The server key
37and cert are pulled from the thrift/test/keys folder.
38
39Both of these servers support WebSocket (the http: supports ws:,
40and the https: support wss:).
41
42To run the client test with the Java test server use:
43$ make check (requires the Apache Thrift Java branch
44and make check must have been run in thrift/lib/java
45previously).
46
47To run the client tests with the Node servers run the grunt
48 build in the parent js directory (see README there).
49
50Test Clients
51------------
52-rw-r--r-- 1 randy randy 13558 Feb 9 07:18 test-async.js
53-rw-r--r-- 1 randy randy 5724 Feb 9 03:45 test_handler.js
54-rwxr-xr-x 1 randy randy 2719 Feb 9 06:04 test.html
55-rw-r--r-- 1 randy randy 4611 Feb 9 06:05 test-jq.js
56-rwxr-xr-x 1 randy randy 12153 Feb 9 06:04 test.js
57-rw-r--r-- 1 randy randy 2593 Feb 9 06:16 test-nojq.html
58-rw-r--r-- 1 randy randy 1450 Feb 9 06:14 test-nojq.js
59-rw-r--r-- 1 randy randy 2847 Feb 9 06:31 testws.html
60
61There are three html test driver files, all of which are
62QUnit based. test.html tests the Apache Thrift jQuery
63generated code (thrift -gen js:jquery). The test-nojq.html
64runs almost identical tests against normal JavaScript builds
65(thrift -gen js). Both of the previous tests use the XHR
66transport. The testws.html runs similar tests using the
67WebSocket transport. The test*.js files are loaded by the
68html drivers and contain the actual Apache Thrift tests.
69