Opinions, please: Repository module

andy andy at eastonwest.co.uk
Sun Jan 5 19:17:43 EST 2003


On Sunday 05 Jan 2003 11:21 pm, Paul Rubin wrote:
> If you're exposing it to the internet you really better have some security
> to keep dipwads from taking over the server.

Yep, I understand that: it's just a 'first poke' at doing this, and as I said, 
it's for something for my kids - to run accross our 'family' lan.
>
> Something wrong with xmlrpc over http using urllib or something like that?

Overkill for what I wanted to do.  Yes I looked at xmlrpc, and will definately 
do so again in the future, but for this, it's way too much: learning curve, 
complexity (well, maybe)...

> If serving a request involves doing anything complicated, you really
> want to provide some kind of concurrency, even if it's simple forking.

Each request is simply an assignment to or 'read' from an in-memory 
dictionary.

> I'd say use the XMLRPC module instead of a dictionary.  You really
> should have some kind of authentication, too.

As you do with this kind of project, seeing lots of possibilities, I've kept 
an extensive list of 'stuff for later'.  This does include authentication, 
simple security (i.e. who cant read/write what keys etc.), the thought of 
using SSL, cPickle, Base64, persistency etc.  But to kick things off, I 
needed to get the bare bones sorted out.

> What happens if the server stops running?  If the repository isn't
> persistent, it's not really a repository.

At the moment, the clients die.  That's ok for what I want now - my kids can 
deal with the dissappointment (they use Windows based educational software, 
for eg.).

> Yes, MySQL ;-)

No, not a database.  Already thought about that.  Again, overkill, and too 
much more to learn (don't know SQL, don't have a SQL server running/set up 
etc.)

> It sounds like you're doing a worthwhile learning exercise but not
> something really suitable for general release.

Didn't I say that?

Just to show you the (lack of) depth of the project this is for, it's a simple 
'virtual playground' for my kids, something to encourage them to 
read/write/type/mouse more.  They were immensely impressed by the simple fact 
that they could move a 64x64 pix image of themselves round the screen and 
'jump' on the icky hand-made gimp-graphics furniture I drew for them.  My 
kids are 2, 5 and 7...

This module is to enable me to network this effort, allow simple 'chat' 
speech-bubbles, maybe animation and sound effects.  The repository only needs 
to store the x,y co-ordinates of all 'characters' plus some other details 
like face image file etc.  It may later support different rooms, non-player 
characters and so on, as demanded by the sprogs.

I wasn't trying to suggest that I'd invented the next greatest PEP...  

-andyj





More information about the Python-list mailing list