Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2008-03

3-tier database application

9 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

Hi,

Has anybody created a multi-tier (or 3-tier) database application with Lazarus? I'm looking for a solution that will work on Linux and Windows.

PC #1 PC #2 PC #3 Client Application -----> Application Server -----> RDMS (db)

In Delphi we used TClientDataset and midas.dll. What options do we have for FPC and Lazarus? Kylix 3 Enterprise used WebServices and SOAP, but I have never worked with WebServices or SOAP in my life.

If WebServices are the only option, I would prefer to embed the HTTP server inside the Application Server tier, so I don't have to deploy Apache etc... Not being stateless would also be a nice bonus (or at least some work-around for it like is done in Kylix)

Anybody know of something like this? I remember there was some single developer that wrote and alternative to Midas (for Delphi). I think he used Jedi's version control application as an example application. I'm not sure of the product name, what technologies he uses or if it is open-source. :-(

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Inoussa OUEDRAOGO
to Graeme Geldenhuys: Has anybody created a multi-tier (or 3-tier) database application with Lazarus? I'm…
If WebServices are the only option, I would prefer to embed the HTTP server inside the Application Server tier, so I don't have to deploy Apache etc... Not being stateless would also be a nice bonus (or at least some work-around for it like is done in Kylix)

For web services you can use WST with the Indy HTTP server listener ( compiled into your )
exe without dependencies
(http://wiki.freepascal.org/Web_Service_Toolkit). It is stateless.

Show quoted text 5 lines
Anybody know of something like this? I remember there was some single developer that wrote and alternative to Midas (for Delphi). I think he used Jedi's version control application as an example application. I'm not sure of the product name, what technologies he uses or if it is open-source. :-(

I think your are talking about this HyperBase (
http://www.vglib.com/link-4.html ), There
were ( still ??? ) some legal problems with Borland, I don't have the details. And I think it is
windows only. The source is freely available.

Best regards.

Inoussa O.

Reply by email

Michael Van Canneyt
to Graeme Geldenhuys: Has anybody created a multi-tier (or 3-tier) database application with Lazarus? I'm…
Graeme Geldenhuys wrote 14 lines
Hi, Has anybody created a multi-tier (or 3-tier) database application with Lazarus? I'm looking for a solution that will work on Linux and Windows. PC #1 PC #2 PC #3 Client Application -----> Application Server -----> RDMS (db) In Delphi we used TClientDataset and midas.dll. What options do we have for FPC and Lazarus? Kylix 3 Enterprise used WebServices and SOAP, but I have never worked with WebServices or SOAP in my life.

You have no options currently. I have EXACTLY the same needs , and believe me, I searched :-)

But: Joost van der sluis is working on TClientDataset support. What is currently missing is the package writer (deltas). Local indexes, and filtering exists already. WST for FPC can take care of the package transport.

You can help him by porting hyperbase to FPC and then we should almost be there. (I think hyperbase, by vladimir gaitanoff, is the alternative to midas you refer to... It's free, but requires vglib by the ame author, but vglib is not free. I have the sources, though)

Normally, I will start a Lazarus project real soon now (or so I believe since some millenia ;-)), so I would be willing to invest some company time in this myself. When I start this project, I planned to add some other features to TDataset:
- Local filtering at the TDataset level.
- Built-in recoding support.
The plans for this are drawn, it's just a matter of implementing it.

Maybe we can cooperate a bit on this ?

Michael.

Show quoted text 24 lines
If WebServices are the only option, I would prefer to embed the HTTP server inside the Application Server tier, so I don't have to deploy Apache etc... Not being stateless would also be a nice bonus (or at least some work-around for it like is done in Kylix) Anybody know of something like this? I remember there was some single developer that wrote and alternative to Midas (for Delphi). I think he used Jedi's version control application as an example application. I'm not sure of the product name, what technologies he uses or if it is open-source. :-( Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ _______________________________________________ Lazarus mailing list http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Graeme Geldenhuys
to Tejero, Carlos German: Anybody know of something like this? I remember there was some single…
Carlos German wrote 5 lines
> I'm not sure of the product name, what technologies he uses or if it > is open-source. :-( http://www.overbyte.be/frame_index.html

That's the one I was thinking of! :) I see there was a Kylix beta out, so it might be somewhat portable and not too integrated into Windows technologies.

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Graeme Geldenhuys
to Inoussa OUEDRAOGO: For web services you can use WST with the Indy HTTP server listener ( compiled into your )
Inoussa OUEDRAOGO wrote 5 lines
For web services you can use WST with the Indy HTTP server listener ( compiled into your ) exe without dependencies (http://wiki.freepascal.org/Web_Service_Toolkit). It is stateless.

Ah, I forgot there was a Web Service Toolkit for Free Pascal.

I think your are talking about this HyperBase ( http://www.vglib.com/link-4.html ), There

A drop-in replacement! Wow, where was I 5 years ago, when I still used Delphi 7. :) Thanks for the link.

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Graeme Geldenhuys
to Michael Van Canneyt: You have no options currently. I have EXACTLY the same needs , and believe me, I searched…
Michael Van Canneyt wrote
You have no options currently. I have EXACTLY the same needs , and believe me, I searched :-)

Great to know I'm not alone. :-)

You can help him by porting hyperbase to FPC and then we should almost be there. (I think hyperbase, by vladimir gaitanoff, is the

I've downloaded MidWare for Kylix and Hyperbase so will have a look at both.

The plans for this are drawn, it's just a matter of implementing it. Maybe we can cooperate a bit on this ?

I wouldn't mind helping out. Master Maths doesn't have a need for it right now, but our application is structured in such a way that we can switch to n-tier down the line. Something I am planning for.

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Graeme Geldenhuys
to Michael Van Canneyt: You have no options currently. I have EXACTLY the same needs , and believe me, I searched…
Michael Van Canneyt wrote
You have no options currently. I have EXACTLY the same needs , and believe me, I searched :-)

Seeing that I heavily use tiOPF, and remember seeing a Remote Persistence Layer in tiOPF, I thought I better ask this question in that NG as well. I knew that Peter Hinrichsen used a remote persistence layer, but didn't know what it entails.

From his reply below, this sounds very promising, even for Free Pascal

users. The big bonus being, my tiOPF based applications would need no code changes. :)

Earlier message 102 lines
-------- Original Message -------- Subject: Re: multi-tier (n-tier ) applications with tiOPF Date: Thu, 20 Mar 2008 07:05:14 +1100 From: Peter Hinrichsen Newsgroups: tiopf.development References: > Peter, if you don't mind, would you be able to answer a few questions or > explain a bit on how it works? I will put together a demo (soon) - this has to be done for the ADUG Symposium, so it will get done this time. > I'm looking for a solution that will work on Linux and Windows. Free > Pascal obviously. ;-) > > > PC #1 PC #2 PC #3 > Client Application -----> Application Server -----> RDMS (db) That's about it. It uses Indy HTTP server at the back end, and either IndyHTTPClient, or MSXMLDOM on the client. The remote persistence layer works the same way as all the other persistence layers, so you can write either hard coded visitors, or auto map and you code will work connecting directly to the database, and via the app server. It's stateless, so lots of users can connect to the same app server as their connection time is very short. The trick was to get transaction management work. The TtiQueryRemote has BeginTransaction, Commit and Rollback just like the other persistence layers and some state is maintained on the application server to handle this. (If you click around the code, you will find a TtiStatefullDBConectionPool for this purpose) > I know the remote persistence layer does something with HTTP and XML, > but that is as far as my knowledge goes. :-( What packet transport does > it use? HTTP. That's as low level as tiOPF goes. Just XML wrapped up in plain-old HTTP. > Does it handle delta packets? Is it stateless? Not sure what you mean by delta-packets. It's stateless from the point of view of client connection to the server. Long business transactions (several network round trips) can be held open with some state being maintained on the app server. > What performance > do you get compared to a client/server setup? It's slower. I clocked it a while ago but can't remember the figures. There is a performance hit when data is read from the server, converted to xml, passed down the wire then the xml is parsed. On my systems, I have addressed the performance hit by caching as much static data on the client as possible. There is some good framework code in the \tiOPF2\Trunk\ApplicationServer\tiDBProxyServerExtension directory. > I guess the latter depends > on the packet transport mechanism. Not so much the packet transport, but the data marshallings. XML is sloooow to parse. There is a CSV wrapper that is about 20 x faster and I use this when caching large blocks of data. The problem with the CSV mechanism is that it's structures are not self-describing. Your code must be in sycn with the file structures. > I have downloaded MidWare for Kylix (old beta) and Hyperbase (midas drop > in replacement) to see if it inspires me to come up with some solution. > But if I can draw from any of your experience, that would be great too. The heart of the remote persistence layer is the TtiDataBuffer. A suite of classes that give Midas like functionality. The TtiDataBuffer is a list of table structures. There is a reader and a writer that converts the object graph to and from xml. There are visitors that convert the TtiDataBuffer into objects. So to add some more detail to your diagram: BOM -> Visitor -> TtiDataBuffer -> XML -> IndyHTTPClient -> IndyHTTPServer -> XML -> TtiDataBuffer -> Database. The code base is rock-solid and has been used in a complex production system for about four years. There are plenty of unit tests, The main down side is the usual lack of docs. P. ---------------[ end ]-------------- Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/

Reply by email

Lukas Gradl
to Graeme Geldenhuys: Has anybody created a multi-tier (or 3-tier) database application with Lazarus? I'm…

On Delphi I use kbmMW. They're working on Lazarus Version of their product - the MemoryTable TkbmMemTable is already available (and works quite well on Win32 and Linux!)

It's a commercial product with a quite hight learning curve but its has some amazing features....

Btw, you find them at http://www.components4developers.com/

regards
Lukas

Show quoted text 38 lines
Hi, Has anybody created a multi-tier (or 3-tier) database application with Lazarus? I'm looking for a solution that will work on Linux and Windows. PC #1 PC #2 PC #3 Client Application -----> Application Server -----> RDMS (db) In Delphi we used TClientDataset and midas.dll. What options do we have for FPC and Lazarus? Kylix 3 Enterprise used WebServices and SOAP, but I have never worked with WebServices or SOAP in my life. If WebServices are the only option, I would prefer to embed the HTTP server inside the Application Server tier, so I don't have to deploy Apache etc... Not being stateless would also be a nice bonus (or at least some work-around for it like is done in Kylix) Anybody know of something like this? I remember there was some single developer that wrote and alternative to Midas (for Delphi). I think he used Jedi's version control application as an example application. I'm not sure of the product name, what technologies he uses or if it is open-source. :-( Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ _______________________________________________ Lazarus mailing list http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
---------------------------- software security networks Lukas Gradl <lazarus#ssn.at> Eduard-Bodem-Gasse 9 A - 6020 Innsbruck Tel: +43-720-300168-0 Fax: +43-512-341033-19 ----------------------------

Reply by email