Web Connection supports both File based and COM operation. File based is meant for development while COM based is meant for deployed applications, but it's also possible to run file based in production.
COM Servers start automatically
COM Servers are automatically launched on the first hit to the server. They also shut down if the Web application shuts down. They do not need to run as a service or require any other auto-start mechanism.
Reality: FoxPro servers crash occasionally, try as you might. Using COM Web Connection can detect failures immediately and restart crashed COM servers automatically. This is not possible in file mode.
Better Remote Management
COM servers can be administered entirely over the Web. You can easily start and stop instances and change the count of instances running. You can get basic server execution stats. You can also remotely update your Web Connection Server binary without shutting down the site, simply by uploading a new binary and hot-swapping the new binary on the fly.
- Improved Performance in high volume environments
COM operation provides better performance under load as it eliminates the message files that are used for file based messaging. Under low load scenarios the difference is minimal but under heavy load COM can significantly improve throughput.
COM Servers require a little bit of extra setup initially if you are doing manual configuration as the COM server has to be registered on the remote server.
It can also be harder to fix startup errors in COM servers, because COM Servers generally run invisibly. It's important to test your COM servers locally before deploying them to a live server and possibly also running your live server in file mode first to ensure that everything works.
If you run into startup errors make sure you check out
wctracelog.txt which logs startup errors.
No code changes required
COM operation is supported transparently by Web Connection and you can very easily switch back and forth between COM and File modes. Other than potential security related issues (if your COM server launches under different credentials) file and COM server applications behave the same.
Server Startup Code in wwServer::OnLoad()
Make sure you don't have server startup code in the wcDemoMain startup code snippet. It's a common error that startup configuration is placed in the PRG files startup code which is not contained in the server. When running in COM this startup code is never fired - the COM Server is directly instantiated.
Any startup code you want to run when your server loads should be handled in the
wwServer::OnLoad()overload in your Web Connection server class.
Comment or report problem with topic