Linux and Windows 2012 WebDev Cloud Servers – The Summary

Linux and Windows 2012 WebDev Cloud Servers – The Summary

 

Those of you that have been following me have now that over the last week I did a series of articles on Building a both a Windows and a Linux Cloud Server on Rackspace.com to be used as a WebDev WAS Server. This is my final thoughts after building both, and why I built both in the first place.

This was not just an exercise for the world of blogs, I had a specific business need. I have two projects that are nearing the point of needing to be on public servers. The rewrite of pcReminder.com and a new project called theTaxCure.com. I use RackSpace for all my VPS hosting and the two factors that have the most impact on pricing in the new Cloud economy is Ram and Licensing. So with pcSoft’s stated support of Linux combined with my great experiences with Linux servers, for both PostgreSQL and non WebDev projects, made Linux and obvious choice for me. I didn’t set out to build both Linux and Windows Servers. So I built a Linux Centos 6.3 Server with 512K of RAM.

So in honor of my beloved Crimson Tide getting ready to play for yet another SEC championship and hopefully National Championship, I will give you the history of the project in Football terms. I find that much of life can be described in those terms.

I love the WinDev/Webdev development environment and have being doing some incredible things in it over the last 2 years. WebDev can create great websites and although the development at times seems more of a challenge than it does with WinDev, I think that has more to do with the ever changing world of web technology than it does the tool. I have done a few web projects with it as either proof of concepts or for other peoples servers, but its time to move move my old Cold Fusion projects over and start on a few new commercial web projects.

So pcSoft kicks off, and it looks good, they offer the WebDev WAS server for Linux or Windows and the price is very good compare to similar solutions (please don’t ask my what my Cold Fusion Licensing was!). Hell I might be able to return this thing for a touchdown right out of the gate!!!

So then I open the Linux Deployment document, which comes as a PDF in the install package. The documentation appears to not have been updated in quite a while considering the Linux Distributions (Distros for all the cool kids) listed are 3 or 4 years old. Further reading of the document shows some very sketchy details when it comes to some of the configurations and security requirements. So tackled on the 50 yard line, but no problem, I am pretty good at Linux these days, have a couple of real geeks in my contact list, and Google is a close friend of mine I can probably figure out, so still feeling good about my chances!

A lot of research, trial and error, Googleing and a couple of Hail Mary’s later I have a Linux WebDev server up and running. Example site provided by pcSoft, up and running and very snappy. Gaining yards and looking to score!!!

So time to grab the proof of concept site I have been working on for theTaxCure.com and upload it to the server. But there’s an issue! Those that know me know that given a choice the back-ends for my projects will likely be PostgreSQL. But after digging around and asking support I find out that although they have they offer a Native PostgreSQL driver, they only offer it for Windows. Never occurred to me that they wouldn’t have a Linux version, after all one of the key selling points of the environment is that it can generated Windows, Web, Mobile and Linux applications from a common code base. And PostgreSQL is open source and native to Linux. But alas they don’t. Incomplete pass.

Second and Ten: Disappointment but not the end of the world, I will go through ODBC. So convert my analysis to use ODBC via OLEDB for PostgreSQL and got it working locally. It was very easy to do, nice Run play. Gain of 6 yards.

Third and Four: More research, more Googleing, and perhaps a live chicken and a candle (I will never tell) later, I have ODBC configured and working on the Linux server. Upload the site and get an error, more digging, check with support. Ah.. can’t do OLEDB on the Linux box, got to do straight ODBC. More research more googleing, and find out that with WebDev (or WinDev for that matter) if you use straight ODBC you can’t use the Hxxxx commands or HExecuteSQL query, instead you have to use the SQLxxxx commands which are very rudimentary and would mean hand coding all data access and remove most of the productivity gains that WebDev gives you. Stopped at the line of scrimmage, no gain on the play.

Fourth and Four: Take a Timeout and consider look at what plays I have in the playbook. Marc of WinDev US did a hell of a job talking convincing me that HyperFileSQL Client/Server is worth another look. Seems like a good time to try it, so I decide to go for the first down… Play Action! Convert my project to HyperFileSQL, was fairly easy, I had to deal with a couple of SQL statements that I had that HyperFileSQL didn’t like but nothing major. It took me less than 30 minutes to convert my project to a different back-end database! Pulled a Flea Flicker and got the first down!

