I've looked around a bit and probably haven't found the right medium for this question so let me know if there's a different forum I should bother.

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:

  1. Legacy Ada code (used to communicate with App following a predefined standard)
  2. 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)
  3. 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)
  4. 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:

  1. 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".
  2. 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.
  3. 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). </whine>

  • 6
    I think you're asking the wrong question. You got into this mess by cobbling together a bunch of tools; the way you get out of it is not by throwing more tools at it, but by writing a coherent system with a sensible design and less moving parts, preferably using as few programming languages as possible. Dec 19, 2016 at 17:52
  • 5
    You haven't described what you are trying to accomplish. It's hard enough to understand a Rube Goldberg architecture like this when you know what it's doing. How can anyone possibly tell you how to improve it if we don't know what it's meant to do?
    – JimmyJames
    Dec 19, 2016 at 18:32
  • What bugs me about this question is if someone said "oh just do everything in 3" I don't know enough of what this actually does to tell them why not. We need a more than a list of moving parts. What do they do? Dec 20, 2016 at 1:39
  • Thanks @RobertHarvey. I will redouble my efforts to convince the powers that be that a more complete redesign is necessary. Jan 3, 2017 at 17:59
  • 1
    Sorry but I still don't see an explanation of the big picture. Forget about the design for a second. Why does this thing exist? What is it's purpose?
    – JimmyJames
    Jan 3, 2017 at 18:18

2 Answers 2


By assuming the following:

  1. You won't change App, since it's maintained by other group
  2. You don't need to change or interact with the AS movie, just check for flash updates

I'd do the following in order to improve your overall setup:

  1. Port legacy code that uses Ethernet, to a more high level language of your choice, I would go with Python;
  2. Remove GUI; instead use Python (or something else) in order to call the .swf file, and check for updates, and perform system calls;
  3. Create a proof of concept with the above steps; this will help spread the idea of improvement of the system to your colleagues.
  • This seems like a good idea. I'm sure you understand Flash better than me, but our GUI is the .swf file. I'm not sure how we can remove the GUI but have Python call the .swf file. Can Python update the state of the .swf file as though AS2 code had been executed? Aug 28, 2017 at 16:59
  • Actually what I suggested was removing the html page + PHP approach, and use a local approach with Python or something else. As you said, other people will rewrite this part of the project in Java, and as I understood, they will rewrite the .swf as a Java app too. I think that's a good idea and basically what I suggested, the only difference is that I thought it would be prohibited to change the .swf, and I suggested python; apart from that I think it will be a good improvement. Aug 28, 2017 at 18:29

Would it be possible to:

  1. Introduce a MySQL database or any other lightweight database into the system
  2. replace writing on files with updating this database
  3. Add a jBOSS application server to read from this database and render data into jsp pages?
  • I like the idea of using the database instead of the files. I know nothing of jBOSS. Could it be used to sense writes and call directly into AS2 code? Or update the state of the .swf file? Otherwise, we have the same situation of the Flash GUI needs to be constantly checking the database to see if things have changed. Sorry for ignorance of jBOSS. Aug 28, 2017 at 17:00
  • Databases can have triggers associated with inserts, such triggers can call external applications, so yes, you can have an event driven update. jBOSS can be replaced with Apache Tomcat, if you want.
    – A.Rashad
    Aug 28, 2017 at 17:06
  • Well the database can call an external application, but I guess the situation we were in was, when the application starts, a Firefox window opens and loads the .swf. Then the .swf file has setInterval calls that read a set of files every so often. When the App (managed by the other team) wants something to happen on the .swf, we get a notification, then we use a .csh script to write to a file, the .swf reads the file, and updates accordingly by running some AS2 methods. Could the Database trigger jump right to the heart and call the AS2 methods? We hoped for a more event-driven architecture. Aug 28, 2017 at 17:09
  • I am afraid I don't know. sorry
    – A.Rashad
    Aug 28, 2017 at 17:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.