Subject | Re: [firebird-support] Events and non-intrusive, opt-in, server-side fulltext-search |
---|---|
Author | Martijn Tonies |
Post date | 2005-03-11T10:49:30Z |
Hello Daniel,
Depending on the task the UDF is performing, this may or may
not block the server.
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server
Upscene Productions
http://www.upscene.com
> > Well, connecting to the database from an external functionhave a
> > is generally a no-go area.
>
> Well, this must be a misunderstanding.
> The external function will connect to the fts-server, which in turn might
> connection open to the FB server to wait for events.That sounds a bit better.
> The UDFs will in no way connect to the the FB server themselves.
> > External functions should be fast. Connecting to a databaseSee below.
> > network latecy because of your server-side app being on
> > another machine doesn't fit this description.
>
> Uhm, so external functions doing heavy computing aren't allowed, too?
> I don't see the point here, really.
> > Mind you: executing an external function will block the serversure
> > thread executing it!
>
> Okay, this might be a crucial point.
> I don't know about FB's internal threading policies, so I guess it's good
> that I discuss my idea here, after all. :)
>
> Well, look at the sample stored select-procedure. Whether it selects from
> a table or from an external entity via a UDF (of course, I'll have to make
> that the UDFs will never block forever for some reasons) shouldn't make aAs long as the procedure is caling the UDF, it will block, right?
> difference to the FB server, would it?
Depending on the task the UDF is performing, this may or may
not block the server.
> For incremental updating, there'll be a stack for actions in the sharedobject
> anyways, so a call for fts_update(table, id) will only append the updateaction
> for this table to the stack, which will be processed "later".With regards,
>
> But I notice a problem here... because I think the update will be done by
> telling the fts-server a primary key and what happened to it, it has to
> connect back to the server to get the actual texts it needs.
> I guess I need a two-way connection, after all.
> But only for updates, and those are done asynchronously. For searches, the
> fts-server doesn't need info from the database.
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server
Upscene Productions
http://www.upscene.com