Subject RE: [firebird-support] Embedded again
Author Alan McDonald
> :: dll don't start on their own - they need a host - look in
> :: task manager and
> :: you will find more than one svchost.exe listed. That's the
> :: OS host for
> :: services which are not standalone executables.
>
> If they have a host - why cant the embedded allow multiple clients then if
> they are on the same machine? Ie multiple applications?

it can if you create the middle tier host to do it.
you create an application which on the one hand loads the standard embedded
server. It provides a listener via whatever means you wish e.g. TCP port
(which you object to) or via direct exported method (which you favour). This
application then brokers connections from as many clients as you wish. It
effects communication to the database file for as many clients as you wish
and responds appropriately to those connected clients.
You could probably build a beast like this in no time flat using something
like remobjects right now.
You have everything you need to accomplish this, superserver embedded if
just the ticket.
>
> :: and yes classic has a master controller - it can't work any
> :: other way.
>
> Actually it can, there is a way for cooperative hosting, but it
> sounds like
> FB doesn't use that. Which is fine - but it is possible.
>

FB doesn't "host" at all. Your application is the host. FB embedded is just
the device you want to host. It's up to you to use it the way you want.

> :: then you have it already in the form of super server running as an
> :: application instead of a service. Your app can start the SS
>
> If it runs as an application:
>
> 1) It still needs a TCP port yes? Then I have firewall issues with users.

Yes it needs TCP if you use the application or the service, The embedded
does not use TCP communications but rather exported methods. I'm unclear
what you mean exactly by firewall issues here. If the FB service is
installed on just about any computer OS nowadays, you will need to address
port access in order to use it from a foreign computer.

>
> 2) I still have to somehow detect if its started or not - and
> start it yes?

If it's TCP based AND it's running on port 3050 (which it doesn't have to)
then you can test for an answer on 3050. If you create your own host then
you will need to devise another (proprietary) method of detection.

>
> 3) I have potential conflicts if they already have FB installed.

The server? yes

>
> :: application if it's not running already and never shut it
>
> And how can I detect if there is an FB server already running or not?
>

After you have assumed the port number, test if it responds. If it deosn;t
respond, then server could still exist and be running on another port :-(
Alan