»
S
I
D
E
B
A
R
«
Phroxy: a proxy server written in haskell.
Jul 11th, 2009 by Axman6

This isn’t an announcement, but a discussion of the next project I’d like to try writing in haskell. I’ve been thinking of ways in which I can use my TernaryTrees package, and I realised that a proxy server could be a nice way to do that.

I’m still trying to think through the details of what needs to be implemented, and how it should all work, but I’d like to it be something concurrent, with one thread handling each request to fetch objects if needed, and another thread keeping track of a TernaryMap (Or maybe I’ll release the StringMap in the TernaryTrees package that’s in the repo), which can be used to keep track of which elements have been cached, and other info about the objects. It occurs to me that this job seems ideally suited to my AVar package, which is a concurrent ‘variable’, that can be used by many concurrent threads, and will do as much as it can to stop itself from being destroyed by exceptions.

I think there’s a few things I’ll need to add to TernaryTrees before I can get a nice proxy working, mainly a delete function to remove elements from the trees. I’ll probably have to do some more work on AVars before i can use them too. But my main problem is not knowing how to do anything to do with HTTP, both fetching and serving. I’ll be taking a look at the HTTP and HTTP-server libraries to see what i can figure out, probably by starting with seeing if i can fetch some data, save it to a file, and send it on to somewhere else.

I’d really live to hear from others about this if they read it, and give me any ideas you may have had about the subject.

– Axman

»  Substance: WordPress   »  Style: Ahren Ahimsa
© Alex Mason (Axman6) 2009