Recent

Author Topic: Firebird  (Read 15149 times)

TRNelson

  • Jr. Member
  • **
  • Posts: 64
Firebird
« on: February 03, 2016, 07:06:27 pm »
Where is a good place to ask questions about Firebird?  I have a compiled program that I to have access a database on a remote system running Firebird.  Quite new to all this. 

Thanks!

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1106
Re: Firebird
« Reply #1 on: February 03, 2016, 07:17:06 pm »
Since you are already here, start asking here...

But if you don't feel this is enough, go straight to the source of Firebird:
http://www.firebirdsql.org/en/support/

TRNelson

  • Jr. Member
  • **
  • Posts: 64
Re: Firebird
« Reply #2 on: February 03, 2016, 07:36:54 pm »
Alrighty then.  I created a small application that seems to work fine on my computer on my local network.  I would like to run it on another computer that is not on my local network.  I am running No-IP and can successfully ping my computer from a remote site.

I copied the resulting .exe file and tried to run it on the remote machine and it comes up with an error declaring that there are missing dll's (fBclient.dll, fbembed.dll and gds32.dll).  I copied them to the same folder that the .exe is in and the run the program. 

Now it comes up with a missing icuuc30.dll error.  I can't seem to get around this one.

Is there some way of deploying the .exe without having to drag along these 3 dll's with it? 

And what about that icuuc30.dll issue?  I haven't found a solution that works.

Any help would be greatly appreciated.  I am still learning.  All this is fascinating stuff.

rvk

  • Hero Member
  • *****
  • Posts: 6885
Re: Firebird
« Reply #3 on: February 03, 2016, 08:10:47 pm »
First of all... you want to access the Firebird server on another computer. You mention fbembed.dll so my guess is you installed the local embedded firebird files when testing this local. When accessing another computer you need to install Firebird server on the main machine (where the database will reside). After that you need to install the Firebird Client on the client machine. After that you need to open up port 3050 to the main machine... BUT...

WARNING:
Opening up a Firebird server to the internet is a very dangerous thing. It's better to first create a VPN connection and access it over that. In that case you don't need to open up port 3050 but you need some knowledge about setting up a VPN.

WARNING WARNING:
Accessing a Firebird database over the internet (even through a VPN) will be slow as hell. I won't recommend it. It will be much better to create a middle-ware solution where you only sent the necessary data over the line. Firebird tends to be very chatty and even over a fast connection it will be slow (because you still have a sizable ping).

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1106
Re: Firebird
« Reply #4 on: February 03, 2016, 09:57:04 pm »
WARNING:
Opening up a Firebird server to the internet is a very dangerous thing. It's better to first create a VPN connection and access it over that. In that case you don't need to open up port 3050 but you need some knowledge about setting up a VPN.

WARNING WARNING:
Accessing a Firebird database over the internet (even through a VPN) will be slow as hell. I won't recommend it. It will be much better to create a middle-ware solution where you only sent the necessary data over the line. Firebird tends to be very chatty and even over a fast connection it will be slow (because you still have a sizable ping).

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


On Firebird 3.0 onwards, we have native solutions:
-------------------
Remote Interface Improvements
V. Khorsun, D. Yemanov
Feature request CORE-971
The remote protocol has been slightly improved to perform better in slow networks. In order to achieve this, more advanced packets batching is now performed, along with some buffer transmission optimizations. In a real world test scenario, these changes showed about 50 per cent fewer API round trips, thus incurring about 40 per cent fewer TCP roundtrips.
In Firebird 2.1 the remote interface limits the packet size of the response to various isc_XXX_info calls to the real used length of the contained data, whereas before it sent the full specified buffer back to the client buffer, even if only 10 bytes were actually filled. Firebird 2.1 remote interface sends back only 10 bytes in this case.
Some of our users should see a benefit from the changes, especially two-tier clients accessing databases over the Internet.
http://www.firebirdsql.org/file/documentation/release_notes/html/rlsnotes217.html

