XmlRpcFilteringPipe
Revision r1.19 - 02 Jan 2005 - 11:00 GMT - LionKimbro
Current Design / Summary
At the moment (as being implemented in PipeFilters):- struct myapp.filterData(base64 data, string contentType, struct params):
- Accepts:
- data (base64): Data stream to be filtered
- contentType (string): MIME type of data being passed
- params (struct): Arbitrary parameters to the filter
- Returns:
- (struct):
- data (base64): Filtered data stream
- contentType (string): MIME type of filtered data
- (struct):
- Accepts:
- base64 myapp.filterData(base64 data):
- Accept a stream of data/text in base64 (data), process the data, return the results as a stream of data/text in base64.
Existing Implementations
- Blosxom plugin -- warning, hardcoded to "wiki." namespace.
- MovableType pluging -- also hardcoded to "wiki." namespace.
- XrFilter -- Python command line tool for piping data through an XmlRpcFilteringPipe
Concept
This seems like a simple enough idea that could use with a standard spec: I have text. They have something that consumes text, colorizes the text in HTML, and produces text. You've got something like that too, only you turn my mentions of stock symbols into links to reports on the stock. I want to pass my text through each of your services in series. How about you two expose a simple XmlRpc method on your service, and I'll call them, feeding the output of one method to the input of the next? So, in effect, we have something like:-
cat my_html_text.txt | their-funky-31337-colorizer | your-stock-symbol-linker > my_new_html_text.txt
- base64 myapi.filterData(base64 data):
- Accept a stream of data/text in base64 (data), return the results of processing as a stream of data/text in base64.
base64 *.filterData(base64 data)
So, if I ever implement some standard XML-RPC introspection methods on my APIs, I'll just look for those signatures if I happen to want to create a pipe-building GUI for instance.
-- LesOrchard - 13 Mar 2002
More thoughts while driving home from work last night. Thinking that I'll expand the simple spec into something more sophisticated:
- struct myapp.filterData(base64 data, string contentType, struct params):
- Accepts:
- data (base64): Data stream to be filtered
- contentType (string): MIME type of data being passed
- params (struct): Arbitrary parameters to the filter
- Returns:
- (struct):
- data (base64): Filtered data stream
- contentType (string): MIME type of filtered data
- (struct):
- Accepts:
Uses
Here are a few uses for which I might want to apply this idea:- XmlRpcFilterService: Ubiquitous personal (desktop/laptop) text filtering service
- WeblogWithWiki
- Build this piping into a BloggerAPI client. Cause the client to dip weblog entries through a WikiEngine?'s XmlRpcToWiki filterData method to produce weblog entries imbued with WikiLinks? and WikiFormat?
- PipeFilters
- Use filtering pipes in macros &etc in RadioUserLand
- Remote page scripting / formatting
- Expose a text-based macro or page scripting language, ala PHP or JSP or ASP. Process the incoming data through it as if it were a local page (with sandboxy restrictions). Return the results.
- Can/should we use HTTP Content-type info to denote string encodings?
- I'd like to extend the API, to allow for a function that documents the parameters. That is, you call a function, and it returns a dictionary, telling what the interface does, what it's all about, the FOAF of the person who wrote it, the name of the person who wrote it, what the parameters titles are, and a doc-string for each parameter.
- I have an XML-RPC server. It doesn't have any namespaces. Is it still possible to use the XmlRpcFilteringPipe?
- How do existing plugins know what namespace to use?
- Designate "wiki." as the standard namespace,
- Designate "filter." as the standard namespace,
- Designate something else as the standard namespace,
- Designate that no namespace is used.
