Friday, December 8, 2017

Zero-code WebBroker support

Just a quick note to signal that Kitto2 has just gained WebBroker support, which means new deployment options such as CGI, ISAPI and Apache modules.

Kitto-only WebBroker applications

Kitto's approach to WebBroker deployment is zero-code, meaning that you just need to create a standard WebBroker project through Delphi's wizard, choose the deployment option that you require, and then in the generated project ditch the auto-created empty WebModule unit and add Kitto.WebBroker.WebModule to the uses list. That's all.

Mixing Kitto with other services in the same application

Alternatively, if you want to mix the Kitto application with other services or for any other good reason you require to keep the generated WebModule, you just add the following code to the WebModule1DefaultHandlerAction event handler or to some other web action handler:

Handled := TKWebBrokerHandler.Current.HandleRequest(Request, Response);

Also add the Kitto.WebBroker.Handler unit. By the way, this unit will be useful if you need to integrate a Kitto application into any sort of existing application (as long as it is an HTTP server), provided you can manufacture the needed TWebRequest/TWebResponse classes.

Implementation status

This has required a complete reimplementation of session management in Kitto, which is now independent from Indy, more manageable and hopefully faster. The code still needs some testing (especially look for deadlocks and race conditions) and possibly a few refinements. This is currently being done, but you can start experimenting.

No comments:

Post a Comment