Recent

Author Topic: Firebird  (Read 15190 times)

Graeme

  • Hero Member
  • *****
  • Posts: 1432
    • Graeme on the web
Re: Firebird
« Reply #15 on: February 04, 2016, 11:29:49 am »
I highly recommend Firebird 2.5 (and can't wait for v3.0 as it has really awesome features). I is really small, simple to deploy and can even be used in an embedded or read-only environment. I have used it for small database as multi GigaByte databases. It worked really well en all environments. The other really nice thing about Firebird is that you can do a "deploy and forget" at clients that don't have dedicated database administrators. Firebird manages itself very well.

So how do I connect to Firebird. I use tiOPF [http://tiopf.sourceorge.net], which allows me to create Client/Serve and 3-tier software. Switching between the two is simply one change of a compiler define, and then recompile my software. The 3-tier support over the Internet has really good performance too because the data gets encrypted and compressed before it is sent over the wire.

The other benefit of using tiOPF for your database access, is that you can switch between database components (eg: SqlDB, IBX, Zeos etc) withouth changing a single line of code in your application. You can also change backend database servers, again without changing a single line of code in your application.

If you want to know more about tiOPF, please feel free to drop in at the dedicated support newsgroup:
  http://tiopf.sourceforge.net/Support.shtml
   
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

Zoran

  • Hero Member
  • *****
  • Posts: 1974
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: Firebird
« Reply #16 on: February 04, 2016, 12:20:21 pm »
If you are using Firebird up to version 2.5 (2.5 is faster than 2.1, that is faster than 2.0, etc), an workaround would be to use ZeBeDee:
Using ZeBeDee with Firebird to Encrypt and Compress Network Traffic
by Artur Trindade Anjos, July 2002
https://www.ibphoenix.com/resources/documents/how_to/doc_301

This article is written in 2002. On the ZeBeDee internet site we can see that it was not updated since 2005. Now we are in 2016. Is it still a good and secure solution?

Swan, ZX Spectrum emulator https://github.com/zoran-vucenovic/swan

Zoran

  • Hero Member
  • *****
  • Posts: 1974
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: Firebird
« Reply #17 on: February 04, 2016, 01:47:20 pm »
So how do I connect to Firebird. I use tiOPF [http://tiopf.sourceorge.net], which allows me to create Client/Serve and 3-tier software.

Graeme, I never created 3-tier software, but I would like to learn. I would like to make middle tier and learn how to do it, how to communicate between front-end and middle tier and how to communicate between middle tier and DB...

So, I am asking for your advice where to start. As I have long time experience with client-server (two tier, Delphi way) applications, but not with middle tier, should I start by reading tiOPF documentation, or should I learn more before it?
Swan, ZX Spectrum emulator https://github.com/zoran-vucenovic/swan

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1106
Re: Firebird
« Reply #18 on: February 04, 2016, 03:22:25 pm »
If you are using Firebird up to version 2.5 (2.5 is faster than 2.1, that is faster than 2.0, etc), an workaround would be to use ZeBeDee:
Using ZeBeDee with Firebird to Encrypt and Compress Network Traffic
by Artur Trindade Anjos, July 2002
https://www.ibphoenix.com/resources/documents/how_to/doc_301

This article is written in 2002. On the ZeBeDee internet site we can see that it was not updated since 2005. Now we are in 2016. Is it still a good and secure solution?

Using any database, including Firebird of any version, straight on the internet as a client/server solution is a bad idea.
ZeBeDee was an workaround. It's not the ideal solution.
The best solution is to use Firebird 3.0 in a multi-tier approach as soon as it is released.

Zoran

  • Hero Member
  • *****
  • Posts: 1974
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: Firebird
« Reply #19 on: February 04, 2016, 03:36:27 pm »
Using any database, including Firebird of any version, straight on the internet as a client/server solution is a bad idea.
ZeBeDee was an workaround. It's not the ideal solution.

Okay.

The best solution is to use Firebird 3.0 in a multi-tier approach as soon as it is released.

But you just said any database, including Firebird of any version (any version includes 3.0) is a bad idea? ;)
Swan, ZX Spectrum emulator https://github.com/zoran-vucenovic/swan

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1106
Re: Firebird
« Reply #20 on: February 04, 2016, 04:11:54 pm »
The best solution is to use Firebird 3.0 in a multi-tier approach as soon as it is released.

But you just said any database, including Firebird of any version (any version includes 3.0) is a bad idea? ;)

Working client/server straight on the internet is a bad idea for any database.
If you need to work on the internet with any database, the best solution is to work multi-tier because of security and speed reasons.

rvk

  • Hero Member
  • *****
  • Posts: 6886
Re: Firebird
« Reply #21 on: February 04, 2016, 04:12:14 pm »
The best solution is to use Firebird 3.0 in a multi-tier approach as soon as it is released.
But you just said any database, including Firebird of any version (any version includes 3.0) is a bad idea? ;)
Firebird 3.0 in a multi-tier approach isn't Firebird alone. In that case you won't expose Firebird directly to the internet and use a multi-tier approach to get the data from the database. For example tiOPF or you create your own communications-format.

Using VPN, Zebedee, SSH or any other tunneling software is ok too. But never expose any database product directly to the outside world without a security layer (being a secure tunnel of multi-tier solution).

This article is written in 2002. On the ZeBeDee internet site we can see that it was not updated since 2005. Now we are in 2016. Is it still a good and secure solution?
Yes, as far as I know it is still a secure solution. It probably isn't worked on actively because it just works :)

