From: "Florian Aßmann" Date: 2007-07-15T16:10:34+09:00 Subject: Re: Real project -- general application structure Ricardo Jasinski schrieb: > Hi Florian, > > thanks a lot for pointing me out the existence of Eventmachine; I had > missed that one completely. > > I was amazed to see how easy it is to structure the terminal > connections using EM. In less than 5 minutes after installing the gem > I could already handle connections and interpret the sensors data. > > However, I realized that it was essentially the same that my original > code was already doing (excpet it is much cleaner and way cooler!). I > can easily talk to the remote units, but I still need to find a way to > display their momentary status on a web page (which should always > display up-to-date information, and be independent of full page > reloads on the browser). > > What would you suggest; can I use EM to talk to my web server which > would be another application? Or perhaps open a pipe to it somehow? > > Thanks a lot! > > Ricardo. > > > Hi Ricardo, I wouldn't either do polling nor use ajax because this method requires polling. There's no way around this since webpages are not meant this way. Instead I'd embed, if you really need so, a java applet that accepts messages from your event machine telling it to refresh or even the new information. Don't know if Flash can do, too... or maybe Silverlight... *chuuu* Better, imho, is a little spectating app that's easily build upon .NET framework. You may glue them together through soap. That leaves the frontend data be handled by the spectating app and the daemon do almost nothing except telling the EM to send and reading the sensors. What's the big idea behind the webpage thing? Regards Florian P.S.: Maybe you can use an already written snmp client...