25 December, 2006

webweaving: wonking out more codey code code designs

Each client app doesn't actually need the full database, just the user's mailbox and netlog. Could do a complete copy of the db, but then everything will need to at least be encoded into something other than cleartext. Yes, I should probably do that anyway. It's a good thing that no one is actually waiting to use this, or paying for it, because it'd be very late, and extremely over budget.

So. All db fields should probably be encrypted.

Message relay: for asynchronous replication of the database. Write queries made locally will need to be logged (for backup purposes) and forwarded on to each application using the database. Idea here is to speed up each app by using the local databases instead of having a single remote database.

The query relay messages will need to have username/client information and possibly a TTL to allow for propagation of relayed messages amongst the various applications, but also prevent an application from processing a query relay message it sent to the network. (Network being used very loosely here.)

Don't really know about trying to implement a mailer-daemon/XMPP server/peer-to-peer overlay network kinda thing. Reading reading reading. Still think the bounce off an external server IP reporting thing would be simplest, and allows for direct connections. (Side note: could do a small HTTP server, then have each relay request a script which would queue the relayed message. Details, details.)

Client logon -> sends logon / pw to a local script (local db query) -> checks a remote script (with failover URLs for timeout factor) which will return HTTP_X_FORWARDED_FOR and REMOTE_ADDR.

The client will then parse the results of the script, and write username, fwd_for, and rem_addr to a database table. The remote script will also add said values to its db.

Direct client-to-client chat could then be performed by looking up a username in the table, and trying to connect to fwd_for and rem_addr at whatever port number gets implemented.

0 Comments:

Post a Comment

<< Home