Skip to content

Commit 16a9c26

Browse files
committed
misc improvements and code cleanups here and there.
1 parent eaef193 commit 16a9c26

40 files changed

+463
-336
lines changed

README.rst

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,21 @@ along with SOAP 1.1 and the rest-minus-the-verbs HttpRpc protocols which can be
1717
transported mainly via HTTP. We also support ZeroMQ transport where appropriate.
1818
The transports can be used in a both client or server environment.
1919

20-
The documentation for Rpclib can be found `here <http://arskom.github.com/rpclib>`_.
20+
The following are the primary sources of information about rpclib:
2121

22-
The source code is `here <https://github.com/arskom/rpclib>`_.
23-
24-
The official rpclib discussion forum can be found `here <http://mail.python.org/mailman/listinfo/soap>`_.
25-
26-
See the `downloads section <http://github.com/arskom/rpclib/downloads>`_ for related downloads.
22+
* The latest documentation for Rpclib can be found `here <http://arskom.github.com/rpclib>`_.
23+
* The source code is `here <https://github.com/arskom/rpclib>`_.
24+
* The official rpclib discussion forum can be found `here <http://mail.python.org/mailman/listinfo/soap>`_.
25+
* You can download Rpclib packages from `github <http://github.com/arskom/rpclib/downloads>`_ or
26+
`pypi <http://pypi.python.org/pypi/rpclib>`_.
2727

2828
Rpclib is a generalized version of a soap processing library known as soaplib.
29-
The following legacy versions of soaplib are also available:
29+
The following legacy versions of soaplib are also available in the source repository at github
30+
as branches.
3031

31-
* See `here <http://github.com/arskom/rpclib/tree/soaplib-0_8>`_ for the stable soaplib-0.8 branch.
32-
* See `here <http://github.com/arskom/rpclib/tree/soaplib-1_0>`_ for the stable soaplib-1.0 branch.
33-
* See `here <http://github.com/arskom/rpclib/tree/soaplib-2_0>`_ for the stable soaplib-2.0 branch.
32+
* See `here <http://github.com/arskom/rpclib/tree/soaplib-0_8>`_ for the stable soaplib-0.8 branch.
33+
* See `here <http://github.com/arskom/rpclib/tree/soaplib-1_0>`_ for the stable soaplib-1.0 branch.
34+
* See `here <http://github.com/arskom/rpclib/tree/soaplib-2_0>`_ for the stable soaplib-2.0 branch.
3435

3536
************
3637
Requirements

ROADMAP.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ Processing Pipeline
1313
-------------------
1414

1515
We think rpclib package has one last missing element whose addition can result in
16-
touching most of the codebase: A proper pipeline for request processing.
16+
touching most of the codebase: A proper lazily-evaluated pipeline for request
17+
processing.
1718

1819
Currently, every artifact of the rpc processing pipeline remain in memory for the
1920
entire life time of the context object. This also causes to have the whole message
@@ -61,8 +62,7 @@ version number of the Rpclib version once implemented.
6162
* Support for the JsonSchema interface document standard.
6263
* Support for the Thrift binary protocol.
6364
* Support for the Thrift IDL -- The Thrift Interface Definition Language.
64-
* Support for the XmlRpc standard. Thanks to the XmlObject protocol, this
65-
is 90% ready!
65+
* Support for the XmlRpc standard.
6666
* Support for EXI -- The Efficient Xml Interchange as a serializer.
6767
* SMTP as server transport.
6868
* SMTP as client transport.

doc/source/comparison.rst

Lines changed: 58 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
Comparison with other rpc frameworks
55
====================================
66

7+
Oh my.
8+
9+
* http://pypi.python.org/pypi?%3Aaction=search&term=rpc
10+
* http://www.ohloh.net/tags/python/rpc
11+
* http://stackoverflow.com/questions/1879971/what-is-the-current-choice-for-doing-rpc-in-python
12+
713
Ladon
814
-----
915

