lundi 26 novembre 2018

custom search web server/stack in Python

I'm implementing a specialized, private web search application in Python that uses homomorphic methods to process encrypted queries. For this, I need a combination client/server where

  • the client sends rich data structures to the server expressing the query (dict, lists, large integers)
  • the server evaluates every document in its stores against the query, largely by performing a cryptographic operation using said data structures
  • the server returns multiple return buffers every so-many records back to the client for further processing

Ideally, the server could grow to support application multi-threading, in the sense of being able to distribute the query to a pool of workers for mapping, and then aggregating the maps together in a reduce operation to provide one answer back to the client; however, performance is not a factor initially. This is a demonstration, so should be as simple as possible to code up. Also, the server should work with plaintext documents, or rather, the framework shouldn't impose how the documents are stored (each document will have metadata associated with it). Also, I don't need authentication or https. User data caching would be nice, but if the server gives me client information, I can probably manage my own cache data structure to handle client data.

The code I have is written in Python, both for the server and the client, but in a pinch, I could adapt. So far, I am leaning toward CherryPy for the server, because it has a tremendous set of documentation and I think I can get something running quickly in it, but then I can't seem to find reference to anyone using Brython or Skulpt with it.

Has anyone implemented a custom web server using some Python framework? Thanks for your help.




Aucun commentaire:

Enregistrer un commentaire