logo

Survey Result: Should CodeStore Be Hosted on Windows?

Yesterday I asked what server you run Domino on. The result, which is still coming in but unlikely to change significantly, was that an unsurprising majority of you use Windows.

ScreenShot001

Look again at the chart above. Notice the chart is embedded in a PDF? Look now at the URL. It's a PDF document attached to a Notes document. Both the PDF and the chart within it are generated on-the-fly by a Java WQS agent. Here's the actual PDF generated, which weighs in at a mere 3kb!

The idea is that the survey document has a button on it which you press to have a PDF snapshot of the survey results sent to your email address. The button is hidden at the moment!

This brings me rather nicely to the point of the question itself. The Java code I've written to generate the PDF only runs on Windows. Well, hang on, that's not exactly true. Because the agent generates images it will only run on servers with a "graphics environment". It can run on Linux et al but only if X11 or a similar graphics library is available.

This is the first time in codestore's history that I've produced a demo (a nice one at that, which I'm keen to show off and make available) that I can't actually demo to you. This is because codestore runs on Linux in "headless" mode. There's no graphical interface to the server. The Java code can't create graphics.

At the point I realised this I set about trying to find a way to work round the fact I was being restricted by the OS on the server. What followed was a painful exercise and I ended up giving in after wasting what must amount to days of effort on it.

In looking for a solution I managed to enlist the help of quite a few people. To name a few - Bo Frederiksen, the amazingly kind Simon Delicata (who I tracked down via Google after seeing this posting about the same issue on LDD) and the ever-helpful chaps at Prominic.NET who did everything they could to get it working. In the end none of us could. I thank them all for trying though!

What to do? What I don't want to do is have the hosted version of DEXT be anything less than the fully functional database I want it to be.

The only avenue I have left to explore is to try and use the PJA Toolkit to draw graphics. How much time do I want to invest in learning and re-coding what I've done though? Especially as it will already work for almost 3/4 of you without needing more work. I just don't have that much spare time. Using PJA would make the code more complicated than it really needs to be. It would make more sense to leave it to the minority of you who this wouldn't work for to find your own solution.

So, should I have Prominic.NET move this server to Windows or should I have them run the Domino server from within the X11 environment? I'd asked about the latter but they were hesitant to do so as it eats up extra resources unnecessarily. Right now though that doesn't bother me much. I just want things to work with the simplest form of code possible. I don't like feeling restricted by the environment.

If anybody has an example of using PJA to draw graphics with a Domino server on Linux (with no X11 library code) then I'd be grateful if they'd share it. Or any other advice for that matter. As long as it's not to set "headless=true". That doesn't work. Trust me.

Comments

  1. Hello Jake,

    there's a solution that's useful to all Linux environments (and also it's the solution to using WebSphere Portlet factory graphs on linux)

    All you need is an xserver running on your machine, this doesn't mean it has to have a video card.

    You can use xvfb (X Virtual Frame Buffer) to open a X server and set DISPLAY=:<yourdisplay>.0

    then start domino server with this variable set.

    Any apps running after the variable is set will use the virtual framebuffer to do graphical operation.

    I use this method all the time form my linux backend apps that need graphical processing.

    Look here for more details:

    {Link}

    {Link}

    Enjoy and let me know your results

    • avatar
    • Kerr
    • Fri 1 Aug 2008 05:18 AM

    Any idea why headless = true is not working?

    • avatar
    • Jake Howlett
    • Fri 1 Aug 2008 05:33 AM

    Hi Daniele,

    "You can use xvfb (X Virtual Frame Buffer) to open a X server and set DISPLAY=:<yourdisplay>.0"

    You make it sound so simple. You have to remember my Linux skills are only slightly above average ;o)

    If I login to my test server (Suse enterprise server 10 with no x11 running) then it says "command not found" when I type "Xvfb" (logged in as root). Does it come as standard?

    Kerr. If you asked me that at teh time I was neck-deep in it I would have been able to write a whole piece on it. Such were the complexities that I've scrubbed it from my mind for the sake of my sanity. Something to do with fonts and .lib and .so files. Never did get to the bottom of it...

  2. Jake, I don't know about the specifics of xvfb, but if it's not installed it should be a simple matter with SuSE. I only recently started using it, after years of using Debian/Red Hat, and the package management is good.

    From a terminal type 'yast'. Assuming that is installed (it should be - it's Suse's basic config tool), you should have a screen up with the leftmost list having 'software' as the top item. Tab between screens, and tab to highlight 'software management' in the right hand list. Press return, then when its finished reading the repositories, tab to the 'search' button. From there you can find which package installs xvfb, and install it.

    Then at least you can try Danielle's suggestion.

    • avatar
    • Jake Howlett
    • Fri 1 Aug 2008 06:39 AM

    Thanks Bernard. I managed to install Xvfb. More errors now though. Can't open inet6. Font missing etc.

    Before I get sucked back in to endless Googling I'm just going to have to give up on it again before I end up spending hours and hours on it again.

    My next call is to Prominic to see if they'll run Domino from with X11.

    Jake

    • avatar
    • Jake Howlett
    • Fri 1 Aug 2008 06:42 AM

    If anybody fancies trying themselves then follow the instructions here:

    {Link}

    You'll end up with exactly what I'm testing against -- Domino 7.0.2 on SLES 10 running "headless". When you get to that point let me know and I'll send over the problem code to see if you can get it work. I'd be amazed.

  3. Hello Jake, it is simple. I can help with some details.

    In order to use Xvfb you need to have a functional Xwindows environment (even without a graphical Xwindows server).

    This explains why you get the font error.

    To have it work you need to install the basic xwindows packages.

    To do this in SLES do this:

    yast2

    - select "add/remove software packages"

    - Open the "Filter" menu

    - Select "Selections"

    At this point you get the same groups you can use to select packages during setup

    Add the "basic grapical system"

    This will add all the packages you need for a basic Xwindows server.

    At this point you can run Xvfb with all the pieces in the same pleace.

    • avatar
    • Jake Howlett
    • Fri 1 Aug 2008 07:35 AM

    Hi Daniele. Thanks for coming back to help.

    If I type yast2 it looks like it's just yast that launces and none of the options you mentioned are available and I can't see any option to install the "basic grapical system".

    Surely that's already installed as I can type startx and launch a fully-functional X system?

    Jake

  4. Feel free to send me the code and I'll see what I can do.

  5. Sorry Jake, I forgot that the SuSE server doesn't have Domino on it (I have Domino running on CentOS servers). You can send me the code, it will just take me longer to get round to looking at it (I would need to upload Domino and install it first).

  6. The options I described are in the "add remove software" feature of yast.

    So, start yast -> add remove software -> top left "filters" -> select "basic graphical <whatever> system".

    but if you can startx then I'd need more details on the errors you get from Xvfb

    • avatar
    • Richie
    • Fri 1 Aug 2008 11:20 AM

    I also use Xfvb to run domino on headless servers where I need java graphic libs (eg. lotus workflow web viewer). here's link from notes.net: {Link}

    on centos I had to install compat-libstdc++-something, xorg-x11-deprecated-libs and xorg-x11-fonts-base for better font support.

  7. Hi Jake

    While reading the other comments, I realised that one difference between your server and mine, is that I have X11 installed. I rarely use it, and it wasn't started when I tested your code. But your code worked, on a OpenSuSE Linux 10.3 in text mode. It did require java.awt.headless=true.

    Best regards

    Bo Frederiksen.

  8. Jake, I'm running with the crowd on this one: please see if you can have the code running on a Linux install.

    That said, I've found that I have had to be very careful on my Linux installs (more so than with a generic Windows install). On the other hand, the benefits are significant (very little disk fragmentation, we don't run virus checks and Linux runs with less resources).

    I wish IBM would do a better job on spec'ing out the Linux install for newbies, etc. You'll probably find that the documentation for installing Sametime 8 on Linux has some of the information you need, as Linux ST8 has the same issues with graphic conversions and fonts.

    Thanks for your inspiring work !

  9. Assono provides a solution and a sample db for testing. It is some work as it requires an additional Java download but the sample makes it quite easy. You have to translate it as it currently only seems to be available in German language but it may be worth the hassle (Google translate etc.).

    {Link}

    If you contact Assono I am sure they will translate it to English too.

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment:


About This Page

Written by Jake Howlett on Fri 1 Aug 2008

Share This Page

# ( ) '

Comments

The most recent comments added:

Skip to the comments or add your own.

You can subscribe to an individual RSS feed of comments on this entry.

Let's Get Social


About This Website

CodeStore is all about web development. Concentrating on Lotus Domino, ASP.NET, Flex, SharePoint and all things internet.

Your host is Jake Howlett who runs his own web development company called Rockall Design and is always on the lookout for new and interesting work to do.

You can find me on Twitter and on Linked In.

Read more about this site »

More Content