First and Ten: I start testing the site, everything looks good. But then I test “THE REPORT”. The purpose of the site is to produce a very sophisticated financial analysis report. The report is actually over 10 Internal reports, including lots of charts, and customized data based on a number of factors. Basically, “It’s not your daddy’s report”. So when I run the report I get:

Internal error detected by WebDev application server.
Internal Error Code: ReadFile( 4 bytes ) Failed
srcAwp/cgI00.cpp (3410)

Hmmm… That’s helpful (NOT!!!) but kind of sounds like some type of permissions problem. So more research, more Googleing (you are seeing the pattern here right?) but no luck, it doesn’t seem to be a permissions issue. So I start removing Items from the report until I can get it to work. Turns out that that error message was saying “RTF is not supported on Linux”. Don’t know why I didn’t get that error! False Start, 5 yard plenty, repeat First Down.

First and 15: For now I will just take the RTF property off of the controls for now to just get it working and figure out a work around later. But still getting errors on the report. More research, more Googleing. Turns our charts can be used in Linux as long as you have the QT library installed, which I covered in the articles for Linux, but only on screens, you can not put a chart control a report in Linux (why, why, why the distinction?). Quarterback got sack, 10 yard loss.

Second and 25: My own endzone is starting to feel awful close! So I removed the charts from my report just to get some kind of output for testing. Miracle of all miracles, I got a report! But it looks like crap. You guessed it, more research, more Googleing, and turns out you have to use all True Type fonts on your reports and install them on the Linux server if you want your report to look right. Bad Hand Off, Lost 4 more yards.

Third and 29: I decide I will figure out how to install the True Type fonts later, because solving the chart issue is more important. So I decided to hand code the charts, you can’t get them quite as pretty (some properties are not exposed) but they are pretty close. I put an Image control on the report and set the destination of the Draw Chart to the Image Control. Ops, you can’t set the destination to a report control only a screen control. Delay of Game, 5 yard plenty, repeat down.

Third and 34: Taking snaps from my own endzone now! More research, more Googleing. Figure out I can set the destination to an EMF image, and then move that image into the image control on the report. It looks pretty good. Pass over the middle, 10 yard gain.

Forth and 24: Clock is running out, so I decide to go for it. I published to the Linux box and get an error on the report. More … (Ok I won’t say it!). Turns out EMF images are not supported on Linux. So I try setting the destination to a BMP instead, it works but the quality is horrible, I can’t reproduce the quality report that is the purpose of this site. And there you have it, sacked in my own endzone. Safety Game Over.

So that’s how I came to do the entire series of articles again, with a Windows server. Since I was being forced to build a Windows box, I decided I might as well be out on the bleeding edge. So I built a Window 2012 server and used a 64 bit compile of Apache 2.4. Keeping with my approach to the cloud I use the smallest image available (its only a few clicks to increase as you need), which is 1 Gig of RAM.

The documentation for the setup of WebDev WAS on a windows server is better but still not great, but between what I had already learned, the cookbook that Tim from Windev US made available on wxlive.us, and a few left over candles I got it up and running.

I have published the eBusiness example site that comes with WebDev on both boxes, and I convert the project to use HyperFileSQL Client/Server instead of classic. Each box has its own HyperFileSQL installed, so each site is running completely on its own server.

ebusiness.thenextage.com is the Linux Server
ebusiness2.thenextage.com is the Windows Server

That site comes up to the admin page, if you click on “Back to Site” and then Blouse under Ladies. My highly scientific testing seems to average 3 seconds for Linux and 11 seconds for Windows. Now before you start talking about how 1 gig isn’t a realistic amount of ram for Server 2012 (BTW Microsoft says it will run in 512K), that is kind of my point. Even at just 1 Gig of ram, the windows box cost 3.5 times as much per month versus the Linux box, excluding bandwidth cost. Move up to a more reasonable 2 gig and its 7 times as much. Again RAM is probably the biggest factor driving the pricing of Cloud servers, the more RAM each VPS is assigned the fewer servers can be hosted on each physical box, its simple math. Would it run better on an older version of windows with less RAM, possibly, but purposely using old technology just doesn’t seem like a wise business move to me.  I will leave the servers as is until December 1st, so anyone that ones to check them out can. After that, I will adjust the RAM in the windows server, to see what it takes to get equivalent performance. So look for a followup sometime next week.