B.T.W. I also found this page. It also has some instructions. It also mentions SoftetherVPN as a VPN solution which supposed to be easy to setup. Haven't tried this myself yet.

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1106
Re: Firebird
« Reply #22 on: February 04, 2016, 04:22:43 pm »
So how do I connect to Firebird. I use tiOPF [http://tiopf.sourceforge.net], which allows me to create Client/Serve and 3-tier software.

Graeme, I never created 3-tier software, but I would like to learn. I would like to make middle tier and learn how to do it, how to communicate between front-end and middle tier and how to communicate between middle tier and DB...

So, I am asking for your advice where to start. As I have long time experience with client-server (two tier, Delphi way) applications, but not with middle tier, should I start by reading tiOPF documentation, or should I learn more before it?

I am not Graeme and I have already worked multi-tier before, but I am studying the information provided at http://tiopf.sourceforge.net/ and I think they are pretty good even for who only knows client/server programming.

Zoran

  • Hero Member
  • *****
  • Posts: 1974
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: Firebird
« Reply #23 on: February 04, 2016, 10:16:31 pm »
Working client/server straight on the internet is a bad idea for any database.
If you need to work on the internet with any database, the best solution is to work multi-tier because of security and speed reasons.

Firebird 3.0 in a multi-tier approach isn't Firebird alone. In that case you won't expose Firebird directly to the internet and use a multi-tier approach to get the data from

I see, the point is - go for multi-tier. Thank you.
Swan, ZX Spectrum emulator https://github.com/zoran-vucenovic/swan

Zoran

  • Hero Member
  • *****
  • Posts: 1974
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: Firebird
« Reply #24 on: February 04, 2016, 10:18:30 pm »
I am not Graeme and I have already worked multi-tier before, but I am studying the information provided at http://tiopf.sourceforge.net/ and I think they are pretty good even for who only knows client/server programming.

Thank you, so I'm going to try learning multi-tier with tiOPF.
Swan, ZX Spectrum emulator https://github.com/zoran-vucenovic/swan

Graeme

  • Hero Member
  • *****
  • Posts: 1432
    • Graeme on the web
Re: Firebird
« Reply #25 on: February 05, 2016, 01:09:39 pm »
I would like to make middle tier and learn how to do it, how to communicate between front-end and middle tier and how to communicate between middle tier and DB...
In the case of tiOPF, data persistence (reading/writing data) is done via a persistence layer. Moving from a Client/Server application to a 3-tier application with tiOPF, is simply a case of switching the persistence layer to Remote Persistence. Nothing else needs to change in your application. The joys of a well designed framework. :-)

tiOPF's remote persistence (3-tier) works using a generic Application Server application, supplied by tiOPF. It works out of the box with everything you need, but you can obvious customise it too. The application server is implemented using Indy 10's HTTP Server component. It obviously talks to the database using whatever persistence layer you enabled there (IBX, SqlDB, Zeos etc). Your client application will use the Remote persistence layer, and you give it the IP address or domain name of the Application Server. The Remote Persistence layer uses Indy 10's HTTP Client component. It will also stream, compress and encrypt data to/from the Application Server.

The nice thing of 3-tier with tiOPF is that there is no additional licensing costs (eg: Oracle will most likely charge per connection to the database). In tiOPF's case, there is only one database connection from the Application Server, and nothing from the client software. Also the Client software doesn't need any extra database libraries installed, as it uses TCP/IP to communicate with the Application Server, and all OSes come standard with TCP/IP support.

In a nut shell, the 3-tier layout looks as follows:

Code: [Select]
   database_server     <--->   Application server <-------------[ WAN or LAN]--------------->  Client application(s)

Quote
So, I am asking for your advice where to start. As I have long time experience with client-server (two tier, Delphi way) applications, but not with middle tier, should I start by reading tiOPF documentation, or should I learn more before it?
As I mentioned, if you get a working client/server application going with tiOPF, there is nothing new to learn if you want to switch to 3-tier. Simple change the persistence layer (normally a Compiler Define in project settings) and recompile. Done!

To get started, get the latest tiOPF code from the repository, switch to the tiopf2 branch, which is the branch that supports FPC and Delphi (up to D2007 I think). Reading some documentation would be good, but I know how much developers love to read documentation.  ;) The "concepts manual" is good though.  I do suggest you work through the demos though. Each demo was designed to be simple and concerntate on only showing one feature. That makes it easier to learn and understand.  Demo 18 is a complete example of Client/Server and 3-tier. It has an application server implemented as a GUI app (useful for debuging) and a Windows Service. It also has various Client applications (GUI, console, web).

Other than that, search the tiopf.support newsgroup, and ask any further questions there.

The following URL shows some more FPC+Lazarus specific instructions.
http://wiki.freepascal.org/tiOPF
« Last Edit: February 06, 2016, 08:22:54 pm by Graeme »
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

Zoran

  • Hero Member
  • *****
  • Posts: 1974
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: Firebird
« Reply #26 on: February 06, 2016, 02:33:22 pm »
Thank you, Graeme. I'll try reading the documentation, and if I need help I will ask in tiopf.support newsgroup.
« Last Edit: February 06, 2016, 02:35:30 pm by Zoran »
Swan, ZX Spectrum emulator https://github.com/zoran-vucenovic/swan

 

TinyPortal © 2005-2018