User interface synchronization between two identical software applications running on different machines - algorithm

I wrote a desktop application that runs on two different machines (machine A and machine B). The GUI of the application on machine A needs to synchronize with that on machine B when both applications are running and communicating with each other.
For example, if user 1 press a button in machine A and move to a new UI page, the same navigation needs to occur in machine B as well. The user input will be touch input only and the user will only operate on one of the machine at a time. I have a few thoughts for the implementation:
Approach 1 is to enumerate all UI pages as "states" and enumerate all possible events (ex. button presses). When an event occurs on machine A, it will forward the event alongside its current state to machine B before handling the event. Upon receiving the forwarded event, machine B will first ensure its current state matches that of machine A before handling the event. This will allow machine A and machine B to synchronize their GUI in an "event-driven" basis (except the initial setup to make sure they have the same starting point).
Approach 2 is similar to approach 1 except machine A will be sending the coordinate of the touch input to machine B in the example above. Machine B is responsible for detecting whether the touch input coordinate matches a UI control. This will eliminate the need to enumerate all the possible events but maybe tricky if the application runs on different screen size.
Please share your feedback on both approaches. I may not be thinking in the right way so any alternative are welcome as well. Please let me know if you need any clarification on my question. Thanks!

Related

Create two independent desktops?

I'm running some kind of POS application which makes exclusive use of the whole desktop to not to let the user access any of the Windows system functions. To do this, I use the WinAPI functions
CreateDesktop()
OpenDesktop()
to open an own desktop and to start this application there. This works fine for one desktop.
Now there is the possibility to connect a second monitor to this PC. Windows by default extends its desktop over the full area of both monitors. But this is not a solution for my application, here I want to start two GUIs in the same manner as described above but on every monitor exclusively.
But: I do not see any possibility to hand over a monitor identifier to the functions CreateDesktop()/OpenDesktop(). So any idea how this can be done?
Thanks!

Managing a lot of computers at once

I have a classroom with ~20 PCs. One for the teacher and all others are for students. They all have pre-installed licensed Windows 7 Home Premium (cause reasons) and reinstall OS to another is not an option :( Also they all are in same work-group (in one net).
Is there any tools (like Active Directory \ VNC \ "Microsoft Garage Mouse without Borders" etc.) which can do exactly the same operations at exactly the same time on all students computers from the "main" teacher-pc? For example: I start this "magic" program in small window, it connects to all PCs (if it can), then I move my mouse inside it to the left and all mouses on all PCs moved the same way. Press Start - it will open Start on all student-PCs. It's some kind of botnet program (I suppose), but it will help a lot.
VNC not good, cause you must reconnect every time and do the same operations x19 times - eh...
AD as I read didn't support Home Premium (or I misunderstood?) - eh again.
If there is no such tool\tools, what kind of OS (may be some Linux distributives) can do such thing?
Well,
Let me take this in three different perspectives.
1) Sharing the screen. There comes a hardware called as screen splitter (Use the one which requires power adapter)
Pros : scalable witout using Netowrking., No lag.
Cons : View only mode, Students cannot perform any action.
2) Sharing the desktop
As you have already mentioned, there are tools like teamviewer (Internet/LAN), VNC (LAN) which can be used. They require network access hence the connection might drop at time.
Pros: Students have simultaneous access to their machine
Cons: Connection may be an issue
3)Only sharing the resources
I dont think this is of your use but Active directory in windows and LDAP or LTSP on Linux is something which helps achieve resource sharing but doesnt help in desktop sharing.
IMO: You have to either go by 1 or 2. Both at the same time cannot be achieved with a legacy.
EDIT: My asnwer is considering you as a teacher and not sys admin. In the later case, tasks might be different which can be handled in various other ways.

How specifically does one detect that a user is idle on Windows 7?

