From 63bcfde17b7117592c3195666598d9b95be3200e Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Sat, 17 Mar 2012 19:46:47 +0000 Subject: Minor cleanup of README, INSTALL, and remove an obsolete sample. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1301985 13f79535-47bb-0310-9956-ffa450edef68 --- sca-cpp/trunk/INSTALL | 12 +- sca-cpp/trunk/README | 2 + sca-cpp/trunk/samples/loan-python/Makefile.am | 28 ---- .../trunk/samples/loan-python/htdocs/index.html | 160 --------------------- sca-cpp/trunk/samples/loan-python/loan-approval.py | 77 ---------- sca-cpp/trunk/samples/loan-python/loan.composite | 45 ------ sca-cpp/trunk/samples/loan-python/loan.py | 45 ------ sca-cpp/trunk/samples/loan-python/server-test | 58 -------- sca-cpp/trunk/samples/loan-python/start | 32 ----- sca-cpp/trunk/samples/loan-python/stop | 21 --- sca-cpp/trunk/samples/loan-python/util.py | 145 ------------------- 11 files changed, 11 insertions(+), 614 deletions(-) delete mode 100644 sca-cpp/trunk/samples/loan-python/Makefile.am delete mode 100644 sca-cpp/trunk/samples/loan-python/htdocs/index.html delete mode 100644 sca-cpp/trunk/samples/loan-python/loan-approval.py delete mode 100644 sca-cpp/trunk/samples/loan-python/loan.composite delete mode 100644 sca-cpp/trunk/samples/loan-python/loan.py delete mode 100755 sca-cpp/trunk/samples/loan-python/server-test delete mode 100755 sca-cpp/trunk/samples/loan-python/start delete mode 100755 sca-cpp/trunk/samples/loan-python/stop delete mode 100644 sca-cpp/trunk/samples/loan-python/util.py (limited to 'sca-cpp') diff --git a/sca-cpp/trunk/INSTALL b/sca-cpp/trunk/INSTALL index 93f2b47c79..97cc13e156 100644 --- a/sca-cpp/trunk/INSTALL +++ b/sca-cpp/trunk/INSTALL @@ -89,8 +89,8 @@ XML: libxml2-2.7.7 (http://xmlsoft.org/) CURL: -curl-7-19-5 -libcurl4-openssl-7.19.5 +curl-7-24.0 +libcurl4-openssl-7.24.0 JSON: Mozilla SpiderMonkey libmozjs 1.8.5 and @@ -168,6 +168,12 @@ To enable debugging and strict warning compile options, add: To enable gprof profiling, add: --enable-profiling +To enable memory usage debugging using Electric Fence add: +--enable-efence + +To enable memory usage debugging using mmap add: +--enable-malloc-mmap + To enable multi-threading (required by the Queue and Chat components and for running with the HTTPD worker or event multi-threaded MPMs): --enable-threads @@ -225,7 +231,7 @@ dependencies installed under $build: --with-apr=$build/apr-1.4.x-bin --with-httpd=$build/httpd-2.3.15-bin \ --with-memcached=$build/memcached-1.4.7-bin \ --with-tinycdb=$build/tinycdb-0.77-bin \ ---with-curl=$build/curl-7.19.5-bin --with-libxml2=/usr \ +--with-curl=$build/curl-7.24.0-bin --with-libxml2=/usr \ --with-js-include=$build/js-1.8.5-bin/include \ --with-js-lib=$build/js-1.8.5-bin/lib \ --enable-libcloud \ diff --git a/sca-cpp/trunk/README b/sca-cpp/trunk/README index 92dfde8154..ce13557a1e 100644 --- a/sca-cpp/trunk/README +++ b/sca-cpp/trunk/README @@ -17,6 +17,7 @@ Chat: XMPP chat, using Apache Vysper and Libstrophe; Constdb: fast persistent store for mostly constant data, using TinyCDB; Filedb: key/value persistent store, using plain files; Http: HTTP client, using Libcurl; +Smtp: SMTP client, using Libcurl; Kvdb: fast key/value persistent store, using LevelDB; Log: distributed logger, using Facebook Scribe; Queue: AMQP queuing, using Apache Qpid/C; @@ -82,6 +83,7 @@ Here's a rough guide to the Tuscany SCA source tree: | | |-- kvdb LevelDB key/value persistent store | | |-- log Scribe logger | | |-- queue AMQP message queue + | | |-- smtp SMTP client | | |-- sqldb PostgreSQL database | | |-- webservice Axis2 Web service gateway | | diff --git a/sca-cpp/trunk/samples/loan-python/Makefile.am b/sca-cpp/trunk/samples/loan-python/Makefile.am deleted file mode 100644 index 0d0027ce6b..0000000000 --- a/sca-cpp/trunk/samples/loan-python/Makefile.am +++ /dev/null @@ -1,28 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -if WANT_PYTHON - -dist_sample_SCRIPTS = start stop -sampledir = $(prefix)/samples/loan-python - -nobase_dist_sample_DATA = loan.py loan-approval.py util.py loan.composite htdocs/*.html - -dist_noinst_SCRIPTS = server-test -TESTS = server-test - -endif diff --git a/sca-cpp/trunk/samples/loan-python/htdocs/index.html b/sca-cpp/trunk/samples/loan-python/htdocs/index.html deleted file mode 100644 index 3f607f78f4..0000000000 --- a/sca-cpp/trunk/samples/loan-python/htdocs/index.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - -Store - - - - - - - -

Store

-
-
-

Catalog

-
-
-
- -
-
- -

Your Shopping Cart

-
-
-
-
-
- - -(feed) -
-
- - - diff --git a/sca-cpp/trunk/samples/loan-python/loan-approval.py b/sca-cpp/trunk/samples/loan-python/loan-approval.py deleted file mode 100644 index 3951f16eeb..0000000000 --- a/sca-cpp/trunk/samples/loan-python/loan-approval.py +++ /dev/null @@ -1,77 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -# Loan approval service implementation -import uuid -import sys -from util import * -from loan import * - -loansId = ("loans", "1234") - -# Return the list of loans -def loans(cache): - l = cache("get", loansId) - if l is None: - return () - return l - -# Post a new loan request -def post(collection, item, cache): - id = str(uuid.uuid1()) - loans = cons(cons(id, cdr(item)), loans(cache)) - cache("put", loansId, loans) - return (id,) - -# Return the person currently processing a loan request -def processor(l): - if approver(l) is not None: - return approver(l) - return assessor(l) - -# Return a list of loans that match a given criteria -def get(r, cache): - # All the loans - if r == (): - return loans(cache) - # Loans that need approval - if car(r) == "needApproval": - return filter(lambda l: (amount(l) >= 10000 or risk(l) == "high") and approval(l) is None, loans(cache)) - # Loans that need a risk assessment - if car(r) == "needAssessment": - return filter(lambda : amount(l) < 10000 and risk(l) is None, loans(cache)) - # Loans currently under approval - if car(r) == "underApproval": - return filter(lambda l: approver(l) is not None, loans(cache)) - # Loans currently under assessment - if car(r) == "underAssessment": - return filter(lambda l: assessor(l) is not None, loans(cache)) - # Loan requests that are unassigned - if car(r) == "unassigned": - return filter(lambda l: processor(l) is None, loans(cache)) - # Loan requests that are assigned and getting processed - if car(r) == "assigned": - return filter(lambda l: processor(l) == cadr(r), loans(cache)) - # Approved loans - if car(r) == "approved": - return filter(lambda l: approval(l) == true, loans(cache)) - # Denied loans - if car(r) == "denied": - return filter(lambda l: approval(l) == false, loans(cache)) - # A particular loan - return filter(lambda l: id(l) == r, loans(cache)) - diff --git a/sca-cpp/trunk/samples/loan-python/loan.composite b/sca-cpp/trunk/samples/loan-python/loan.composite deleted file mode 100644 index 9052737cf0..0000000000 --- a/sca-cpp/trunk/samples/loan-python/loan.composite +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - localhost:11211 - - - diff --git a/sca-cpp/trunk/samples/loan-python/loan.py b/sca-cpp/trunk/samples/loan-python/loan.py deleted file mode 100644 index 9e345cd1f6..0000000000 --- a/sca-cpp/trunk/samples/loan-python/loan.py +++ /dev/null @@ -1,45 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -from util import * - -# Loan data type - -def firstName(loan): - return assoc("'firstName", loan) - -def lastName(loan): - return assoc("'lastName", loan) - -def ssn(loan): - return assoc("'ssn", loan) - -def amount(loan): - return assoc("'amount", loan) - -def approver(loan): - return assoc("'approver", loan) - -def approval(loan): - return assoc("'approval", loan) - -def assessor(loan): - return assoc("'assessor", loan) - -def risk(loan): - return assoc("'risk", loan) - diff --git a/sca-cpp/trunk/samples/loan-python/server-test b/sca-cpp/trunk/samples/loan-python/server-test deleted file mode 100755 index fb629a6814..0000000000 --- a/sca-cpp/trunk/samples/loan-python/server-test +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/sh - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -echo "Testing..." -here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` -curl_prefix=`cat $here/../../modules/http/curl.prefix` - -# Setup -./start -sleep 2 - -# Test HTTP GET -$curl_prefix/bin/curl http://localhost:8090/ 2>/dev/null >tmp/index.html -diff tmp/index.html htdocs/index.html -rc=$? - -# Test Catalog -if [ "$rc" = "0" ]; then - $curl_prefix/bin/curl http://localhost:8090/references/Store/catalog -X POST -H "Content-type: application/json-rpc" --data @../store-cpp/htdocs/test/items-request.txt >tmp/items-result.txt 2>/dev/null - diff tmp/items-result.txt ../store-cpp/htdocs/test/items-result.txt - rc=$? -fi - -# Test Shopping Cart -if [ "$rc" = "0" ]; then - $curl_prefix/bin/curl http://localhost:8090/references/Store/shoppingCart -X POST -H "Content-type: application/atom+xml" --data @../store-cpp/htdocs/test/shopping-cart-entry.xml 2>/dev/null - rc=$? -fi -if [ "$rc" = "0" ]; then - $curl_prefix/bin/curl http://localhost:8090/references/Store/shoppingCart >tmp/shopping-cart-feed.xml 2>/dev/null - grep "3.55" tmp/shopping-cart-feed.xml >/dev/null - rc=$? -fi - -# Cleanup -./stop -sleep 2 - -if [ "$rc" = "0" ]; then - echo "OK" -fi -exit $rc diff --git a/sca-cpp/trunk/samples/loan-python/start b/sca-cpp/trunk/samples/loan-python/start deleted file mode 100755 index d334ebc58f..0000000000 --- a/sca-cpp/trunk/samples/loan-python/start +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -../../modules/http/httpd-conf tmp localhost 8090 htdocs -../../modules/http/httpd-event-conf tmp -../../modules/server/server-conf tmp -../../modules/python/python-conf tmp -cat >>tmp/conf/httpd.conf < 0: - if j == maxint: - return self.cdr()[i - 1: j] - return self.cdr()[i - 1: j - 1] - if j == maxint: - return self - if j == 0: - return (self.car,) - return (self.car,) + self.cdr()[: j - 1] - - def __eq__(self, other): - sl = len(self) - ol = len(other) - if sl != ol: - return False - return self[0: sl] == other[0: ol] - - def __ne__(self, other): - return not self.__eq__(other) - -def cons_stream(car, cdr): - return streampair(car, cdr) - - -# Scheme-like associations -def assoc(k, l): - if l == (): - return None - - if k == car(car(l)): - return car(l) - return assoc(k, cdr(l)) - -# Currying / partial function application -def curry(f, *args): - return lambda *a: f(*(args + a)) - -# Split a path into a list of segments -def tokens(path): - return tuple(filter(lambda s: len(s) != 0, path.split("/"))) - -# Write a list of strings to a stream -def writeStrings(l, os): - if l == (): - return os - os.write(car(l)) - return writeStrings(cdr(l), os) - -- cgit v1.2.3