Firebird Core
Improve network protocol performance
http://tracker.firebirdsql.org/browse/CORE-971

Influence of network latency in the Firebird wire protocol
http://asfernandes.blogspot.com.br/2009/07/network-latency-influence-on-firebird.html

Firebird Core
Don't send full length of field over the wire when field is null
http://tracker.firebirdsql.org/browse/CORE-2897

Firebird Core
Denser data stream and better prefetch logic in the network protocol
http://tracker.firebirdsql.org/browse/CORE-2530

Improvement
[CORE-733] - Compress Data over the Network
http://tracker.firebirdsql.org/browse/CORE-733

Documentation
Note about FB 3 wire protocol optimization sponsorship
http://tracker.firebirdsql.org/browse/DOC-96

Testing the Firebird 3 protocol enhancements
http://www.firebirdnews.org/testing-the-firebird-3-protocol-enhancements/

Firebird 3 protocol benchmark
http://www.firebirdnews.org/firebird-3-protocol-benchmark/

Improvement
[CORE-848] - Security on server and database level
http://tracker.firebirdsql.org/browse/CORE-848
-------------------


valdir.marcos

  • Hero Member
  • *****
  • Posts: 1106
Re: Firebird
« Reply #5 on: February 03, 2016, 10:20:21 pm »
... I copied the resulting .exe file and tried to run it on the remote machine and it comes up with an error declaring that there are missing dll's (fBclient.dll, fbembed.dll and gds32.dll).  I copied them to the same folder that the .exe is in and the run the program. 
Now it comes up with a missing icuuc30.dll error.  I can't seem to get around this one.
Is there some way of deploying the .exe without having to drag along these 3 dll's with it? 
And what about that icuuc30.dll issue?  I haven't found a solution that works. ...

fbclient.dll and gds32.dll are the same library with different names because of backward compatibility with older versions of Delphi.

fbembed.dll  is not necessary on your case. It would only be necessary if you needed an embeded solution, for example, to run on a cd or dvd or inside an industrial machine (IoT).

icuuc30.dll is a "dynamic link library" related do International Components for Unicode (UTF).
You do not need to move or copy icuuc30.dll.
If you are receiving error messages maybe because this file is corrupt or infected by a virus.
Try to remove and reinstall Firebird and double check your anti-virus solution.
In last case, format your computer and reinstall Windows.

rvk

  • Hero Member
  • *****
  • Posts: 6885
Re: Firebird
« Reply #6 on: February 03, 2016, 10:53:07 pm »
icuuc30.dll is a "dynamic link library" related do International Components for Unicode (UTF).
You do not need to move or copy icuuc30.dll.
If you are receiving error messages maybe because this file is corrupt or infected by a virus.
Try to remove and reinstall Firebird and double check your anti-virus solution.
In last case, format your computer and reinstall Windows.
Reinstalling Windows is a bit overkill in this situation  ;D
icuuc30.dll (with a whole bunch more dlls) is normally part of the server-dll's, and in case of the fbembed.dll, part of the Embedded server. My guess is that fbembed.dll is loaded first (because TRNelson had both fbembed.dll and fbclient.dll copied to the program directory) and because it's loaded as Embedded server it also needs all the other dll's. (dll hell, yeah baby :))

If you only use fbclient.dll it won't need icuuc30.dll because then it will act as a client. I've never tried just to use  fbclient.dll because the Firebird client also needs some Windows-library (Visual Studio runtime DLLs) and the Firebird client install will take care of that automatically. So my install-program automatically downloads and runs the Firebird-client installation. After that there is no need for providing the fbclient.dll yourself.

The improvements in Firebird 3.0 are interesting though. I've only gotten up to 2.1 over the internet and that was very slow. I did read a while back that the then upcoming 3.0 would have improvements and seeing the links it seems it has. If I got some time I should test this again (with VPN or Zebedee for security because nobody should want to open up 3050 directly to the internet).