@@ -20,14 +26,11 @@ Discussion thread: https://answers.launchpad.net/ladon/+question/171664
2026
* Auto-generates human-readable API documentation.
2127
(example: http://ladonize.org/python-demos/AlbumService) In Rpclib, you need
2228
to do with the ugliness of a raw wsdl document.
23-
* Supports both Python 2 and Python 3
24-
* Serves up all protocols at once on same port (see the example above)
25-
* Makes string encoding operations easy (You can control on method level whether
26-
you want all strings delivered as unicode or as str in a specific encoding)
29+
* Supports both Python 2 and Python 3.
2730
* Does not support ZeroMQ.
2831
* Uses standard python tools for xml parsing which is good for pure-python
2932
deployments. Rpclib uses lxml, due to its excellent namespace support and
30-
speed. So Rpclib-based solutions are easier to develop, faster to work with
33+
speed. So Rpclib-based solutions are easier to develop and faster to work with
3134
but more difficult to deploy.
3235
* Does not do input validation for SOAP.
3336
* Does not support events.
@@ -39,4 +42,53 @@ Discussion thread: https://answers.launchpad.net/ladon/+question/171664
3942
callables. This lets ladon api to be simpler, but gives the rpclib api the
4043
power to have declarative restrictions on input types.
4144
* Does not test against ws-i.org deliverables for testing soap compatibility.
42-
* Does not support modifying protocol & transport headers.
45+
* Does not support parsing and/or modifying protocol & transport headers.
46+
* Does not offer declarative constraints.
47+
48+
RPyC
49+
----
50+
51+
This is preliminary. Please correct these points if you spot any error.
52+
53+
* Uses own protocol
54+
* Does not do validation.
55+
* Python-specific.
56+
* Fast.
57+
* Not designed for public servers. ??
58+
59+
rfoo
60+
----
61+
62+
This is preliminary. Please correct these points if you spot any error.
63+
64+
* Uses own protocol
65+
* Does not do validation.
66+
* Python-specific.
67+
* Fast.
68+
* Not designed for public servers. ??
69+
70+
71+
Suds
72+
----
73+
74+
* Excellent wsdl parser, very easy to use.
75+
* Soap 1.1 / Wsdl 1.1 Client only.
76+
* Slow.
77+
78+
ZSI
79+
---
80+
81+
* Unmaintained
82+
83+
SOAPPy
84+
------
85+
* ???
86+
87+
rsl
88+
---
89+
* Unmaintained.
90+
* Client only.
91+
92+
PyRo
93+
----
94+
* ???

doc/source/h_and_f.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ History and Future
66
******************
77

88
.. include:: ../../ROADMAP.rst
9+
.. include:: comparison.rst
910
.. include:: ../../CHANGELOG.rst

doc/source/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ Contents
1717
tests
1818
faq
1919
h_and_f
20-
comparison
2120

2221
******************
2322
Indices and tables

doc/source/manual/helloworld.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,15 @@ Hello World
55
===========
66

77
This example uses the stock simple wsgi webserver to deploy this service. You
8-
should probably use a full-fledged server when deploying your service for
8+
should probably use a full-fledged server when deploying your service for
99
production purposes.
1010

1111
Defining an Rpclib Service
1212
--------------------------
1313

14+
Here we introduce the fundamental mechanisms the rpclib offers to expose your
15+
services.
16+
1417
This example is available here: http://github.com/arskom/rpclib/blob/master/examples/helloworld_soap.py.
1518
::
1619

doc/source/manual/highlevel.rst

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ The following is most of the Rpclib jargon:
1818
* **Transports:**
1919
Transports, also protocols themselves, encapsulate protocol data in their
2020
free-form data sections. E.g. Http is used as a transport for Soap, by
21-
tucking a Soap message in the Http byte-stream. Whereas the HttpRpc protocol
22-
exposes Http as a protocol. One could use Soap as a transport by tucking a
23-
message in its base64-encoded ByteArray container.
21+
tucking a Soap message in the Http byte-stream part of a Http POST request.
22+
The same Http is exposed as a "protocol" using the :class:`rpclib.protocol.http.HttpRpc`
23+
class. One could use Soap as a transport by tucking a protocol message in its
24+
base64-encoded ByteArray container.
2425

2526
Transports are separated to two packages in Rpclib source code:
2627
:mod:`rpclib.client` and :mod:`rpclib.server`.
@@ -41,18 +42,18 @@ The following is most of the Rpclib jargon:
4142
* **Serializers:**
4243
Serializers can be considered mostly as apis around hiearchical key-value
4344
stores. Various xml apis like ``lxml.etree.Element``, Python's own
44-
``xml.etree.ElementTree``, or pickle, simplejson, YaML and the like fall in this
45-
category. They're a little bit more difficult to abstract away because each has
46-
their own strenghts and weaknesses when dealing with complex, hiearchical data
47-
with mixed types.
45+
``xml.etree.ElementTree``, or apis around pickle, simplejson, YaML and the like
46+
fall in this category. They're a little bit more difficult to abstract away because
47+
each has their own strenghts and weaknesses when dealing with complex, hiearchical
48+
data with mixed types.
4849

4950
Serializers are currently not distinguished in rpclib code. lxml.etree is
5051
used as xml serializer, and a custom wsgi callable is used as http serializer.
5152

5253
How your code is wrapped
5354
------------------------
5455

55-
A typical user of the Rpclib will just write methods that will be exposed as
56+
A typical Rpclib user will just write methods that will be exposed as
5657
remote procedure calls to the outside world. The following is used to wrap that
5758
code:
5859

@@ -81,15 +82,15 @@ code:
8182

8283
.. NOTE:: You might know that rpclib is a generalized version of a
8384
soap library. So inevitably, some artifacts of the Soap world creep in
84-
from here and there .
85+
from here and there.
8586

86-
And, namespaces are another artifact of the Xml world. There are varying
87+
Namespaces are another artifact of the Xml world. There are varying
8788
opinions about the usefulness of the concept of the namespaces in Xml,
8889
but we generally think it to be A Nice Thing, so we chose to keep it
8990
around.
9091

91-
When instantiating the application, you should also give it a
92-
targetNamespace (the ``tns`` argument to the :class:`Application` constructor)
92+
When instantiating the :class:`rpclib.application.Application`, you should also
93+
give it a targetNamespace (the ``tns`` argument to its constructor)
9394
string and an optional application name (the ``name`` argument to the
9495
:class:`Application` constructor), which are used to generally distinguish your
9596
application from other applications. While it's conventionally the URL and

doc/source/manual/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,4 @@ aspects of Rpclib by examples.
1717
usermanager
1818
sqlalchemy
1919
metadata
20-
typecust
2120
t_and_p

doc/source/manual/metadata.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
Working with RPC Metadata
55
=========================
66

7+
This section builds on :ref:`manual-usermanager` section. If you haven’t done so,
8+
we recommended you to read it first.
9+
710
In most of the real-world scenarios, rpc data comes with additional baggage like
811
authentication headers, routing history, and similar information. Rpclib comes
912
with rich mechanisms that lets you deal with both protocol and transport

doc/source/manual/sqlalchemy.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ SQLAlchemy Integration
77
This tutorial builds on the :ref:`manual-user-manager` tutorial. If you haven't
88
done so, we recommended you to read it first.
99

10-
Let's try a more complicated example than storing our data in a mere dictionary.
11-
12-
The following example shows how to integrate SQLAlchemy and Rpclib objects, and
13-
how to do painless transaction management using Rpclib events.
10+
In this tutorial, we talk about using Rpclib tools that make it easy to deal with
11+
database-related operations. We will show how to integrate SQLAlchemy and Rpclib
12+
object definitions, and how to do painless transaction management using Rpclib events.
1413

1514
The full example is available here: http://github.com/arskom/rpclib/blob/master/examples/user_manager/server_sqlalchemy.py
1615

0 commit comments

Comments
 (0)