Summary

So where does that leave me and my WebDev plans? Well I can tell you that I am not real happy with their level of Linux support. From either a feature or documentation standpoint. It is really a shame, its such a great product line and putting out Linux versions that are not comparable products tarnishes that in my opinion. I will use the Linux server for pcReminder and other WebDev projects that don’t need any of the features that are not available in Linux (Charts on reports, PostgreSQL) and I will run a Windows server for those projects that do. The Windows server will be a WebDev application server only, so I can squeeze as much RAM as I can out of it. The database will either live on the Linux WebDev server or on its own Linux server. That is one of the great things about Cloud VPS servers, I can change the configuration and move things around, try different configurations, and see what setup gives me the best performance and when demands change its very easy to scale up and change things again.

Resources: There are a few different pages in the online help that you can use to piece together what is available in Linux.

8 thoughts on “Linux and Windows 2012 WebDev Cloud Servers – The Summary

  1. If resized Windows 2012 server to 2 gig of RAM and it made no noticeable difference in response. It still took 11 seconds for the ebusiness site Womens Blouse page to come up.

    I am going to resizing to 4 gig and see what that does, then going to test a few other theories.

    Like

  2. And resizing to 4 gig made very little difference, 9 seconds versus 11 seconds. So now it is on to testing a few other theories to speed up the machine. I will keep you posted

    Like

  3. OK, done lots more testing and reconfiguring of the WAS windows server

    Used Resource monitor and with it setup as a 2 gig server I always have 800+ meg of free RAM, CPU never goes above 4%, and the disk take a brief hit when loading a new category but I can tell the HyperFileSQL Server is caching properly because the next time you hit that category there isn’t nearly as much disk activity. So no obvious signs of any bottle necks.

    So I decided to pull Apache 2.4 and WebDev 64bit off and put on the WebDev 32 bit (thinking maybe 64 bit has overhead that isn’t worth it if you have less than 4 gig of RAM) and I used the Apache install that ships with the WebDev install.

    No change still 11 seconds to load the ladies blouse page.

    I thought maybe it had something to do with the redirects and url rewrite rulles so I disabled all of them and went directly to http://webdevwin.thenextage.com/WD170AWP/WD170Awp.exe/CONNECT/eBusiness but no difference.

    Only two tricks left in my bag. Try IIS. Try Windows 2008 Server. I will let you know what happens!

    Like

  4. I built a Windows 2008 R2 Server with 1 gig of RAM. The ladies blouse page now comes up in 6 seconds. That is quite an improvement. http://ebusiness3.thenextage.com/

    Not sure what the problem with 2012 is but apparently it and WebDev don’t get along just yet, I am trying a couple of more things before I kill it, but it looks like for right now 2008 should be your choice for windows.

    Like

  5. As a final test of Server 2012 I tried to get the WebDev WAS server working with IIS. The issue is the WebDev doesn’t recognize IIS 8, which leads to lots of manual configuration and challenges. I wasn’t able to get it completely working before becoming completed frustrated with the process, from the parts that I did get working I don’t believe there would be any performance improvement anyway.

    So at this point, Uncle Pete needs to get back to real work, so its two WAS servers for me, one very fast Linux server for most of my projects, and one 2008R2 server for projects that need PostgreSQL and/or other features not supported on Linux.

    Like

  6. OK this is my last and final word on all of this. I went through the Windows 2008 settings again and found where I had missed one change so part of the site was still pointing to the 2012 sever. I now have the site up and running 100% on the Windows 2008 R2 Server, 32 bit Apache, and 32 bit WAS, 1 gig of RAM. And it is performing as fast Linux server!! So other than the considerations for hosting cost (and the chevy vs ford argument), I can now endorse Windows 2008 R2 server for WebDev deployment.

    Like

Leave a reply to PeteHalsted Cancel reply