Things for today: Complete the deployment/integration with dyna.cainer.com, finally work out the placement algorthm for centering text around the radius of a circle (needed for the natal wheel,) storing sessions inside a/the database and work on the cron-job based transit retrieval for a three day forecast (using the separate retrieveTransits2 web service API call.)
Started off investigating PHP sessions, extending their life, and how we can go about storing them in a database, as they default to being stored in files in the /tmp directory - which won't work very well if we're firing off requests to different servers.
Discovered we can set session.gc_maxlifetime in php.ini, which defaults to 1440 seconds, which isn't really good as the underlying sessions can be destroyed before the cookie expires, so the browser will think it's logged in, and php won't. So we'll have to change that to something more reasonable. The next step is to save the session information to a database to handle load balancing. We already have the basic structure in place to handle different database
connections (restricting all requests with cookie x=y to database z) which should give any database replication a chance to happen.
Saving to the current MySQL database is done, after some fiddling around because I keep forgetting the PHP functions don't see global variables, unless you tell them the variable is global. There must be some way around this which needs investigating.
Some thoughts about the transit retrieval, which we'd like to happen on a daily basis. At present, this is done via calls to a web service. Also presently, this is pretty much stateless, in that the
call to get today's transits has to supply date and place of birth, with nothing stored on the side of the web service. If we're going to be handling 1000s of users (100 000 or 200 000) we will probably need a local shared library implementation of ballista, with a PHP api. In fact, a locally running process could independently update the transits within the database without any involvement from PHP.
Sorted out the planet and sign character placement for the natal wheel, turned out to be a bit simpler than I thought it would be, once I sketched it all out on a piece of paper.
Friday, January 30, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment