5

The goal is to use Processing as a scripting environment for creating graphics and to have the output display on a custom display device that is something like an LED light panel. The server running the program will be on a 1U rack. The idea is all the LED stuff is custom hardware, but rather than reinvent the wheel, it would be better to use an existing stack to drive the display. The problem is getting java to display on this device.

My initial thoughts are: 1. Run Java in headless mode. 2. Use Xvbf as the framebuffer. 3. Have a program run that reads the framebuffer, unpacks it, and then displays it on the remote device, at 30 fps. 4. Use Processing scripts to generate the graphics.

Does this make sense? Is there a better way? I'm not that knowledgeable about this area, but it seems better than trying to create a new java.awt.

3 Answers 3

1

I routinely use JFreeChart in headless mode with VNC to generate charts in servlets using ChartUtilities. It seems like you could just download the pictures to a picture frame via USB.

1

Another proposed option is to use Processing's createGraphics() and write the result to a file. I don't know about the tradeoffs of this option. It doesn't support OPENGL. And I'm concerned that the write will be a synchronous operation so calculations can't be going on during the write, which would make it difficult to get a high frame rate I would think.

1

If the "remote device" is just something directly attached by USB or some PCI controller, this seems sound (and exactly the sort of thing xvfb is made for). But if the remote device is something connected by ethernet or wifi, depending on it's resolution you might find the naive approach of copying all the data each frame requires too much bandwidth and before you know it you'll be rolling your own frame-differencing image compression. If you find yourself going down that route look at the VNC/TightVNC class of software which (at least in the form it's normally used on headless servers) provides an Xvfb-like virtual framebuffer/X-server accessible by a TCP/IP protocol which can transmit the content reasonably efficiently using compression and display it with VNC client software.

1
  • Definitely a concern. The reading of the framebuffer is a risk element. It will be connected via UDP over 100 Mbps ethernet to a few very dumb devices that drive the LEDs. So that should be OK. The VNC options looks interesting. I'll take a look. Thanks.
    – Todd Hoff
    Jun 1, 2011 at 21:45

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

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.