In the kiosk system I'm setting up, all Kiosks communicate with a central server to check in and receive update commands. I don't use the Dual Http communication because I can't guarantee what ports are going to be allowed at the client site, so communication is always initiated from the Kiosk (client). I currently have an Update contract which returns an enum called KioskAction which represents all of the commands that a kiosk can do (UpdateClient, SendLogFile, UpdateSetting, etc). This is working well enough, but I'm wondering if there is a more elegant way of handling this.
The current Update method on the Kiosk looks something like...
var kioskAction = KioskService.Update(kioskId);
switch(kioskAction)
{
case KioskAction.SendLogFile:
KioskService.SendLogFile(kioskId, GetLogFile());
break;
case KioskAction.UpdateSettings:
Setting[] settings = KioskService.GetKioskSettings(guid kioskId);
UpdateSettings(settings);
break;
...
}
My problem with this is that in order to add more kiosk functionality, I have to rebuild and redeploy both the kiosk application and the WCF service. What I'm considering is returning a script of some sort (probably IronPython) which actually contains the code necessary to perform the action. Then I could add new functionality just by adding a new script to the system without any changes to the Kiosk application or the Kiosk Service.
There are obviously some security concerns since the Kiosk Client is essentially running any code that the Kiosk Service returns, thus if the Kiosk Service is compromised, all of the Kiosks could be as well. Are there any other things I need to watch out for, or I should take into consideration before moving in this direction?