TRNelson

  • Jr. Member
  • **
  • Posts: 64
Re: Firebird
« Reply #7 on: February 04, 2016, 12:39:20 am »
Erg...  A lot here.  It seems that it is a dim prospect to get this working like I envisioned with Firebird.

What about using the Microsoft SQL Server 2014 free package?

My aim to make this as painless as possible for the user (and me!).  I was hoping to just give the program (and perhaps a few dll's) on a stick have them run it without having to install or change anything on their machine.  It really is a very simple look up and maybe update a record or 2 system.  Is this naive?
« Last Edit: February 04, 2016, 01:10:42 am by TRNelson »

bee

  • Sr. Member
  • ****
  • Posts: 393
Re: Firebird
« Reply #8 on: February 04, 2016, 02:27:59 am »
Firebird is a simple but powerful yet easy to use RDBMS. It's cross platform. There are no reasons to replace it with another RDBMS if it already works with your program.

For a complex application thas has more than a single exe file, you better use an installer that could help both of you and your users. With an installer, you could include any files your program needs and put them in the proper folder. Using an installer, your users don't need to know anything, just run the installer, wait for a few minutes, and simply run your app.
-Bee-

A long time pascal lover.

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1106
Re: Firebird
« Reply #9 on: February 04, 2016, 02:31:20 am »
The improvements in Firebird 3.0 are interesting though. I've only gotten up to 2.1 over the internet and that was very slow. I did read a while back that the then upcoming 3.0 would have improvements and seeing the links it seems it has. If I got some time I should test this again (with VPN or Zebedee for security because nobody should want to open up 3050 directly to the internet).

Firebird 3.0 RC2 is just about to be released.

All versions before 2.5 are now discontinued.

Both Firebird 2.1 and 2.5 improved wired network protocol performance in high latency networks (aka internet).
It got much better performance than versions 2.0 and before.
This performance was good for small and medium projects on internet, but still not enough for large scale projects with client and server aparted on the internet without a middleware such as Midas, Datasnap, RemObjects DataAbstract, KbmMW, Real Think Client, etc.
Firebird 2.5 WITHOUT ZeBeDee got a faster performance than Firebird 2.0 WITH ZeBeDee.
Now, Firebird 3.0 goes far beyond even on the internet.

Firebird 3 RC2 expected release date:
http://www.firebirdnews.org/firebird-3-rc2-expected-release-date/

Discontinued Versions
http://www.firebirdsql.org/en/discontinued-versions/

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1106
Re: Firebird
« Reply #10 on: February 04, 2016, 02:51:40 am »
What about using the Microsoft SQL Server 2014 free package?

My aim to make this as painless as possible for the user (and me!).  I was hoping to just give the program (and perhaps a few dll's) on a stick have them run it without having to install or change anything on their machine.  It really is a very simple look up and maybe update a record or 2 system.  Is this naive?

Compare both below and see for yourself:

-----------------------------
Firebird is open source and it is neither artificially limited in sockets, nor in processor cores, nor in memory per instance, nor in max database size, nor in max instances.
It is free and prepared for scale for very small through very big.

http://www.firebirdsql.org/en/firebird-2-5-5/
Release            Name                     Size of download
November 18, 2015    Firebird-2.5.5.26952_0_Win32.exe    7 MB
November 18, 2015    Firebird-2.5.5.26952_0_x64.exe       10 MB
-----------------------------
https://www.microsoft.com/pt-br/download/details.aspx?id=42299
Microsoft® SQL Server® 2014 Express
Versão: 12.0.2000.8            Data de publicação: 25/06/2014

Nome do arquivo:            Tamanho do arquivo:
Express 32BIT WoW64\SQLEXPR32_x86_PTB.exe   164.5 MB
Express 32BIT\SQLEXPR_x86_PTB.exe      183.3 MB
Express 64BIT\SQLEXPR_x64_PTB.exe      215.7 MB
ExpressAdv 32BIT\SQLEXPRADV_x86_PTB.exe      1.1 GB
ExpressAdv 64BIT\SQLEXPRADV_x64_PTB.exe      1.2 GB


http://sqlknowledge.com/2014/04/sql-2014-express-edition-limitations/
Posted on 03-04-2014
SQL 2014 Express edition is free and great head start for small applications or learning purposes. SQL 2014 express is available in 5 variants for more flexibility; its self explanatory names are given below. Each has nearly similar features and limitations except followings. Check the references for detailed list.
    Express with Advanced Services (SQLEXPRADV) with features like : Reporting Services feature, Full-text and semantic search, Specification of language in query
    SQL Server Management Studio Express (SQLManagementStudio)
    Express with Tools (SQLEXPRWT)
    Express (SQLEXPR)
    LocalDB (SqlLocalDB) a very light weighted edition for development purposes.

before considering SQL 2014 express edition installation, you may want to check limitations:-
    Database Engine, and Analysis Services: Limited to lesser of 1 Socket or 4 cores
    Max Memory per instance: 1 GB
    Max Database size: 10GB (data file size only)
    Max instance per server: 50
-----------------------------

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1106
Re: Firebird
« Reply #11 on: February 04, 2016, 02:58:21 am »
For a complex application that has more than a single exe file, you better use an installer that could help both of you and your users. With an installer, you could include any files your program needs and put them in the proper folder. Using an installer, your users don't need to know anything, just run the installer, wait for a few minutes, and simply run your app.

@TRNelson
Just in case you don't know any installer tool on Microsoft Windows, I recommend you to take a look on the free and open source Inno Setup:
http://www.jrsoftware.org/isinfo.php
https://github.com/jrsoftware/issrc

rvk

  • Hero Member
  • *****
  • Posts: 6885
Re: Firebird
« Reply #12 on: February 04, 2016, 03:31:55 am »
It really is a very simple look up and maybe update a record or 2 system.  Is this naive?
Opening up ANY database directly to the internet is naive. Never do that. Not with Firebird, not with MySQL and not with MS SQL. Always use a secure connection like VPN or Zebedee. Or choose a middleware solution (create a small program in between the database server and your client on the internet who can handle the communication). Yes, you can use a direct connection but you leave your system and database open for attacks. And once they're in they have complete control over your database. So know what the security implications are when you do this. For this reason I created a small jQuery mobile webapp which can view and edit some data in our crm-system. jQuery mobile on the client side (for mobile and desktop browsers) and a PHP-script (communication via json-data) on the server-side with extra checks on what it does to the database on the local network. But instead of jQuery you could also communicate directly between two lazarus programs with json-data for example (but for me it was easier to not have a server-app running besides apache/php which was already present). Otherwise use a VPN or Zebedee connection. You can use Zebedee without setup. You only need to create the appropriate connection parameters and after that you can just start it (could even be done from your program) and connect your lazarus sqlconnection to the local created pseudo-ip. (Let us know if you're interested in this option and you want some setup instructions)

aradeonas

  • Hero Member
  • *****
  • Posts: 824
Re: Firebird
« Reply #13 on: February 04, 2016, 09:18:38 am »
Quote
Opening up ANY database directly to the internet is naive. Never do that.
Even with connection with SSH?

rvk

  • Hero Member
  • *****
  • Posts: 6885
Re: Firebird
« Reply #14 on: February 04, 2016, 09:57:57 am »
Quote
Opening up ANY database directly to the internet is naive. Never do that.
Even with connection with SSH?
No, SSH would be comparable with VPN and Zebedee so that should be save. You could create a port forwarding (or tunneling) over SSH for port 3050. Actually Zebedee works the same way but with the advantage of compression. Setting up an SSH-server is much more difficult though (on Windows. For Linux it's normally already installed). Zebedee server just has one simple executable with a setup-file.
« Last Edit: February 04, 2016, 10:01:29 am by rvk »

 

TinyPortal © 2005-2018