开发者

Best way of making win OS calls from browser app

We have some code that must access low level windows XP os calls which do some simple manufacturing machine controls. These are not real time functions- just setup/config type operations.

All the rest of our system is cloud hosted, and is written in ruby on rails. I want to minimize the amount of windows code we have to write, and keep as much of the code running as a browser app. I also want to as much as possibly deploy the code from the rails server, with as little config or specialized setup of the PC's as possible.

I am looking for recommendations to somehow interface browser based html/javascript code to those low leve开发者_如何学Pythonl calls, that minimizes the work we have to outside our normal rails framework, and is also fairly simple to set up / learn / etc.

What I would like is to keep everything as a normal web application, that some how can make a call out to some PC code.

These bits of PC code are intended to run on a very limited number of installations on PCs that we have full control of security etc in factory floors.

One way perhaps is to make a small java applet (which can be written in Ruby), but I don't know if you can then communicate between the java applet and javascript?

Another way is to do something with silverlight that just provides a basic interface, again I don't know if silver light allows any kind of communication from the HTML/javascript to the silverlight code.

Another way perhaps is to do something as a firefox plugin not sure at all if this would work...

Another way (I think) is create a .net app that contains a browser control. Then the .net app might be able to load the browser window from our rails server, etc.

What would be really nice, would be if there was some way to simply add a new javascript functions that would handle this low level stuff...

Look forward to your input!


As I interpret your requirements and please correct me if I am wrong, you're looking for a way to modify configuration on a number of factory floor PCs running Windows XP--that manage various manufacturing processes--from a web browser running on an administrator's computer.

If this is correct, you'd need to run a web server on each controller to process HTTP requests, and of course there are lots of options you can choose from, but I'm not sure this is the best path.

If I needed to solve this problem, I'd create a Windows "service" that would monitor a configuration file for changes and reconfigure the controller when they occurred.

Using this approach, you could use SCP or SFTP to copy the config file up to the controller(s) and let them reconfigure themselves. This would be more secure and far more lightweight than a web server.

For information on writing windows services in Ruby, see Running a Ruby Program as a Windows Service?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