Given that Outlook runs in most offices, and given that a screensaver may user CPU, or network file copies, or virus scans, or network installs by the admin (granted, that usually happens when you're logged out), and all the myriad other things that might occur on a Windows 7 desktop in an office environment, how could I possibly know that a user is idled out, and not just reading a PDF?
Do I use a set of metrics to sample at regular intervals and use that to determine "away" or do I need to monitor some file, is there a API that should be exposed?
I can't rely on screensavers being active, or the computer entering a specific power state, and I'm not sure what is exactly off-limits, but I also don't know what's on-limits, as it were.
I think you're looking for GetLastInputInfo, which tells you how long it's been since the user hit a key on the keyboard or wiggled the mouse (or touched a touch-enabled screen?).

Damaged files on Windows Mobile

I'm in need of help. The situation is the following:
We have a software that runs on Windows Mobile 5 and 6. It is deployed in around 15 cities on different devices (Motorola MC35, MC55, MC65, MC75, MC75A, ES400). It works perfectly fine everywhere except in one city. They have MC75A devices and every once in a while we get a helpdesk about our software disappearing from the device.
The most interesting part is when we log in to check the device, all we can see is a damaged/corrupted file system and the OS, which is set back to default.
We tried to reconstruct the problem here at our company, but we find it impossible. I'm wondering if anyone has ever bumped into this.
I'm gonna attach two images of the corrupted file system.
We use custom windows settings and AppCenter to protect the operating system from our customers. (They shouldn't be able to modify any settings on their own).
In general such corruption happens when the driver is interupted saving changes to the file system.
That can happen, for example, when a high priority thread consumes all cpu times.
It may also happen, when the device is hard reset, for example by taking the battery out during thed river is writing to the file system.
A low battery normally cannot result in that corruption:
a) as the device shuts down itslef with critcal battery power
and
b) the file system is in flash RAM (in contrast to Windows Mobile 2003 and before) and does not need battery power to hold data.
It is also possible that there is a bad behaving process doing these corruptions.
As you say you see this only in one city: What is the main difference with the devices there?
Are others also using the same device? Maybe the device series itslef or there firmware is faulty (contact symbol/motorola for new firmware or patches to the 'disk' driver)
Are the users in that area doing special things to the devices that others do not? For example remove the battery when they mean the device does not react?
Is the MC75A used in other areas and there it does not show the corruption?
You see, you have some more items to examine a rule for the corruption?

Test a embeded system (PC) from another PC

Got a customer request but no idea can it be done. So need your opinions on this. This might be a utterly stupid thing to ask but yet need some facts so can work out best solution.
Scenario,
My Customer is an OEM Manufacturer. They make an automated system with a embedded touch screen (Windows XPe) this system got a button panel with some LED indicators (apart from keyboard) and 7 USB Ports. These button panels and USB ports are checked before sending to QC process. Currently a USB thumb drive with standalone executable with all indicators and controls flags is inserted to one of the USBs and then will run the exe. This exe capture user inputs from button panel and indicate which button is pressed so that it can be verify as working. And from program user can set LED indicators to different states (flashing, steady and off) so they can be verified as well. Once this is done then USB thumb drive will be inserted to each port and will verify it recognise. But after each verify step it needs to safely remove the drive from task bar. Once each test is finish user required to fill up the sheet with all pass and fail states for the entire button panel, indicators and USB ports. This is a quite length process when its come to mass production.
Apart from this embedded system all other components which suppose to connect to one of above embedded systems are tested via a program which I make and records all test outputs as they are tested. This program installed and components are connected to a testing embedded system.
Requirement,
What customer asks, can my program test completed embedded system with our host system (testing embedded system, may be via USB to USB) Its more like Testing a PC from another PC. Any ideas ?
Additional Info.
Apart from USBs there is one Network Port.
Thanks for looking, Feel Free to ask any questions. Any opinion is appreciated.
I'm not an expert on this topic, but it seems like this would be problematic because USB is an assymetrical protocol. There are hosts and there are devices. Hosts make the requests, and devices fulfill the requests. The problem is that PCs are USB hosts, not USB devices, so you would have two hosts trying to get the guy on the other side to do what he wants. Testing with a USB thumb drive worked because the thumb drive is a device.
It sounds like the unit to be tested doesn't have an ethernet port, which is a shame, because that would be the easiest way to go. If it has a serial port you could do it that way, but that is both slow and a hassle.

Resources