First, there is an application managed by another group that does some simulations and communicates to our system via Ethernet. Let's call this App.
Now, we have the following setup on a Red Hat Enterprise Linux system:
- Legacy Ada code (used to communicate with App following a predefined standard)
- Linux csh/sh scripts (call Ada tasks to communicate with App or write files to update Flash - either called by Ada tasks or constantly running alongside program to monitor status)
- Actionscript 2 Flash Movie in Firefox window (GUI - polls files to see if updates are necessary and loads variables to PHP to make system calls, call Linux scripts, or run Ada tasks)
- PHP (used by Flash to call Linux scripts and Ada tasks to communicate with App)
I am looking for architectural improvements. Obviously the mishmash of languages is a nightmare. Above that, Flash is difficult to work with because we haven't been able to get an interrupt-driven architecture in place. I've tried to use Flash's ExternalInterface class for a more event-based flow, but whoever setup the Flash environment did so in a way that there is no available ExternalInterface. "Finally" (for this post), our program is run on a local machine, so running a .swf in a Firefox window is unnecessary.
Thanks for the feedback! Let me respond to the first three comments I see:
- It would be an absolute dream to get time and money to rewrite the entire system in a more coherent manner. I expect significant resistance (because I've already tried a few times), but I will do more research and attempt to gather more compelling cases and communicate the "feebleness" of only updating part of the "design".
- You're right - I was rushing too much to think it was necessary to know the guts. Basically I was hoping for stuff like, "My favorite languages/tools/patterns/paradigms/etc for an architecture that needs to have a GUI and interact with Linux is blah" or "An interrupt driven architecture for AS2 does exist, it's blah" or "ExternalInterface isn't available? Have you made sure that blah?". I've updated the above with maybe more useful information. Let me know if that didn't actually clarify anything.
- Hopefully the previous response helps explain what the pieces do to some degree.
EDIT: I no longer work on this project, but we can keep the thread open if anyone else thinks it'll be useful for others (doubtful as I hope no one ever runs into this embarrassing situation). What ended up happening was
<whine> despite repeated attempts from me and two other developers to suggest rewriting the entire application in Java/Python, we never convinced anyone. Then another developer (not on the project) volunteered to rewrite everything in Java and everyone jumped on board all of a sudden so now the whole thing is in Java (not App, but everything in 3 and 4 is now Java).