<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    Re: Thoughts on filesystem action driven hot deployment
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/max.andersen%40jboss.com">Max Andersen</a> in <i>JBoss AS7 Development</i> - <a href="http://community.jboss.org/message/570085#570085">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Sorry for not seeing this thread earlier, but now that I got pointed to it after trying out JBoss AS 7 Alpha 1 here are my initial good/bad thoughts about this new approach.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>First a little about my assumptions:</p><p>JBoss AS 7 is to be usable in todays tools, not the tools of tomorrow. i.e. it should not require magic tools to get a somewhat reliable hotdeployment/development in place.</p><p>The experience one had with AS 4 or even AS 3 or heck, even Tomcat is what I aim for - none of this requires special tooling.</p><p>Special tooling is what is to be used for *improving* things, not as an excuse to say we can't do it without it <span> ;) </span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Users can't always run their appserver all the time - with AS 7 it might not be a problem because of smaller memory footprint but once users</p><p>start deploying their own stuff to it then that problem returns - hence, most if not all operations should be doable without actually *starting* the appserver.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Local and remote deployment are different things, but both have usecases for hotdeployment functionallity - i.e. me updating a html page shouldn't require a full restart of an app, even if running remotely on an EC2 server for my testing.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Good things in the proposal:</p><p>Using marker file(s) works for me - that is simple to manage and can be done with and without alot of special plugins/tooling, i.e. ant/maven is easy to do it for - harder for IDE's like Eclipse, Netbeans, etc.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I can live with not having automatic rescan of file changes since tools incl. ant/maven can easily create the additional file to trigger deploy.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Bad/Questionable things:</p><p>I don't understand why you have to *remove* the deployed files - if they aren't locked by appserver then please keep them there otherwise tooling have to constantly copy all content to the location (this is not a problem in toy samples, but take a Seam EAR, that is over 20MB of data....that takes time, CPU and disk IO on even the fastests systems - if I touch a html file - tools should not need to copy all again)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>For Zipped archives we still have to copy all so that is less of an issue - but why not keep the file there so users can actually see what got deployed and they can adjust content as they need ? (I really find this "delete what got deployed"-approach weird..I don't understand the reasoning)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>How are users to know where the actual deployment is happening from ? Suggestion: put a deploy.location=/var/tmp/blahbla/foo.war into the marker file - simply for ease of debugging/transparency.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Why have markers both at toplevel /foo.war.deployed and foo.war/META-INF/jboss-deploy - why not just have them as foo.war.deploy (request deployment of foo.war) and foo.war.deployed (marker for foo.war have been deployed) ? More consistent IMO.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Another issue is though how is all of this going to work for updates that should not trigger a full restart of a module ? i.e. updating html/xhtml pages does not force a restart of a module which causes current sessions to be destroyed ?</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>With respect to efficient updates/scanning tools (including Ant and maven) could give "hints" to the redeployment by simply listing the files relative to the deployment that actually needs updating - we could put that inside the file marker.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>..and again, its great to have a CLI and i'm all for it but I think we can go very far even without it - not all deployments have to be super-safe nor atomic as long as it goes well in "most" cases <span> ;) </span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>One comment I really find wrong is the following from Jason:</p><p>"Ok so, I will first start off by saying that the file system is a <strong><strong><em>broken</em></strong> API, for many reasons that I will get into, and that we basically have a&#160; bunch of trade-offs here. There is no perfect solution, but I think we&#160; should prefer one that is robust. Ultimately we really should push&#160; people to using the CLI because then we can get truly intuitive&#160; behavior."</strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><strong>or rather, I completely here where this is coming from but the file system is *waay* more accessible and understandable than any CLI we can come up with - it's something we just *have* to support for AS 7 to be easily consumable.</strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><strong>We can always encourage and show by better tooling that the CLI approach is better - but we should still attempt to have a decent hotdeploy operation via file systems - and I don't see why we can't provide that by simply utilizing the marker file concept...</strong></p><p><strong><br/></strong></p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/570085#570085">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss AS7 Development at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>