We've recently moved hosts! Please report any weirdness with the wiki (or spam) on Utopia.

Conspire Development Scratchpad

From BBSWiki

Jump to: navigation, search

Contents

Python

Twisted

Multi-client communication

UI

Database

Misc

Unicode

XML

  • lxml - Python wrapper for the C libxml2 and libxslt libraries. 1.x version depending on libxml2 2.x -- looks stable.
    • XML Schema validation
    • XML document parsing using an API very similar to ElementTree
    • The API extends ElementTree API to expose libxml2 and libxslt specific functionality, such as XPath, Relax NG, XML Schema, XSLT, and c14n. Python code can be called from XPath expressions and XSLT stylesheets through the use of extension functions. lxml also offers a SAX compliant API, that works with the SAX support in the standard library.
  • SimpleXMLWriter module for ElementTree
  • XML anti-bozo page

Compression

  • gzip (using StringIO and included gzip)

Unit testing

PostgreSQL

Programming paradigms

Event-driven programming

  • http://en.wikipedia.org/wiki/Event-driven_programming - see links here
  • http://eventdrivenpgm.sourceforge.net/ - Good Event-driven overview, tutorial doc
  • One idea is to program a hybrid server in the following way: One thread does all network I/O (using event systems), and the other threads execute the operations the server provides. For example, consider a server doing remote procedures (as most servers do). Such a server receives requests, and every request is responded. When the server starts up, the networking thread begins to wait for requests. When a complete request has been received, a new thread is started performing the requested operation. The network thread continues immediately, normally doing other network I/O. When the operation is over, an artificial event is generated indicating this situation (see below on artificial events). The artificial event carries the result of the operation, and is added to the event system directly from the thread that executed the operation. This thread can now stop working. The network thread receives this artificial event like every other event, and can start sending the result over the network back to the client.
    http://ocaml-programming.de/packages/documentation/equeue/users-guide/c494.html

Design patterns

  • Read up on MVC (see CS 320 notes)
  • Observer, aka publish/subscribe

Wire protocol

Transmission

Packaging

  • SOAP complex and requires polling
  • JSON-RPC very preliminary Twisted support and async
  • XML-RPC what SOAP came from; simple. requires polling. wide support.
  • XMPP bidirectional XML stream protocol used by Jabber, with Twisted support ..ish?
    • [1] (thread)
    • [2] (explanation of protocol)
    • [3] (some XMPP Twisted chat code)
    • [4] (Twisted jabber package)
  • NetStrings extremely simple, 8-bit clean, supported by Twisted

General XML stuff, software, etc

Web Front End

License

Forum Threads, Polls, etc.

Django

Personal tools