The Crucible Slowly Forms
Progress on Crucible continues at an even pace.
I updated my Ajax.js Javascript code file to support XmlCGI request formation. Whereas the original version defined an Ajax.Requestor object to handle the web services communications back to the server, I added an Ajax.XmlCGI object to create and format the XmlCGI protocol string.
The server side code saw a lot of progress last night with the ServiceManager module. Given an XmlCGI document, I can parse and verify the basic protocol structure, dynamically load the requested service into a service pool and call the requested service method.
Before I test this in a live browser/server environment, I need to finish the ServiceContract module, write the JSON string formatter, test the DBRegistry module and, finally, make sure that the infrastructure is secure and can tolerate errors well. The simplest form of a DoS attack is to throw gibberish at a system and make it crash. I have a global Ruby exception handler in services.fcgi to catch any kind of Ruby error and treat it gracefully. I hope it’s enough.
Update:
The ServiceContract module and JSON string formatter are done. I’ll do the DBRegistry tomorrow.
Update #2:
DBRegistry is finished as is a new module, DBContract. DBRegistry encapsulates the MySQL connection information while DBContract lists the databases that a service would need as well as holding a copy of a connection handle. ServiceManager is responsible for maintaining a database connection pool and passing these handles to individual services. Both modules are finished and working.