Hi all,
I just got to know about Wine, and I'm a newbie on Ubuntu/Linux as well, but I got so far as to test some apps I've made in Delphi if they work on Wine (and they do work). (A COM version of my app is about 120% slower on Wine than on XP/SP2, and without the COM stuff enabled (running in "integrated mode") my app is about 30% slower (very CPU intensive string manipulations).
I think Wine is very interesting, although I'd welcome some optimizations, especially on the COM stuff... However, now I'd like to learn more:
Web-enable Win32 apps on Apache/Wine
What would be the best way, and the second best way, for an Apche 2 web-server app (say PHP or whatever) running on Ubuntu 8.04, to communicate with legacy Win32 applications on Wine? It could be installed on the same machine and/or separate machines.
As I'm new to Linux I don't know what would the the "standard way" for applications to communicate with each other.
What I'm out for, in general, is a strategy for web-enabling legacy Win32 application farms on "more affordable execution platforms", that is, Wine/Linux.
Regards,
// Rolf Lampa
Win32/Wine applications feeding Ubuntu 8.04/Apache 2?
Re: Win32/Wine applications feeding Ubuntu 8.04/Apache 2?
The easiest and the simplest way to do that are:RIL wrote:As I'm new to Linux I don't know what would the the "standard way" for applications to communicate with each other.
- pipes (named or nameless)
- Sockets
You can find a great deal of information about IPC on UNIX on the Internet.
Ok Delphi please look a freepascal http://www.freepascal.org/
http://wiki.lazarus.freepascal.org/FPC_ ... he_Modules They nicely cover linking straight into Apache Module system and being native code.
Best way is basically don't use wine/linux in a web server setup if you can.
Wine is quite a large overhead. Also if application uses 1 hidden window as a lot of code does. It needs a X11 server of some form to run best performance comes out a Linux server when you don't have to run graphical.
Linux can be made speak a lot of different interlink types. The ones vitamin listed have a fairly low overhead. http://tldp.org/LDP/lpg/node7.html Good read of the defualt ones build into posix standard.
If you don't mind higher overheads freedce can be used to give dcom as well as the newish standard http://en.wikipedia.org/wiki/D-Bus .
There are many more options. D-Bus has a lot of parts on it you can out box that are native code. D-Bus is the closest thing to a Linux Com system its also being developed to operate on windows.
PS try native msvcrt that spot in wine kinda need a rework some application take off like a bat out of hell when doing a lot of string processing when that is changed.
http://wiki.lazarus.freepascal.org/FPC_ ... he_Modules They nicely cover linking straight into Apache Module system and being native code.
Best way is basically don't use wine/linux in a web server setup if you can.
Wine is quite a large overhead. Also if application uses 1 hidden window as a lot of code does. It needs a X11 server of some form to run best performance comes out a Linux server when you don't have to run graphical.
Linux can be made speak a lot of different interlink types. The ones vitamin listed have a fairly low overhead. http://tldp.org/LDP/lpg/node7.html Good read of the defualt ones build into posix standard.
If you don't mind higher overheads freedce can be used to give dcom as well as the newish standard http://en.wikipedia.org/wiki/D-Bus .
There are many more options. D-Bus has a lot of parts on it you can out box that are native code. D-Bus is the closest thing to a Linux Com system its also being developed to operate on windows.
PS try native msvcrt that spot in wine kinda need a rework some application take off like a bat out of hell when doing a lot of string processing when that is changed.
Thank you all, I will read up on the links, your answers are very useful.oiaohm wrote:Ok Delphi please look a freepascal http://www.freepascal.org/
http://wiki.lazarus.freepascal.org/FPC_ ... he_Modules They nicely cover linking straight into Apache Module system and being native code.
Best way is basically don't use wine/linux in a web server setup if you can.
Wine is quite a large overhead. Also if application uses 1 hidden window as a lot of code does. It needs a X11 server of some form to run best performance comes out a Linux server when you don't have to run graphical.
Linux can be made speak a lot of different interlink types. The ones vitamin listed have a fairly low overhead. http://tldp.org/LDP/lpg/node7.html Good read of the defualt ones build into posix standard.
If you don't mind higher overheads freedce can be used to give dcom as well as the newish standard http://en.wikipedia.org/wiki/D-Bus .
There are many more options. D-Bus has a lot of parts on it you can out box that are native code. D-Bus is the closest thing to a Linux Com system its also being developed to operate on windows.
PS try native msvcrt that spot in wine kinda need a rework some application take off like a bat out of hell when doing a lot of string processing when that is changed.
You recommend not using Linux/Wine, is this for security reasons or performance reasons, or both?
You also say that "Wine is quite a large overhead." On a Dual, or more, Core machine, is the overhead still significant?
As for overhead on the communication between web-front and "backend-app-servers", one can use different approaches which makes overhead more, or less, significant. I have experience from optimized data-exchange between DCOM server/client by "semantic grouping", that is, in chunks of closely related data, in order to reduce the NUMBER of calls (often the size of the data packets is less significant).
Adding the security aspect to it, and with the above in mind, I think I'd prefer "easiest to learn/use&deploy"...

The last PS clause went beyond for me. Can you please rephrase?
Regards,
// Rolf Lampa
Both.RIL wrote:You recommend not using Linux/Wine, is this for security reasons or performance reasons, or both?
That was the reason I gave you pipes and sockets. Pipe is the basic concept in UNIX since the day one. And is here to stay. Sockets are a bit more complicated but also more powerful especially if you want to do any async communications.RIL wrote:I think I'd prefer "easiest to learn/use&deploy"...And of course, a protocol that will last over time.
But the best thing you can do yourself - don't use Delphi for your backend app.
OK, good to know.vitamin wrote:Both..RIL wrote:You recommend not using Linux/Wine, is this for security reasons or performance reasons, or both?
OK I'll repeat: Thank you ALL, your (plural) answers ARE very useful.vitamin wrote:That was the reason I gave you pipes and sockets. Pipe is the basic concept in UNIX since the day one. And is here to stay.RIL wrote:I think I'd prefer "easiest to learn/use&deploy"...And of course, a protocol that will last over time.
However, for a newbie on Linux it isn't obvious how a Win32 application responds to a poll from/by a "basic concept in UNIX".
But as said, still from the position of a newbie on Linux, I will read up on the links provided. And try some research on how a Win32 app would handle/respond to the suggested pipe stuff.
Except for not everyone knowing about the power of Delphi (for Win32), and except for the applications that I said that I already have made (representing * man-years of development time, which would take * 10 times to write with any other tool) , and except for the loads of apps already existing out there, which drives business for billions of dollars, I have no comment on what to do whith all that valuable intellectual propery which alredy exist and which have absolutely no need to be either "fixed" nor rewritten in any other language.vitamin wrote: But the best thing you can do yourself - don't use Delphi for your backend app.
Regards,
// Rolf Lampa