7 Replies Latest reply on Jun 18, 2008 1:13 PM by Oliver Goldman

    deploying AIR applications with flex & BlazeDS

    Solerous

      I have a Flex app which needs to run on the server in the background. I was thinking of turning into an AIR app since it really doesn't need to run on the browser. But how could I deploy this.

      I am sending my entire flex project as a .war file to deploy on the server and am using BlazeDS to work with some java backend code. But all of the tutorials for AIR seem to assume some sort of manual install method and I just want to bundle it with my current project. Is this possible? And if so, how is this done?

        • 1. Re: deploying AIR applications with flex & BlazeDS
          Oliver Goldman Adobe Employee
          Our only currently support for automated installs is as part of AIR redistribution. Whether or not that's appropriate for your situation depends on whether or not you own/control the servers in question. Also, note that it can't be done as part of a .war file deployment.

          That said, the reasons the tutorials cover the manual installation method is because AIR is intended for the development of desktop applications. You'll be going against the grain running this on the server and may run into other issues.

          Oliver Goldman | Adobe AIR Engineering

          • 2. deploying AIR applications with flex & BlazeDS
            Solerous Level 1
            If running air on the server is not advisable, how would you foresee auto-generating .png files from a flex charting app then? The java forums tell me doing it in the browser is bad practice, and you are telling me not to do it in an application. So what's the best way to run something like this as a background process on a headless server?
            • 3. Re: deploying AIR applications with flex & BlazeDS
              Oliver Goldman Adobe Employee
              Generating PNGs in an application is just fine, including creating them from a flex charting app. I'm not sure what advice you're getting form the Java forums, but that's perhaps not the best place for advice on other, non-Java technologies.

              That said, it's difficult to answer your question with such limited information. You start off saying you needed to run a Flex app on the server. Now you say the issue is generating PNGs. If you want good advice, you need to be clear about what you're trying to accomplish.


              • 4. Re: deploying AIR applications with flex & BlazeDS
                Solerous Level 1
                Sorry for not being more specific earlier. I was trying to keep it simple.

                The big problem I'm having is saving the PNG to a file as a background process (in other words with no user interaction or initiation) because the java application is deployed on a headless server and when I tell java to fire up flex in the browser (which auto-generates the images and works fine on the local server on my laptop) it fails. I've tried getting answers for this over on the flex forum and on flex-coders but haven't gotten any answers. So that's why I thought I would consider the possibility of running this through AIR instead of Flex.
                • 5. Re: deploying AIR applications with flex & BlazeDS
                  Oliver Goldman Adobe Employee
                  I think a better answer might be to generate the PNGs from Java. Have you considered that? I'm skeptical that using Java to invoke a browser or an AIR application on a headless server is good approach--if nothing else, it's an awfully complicated way to do a simple thing.

                  • 6. Re: deploying AIR applications with flex & BlazeDS
                    Solerous Level 1
                    I actually do send the PNG as a byteArray to Java from Flex via a remote object method. The reason I need Flex is because I specifically want to use the charting software package from Flex charting. The Flex look and feel out of the box for the interface and the chart is far superior to what I could create in Java.

                    Here is a quick over view of what happens in the application:

                    1. launch java app
                    2. Java then launches a Flex instance for each report defined in the database
                    3. java pushes live data to each Flex instance from database
                    4. after Flex plots data, it sends ByteArray of the png to remote java method
                    5. java saves png to file locally on the server

                    How would you simplify this process? I'd really appreciate your take on this.


                    • 7. Re: deploying AIR applications with flex & BlazeDS
                      Oliver Goldman Adobe Employee
                      I would either (a) find a Java package for chart generation or (b) write the entire application in Flex.