Running UI Automation Routines Concurrently

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
mightycpa
Automation Wizard
Posts: 343
Joined: Mon Jan 12, 2004 4:07 pm
Location: Vienna, VA

Running UI Automation Routines Concurrently

Post by mightycpa » Wed Nov 22, 2006 1:59 pm

Hi Marcus,

You have a September blog entry with this title, and in it you write:
...Clearly it is expensive and wasteful to use one PC for each automation routine you need to run, so solutions like this save money and this is one approach you can use. But depending on the complexity of your scripts you may need to add lots of status checks and pauses. A much simpler solution is to use Virtualization. Install Microsoft Virtual PC, or VMWare and run each automation in its own virtual machine. Effectively you end up multiplexing the physical PC into several virtual PCs and your scripts can run safely in their own virtual machines without interfering with each other.

But on those occasions you need two UI scripts to run at the same time and interact with the same environment, our simple little flag hoisting solution is one you can use...
Can you explain this a little more? Does "environment" in this sense mean OS? We're currently using 10 dedicated machines to run an automation task, all at the same times. How can I get my scripts to run safely in their own virtual machines without interfering with each other? All of them need to use the mouse and keyboard.

I don't think I understand what you mean.

Tx,

George
"A facility for quotation covers the absence of original thought." - Lord Peter Wimsey

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Wed Nov 22, 2006 3:08 pm

Hi,

I take it from your message that you haven't tried VMWare or Virtual PC? Both are now free.

Virtual PC is a product from Microsoft. It lets you create virtual PCs INSIDE a host machine. You can install any guess operating system. So physical machine 'A' can now contain say 5 virtual PCs, all running whichever operating system you like. Instead of running 10 physical machines you could run one machine with 10 virtual PCs inside it (or if your PCs aren't powerful enough, 2 with 5 each ... whatever). The scripts won't interfere - each virtual PC is completely separate from the others. They don't even know about each other. It is just like having 10 different computers.

You really need to download and install Virtual PC to understand what I am saying. Install it and create a new virtual machine. Install XP into that virtual machine. Create another. You now have two XP PCs running *inside* your main machine. They work and act just like two completely separate PCs. They can still get out on the network. So they can still access network resources. You can install/access the software/resources you want automated in each one and install Macro Scheduler into each one.

You would save huge amounts. Not only do you save on the costs of the PCs themselves but you cut down on power costs, storage costs and environmental costs. See my other blog post here where I mention how one of our local government offices here has saved by replacing legacy systems runnong on 40 servers with just two servers running virtual environments!
http://www.mjtnet.com/blog/2006/10/31/green-it/
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Wed Nov 22, 2006 3:10 pm

P.S. if you still don't follow me, I could demonstrate. Give me a call and we'll do a desktop sharing session and I can show you my PC running Windows XP, Windows NT, Windows 2003 and Linux in four different virtual PCs all at the same time.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

mightycpa
Automation Wizard
Posts: 343
Joined: Mon Jan 12, 2004 4:07 pm
Location: Vienna, VA

I get what you're saying, but let me ask differently

Post by mightycpa » Wed Nov 22, 2006 4:11 pm

OK,

So far I understand the concept. You've essentially split one machine into many, each running an independent OS. So, you might have a UNIX db running, as well as a Windows webserver. They share the same hardware, though, and that is the point of my question.

We use 10 PC's, because we process so many records in a fixed amount of time. We use an application to process these records, and the only way to control the application is using a mouse and keyboard. As you pointed out in your blog, two people can't use a mouse and keyboard at the same time. You either have to take turns, or you have to use different pc's. We use different pc's because there is no downtime between records.

My first assumption is that you don't have to have many different OS's, you could create several instances with the same OS. In fact, the configurations could be identical. Right?

Given that I need the user interface (ie, the screen) to run the apps, two possibilities jump to mind:

1) Because the physical screen can only display one environment at a time in full screen mode (what we require), and the physical keyboard can only accept single keystrokes at one time, a virtual PC would not help, because several apps can't use the mouse and keyboard at the same time.

2) Because the pc's are truly virtual, each instance has its own virtual mouse and keyboard (equivalents?) and apps can use them simultaneously without conflict. For example, one instance can be typing the letters a - z, and clicking on the top left of the screen, and another the numbers 0 - 9 repeatedly, clicking on the bottom right and neither app will interfere with the other.

Our situation would require scenario #2, it is not clear (to me) if virtual PC'ing would allow this.

Thanks for the offer of a tour, but today is a rough one for me. Maybe next week.

Tx,

George
"A facility for quotation covers the absence of original thought." - Lord Peter Wimsey

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Wed Nov 22, 2006 4:26 pm

2) Because the pc's are truly virtual, each instance has its own virtual mouse and keyboard (equivalents?) and apps can use them simultaneously without conflict. For example, one instance can be typing the letters a - z, and clicking on the top left of the screen, and another the numbers 0 - 9 repeatedly, clicking on the bottom right and neither app will interfere with the other.
Correct. Yes, each virtual OS has it's own virtual hardware. So each has a different keyboard and mouse. When a macro sends keystrokes and mouse events in one virtual environment it will work, won't effect the others, and will work regardless of what the real physical keyboard is doing to the physical machine. As for full screen - you're talking about the windows you are automating which are now WITHIN the virtual OS. So you just have these maximise as normal. Makes no different what the Virtual PC window looks like (the window that contains the virtual machine) - inside it has a maximized app.

If I'm not explaining it well go to http://www.vmware.com or http://www.microsoft.com/virtualpc .. or try it.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Wed Nov 22, 2006 4:36 pm

BTW - this is nothing new. Back in 1998 we helped with some load testing with Macro Scheduler running under 100s of multiplexed PCs. We had the equivalent of around 1000 PCs all running Macro Scheduler UI macros at the same time.

Note also that Intel and AMD are now building in virtualization support into their processors. Vista also comes with a license that allows you to run a number of virtual copies of Vista - 4 if I recall.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

mightycpa
Automation Wizard
Posts: 343
Joined: Mon Jan 12, 2004 4:07 pm
Location: Vienna, VA

thanks

Post by mightycpa » Wed Nov 22, 2006 4:40 pm

No,

I think you explained it very well, it is probably my disbelief getting in the way!

1998? WOW.

Thanks.

George
"A facility for quotation covers the absence of original thought." - Lord Peter Wimsey

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts