I'm afraid I don't believe there a simple and fast way to rerender dynamic images in real-time automatically.
- Do you know which is the cause of such an unexpectedly low throughput?
- Have you tunned up any part of your system? (Seam app 1 2, app server, JVM, OS)
- Have you monitored (RAM and swap)memory usage while the app is running?
- Have you monitored processor usage while the app is running?
Anyways, assuming that your average JPG is 60 KB in size, we have that:
25 images/s * 60 KB/image = 1500 KB/(s*client) = 12 Mb/(s*client)
all that without taking into account the overhead coming from transportation protocols, which is quite large.
Having said that, another approach to the problem(if your domain's constraints allow it) could be serving the images as a video, so there is no time spent in JSF life cycles, Seam interceptors and browser re rendering, plus bandwidth savings. For that task, I've heard that Xuggler could be a good choice, but I've never used it.
We are not going to have many clients watching the stream at the same time. I want to keep the images I render in memory, so I'm not sure if converting images to a video in real-time could be made on the fly (without storing the image on the disk in the process)?
Ok, all I need is to refresh the a4j:mediaOutput component or s:graphicImage component every 100 ms. If the browser rerender 5-10 images per second it would be enough. There has to be some way to rerender components, besides a4j:poll. Anyone?
viewersuse a plugin. Consider implementing a simple Applet which does the job without a problem.