HTTP is a Good Thing.  Sometimes it's counter intuitive that HTTP can be as
speedy a protocol as something that looks more like a traditional database
handle.  Connection overhead for a relational database is generally so high
that you'd want to choose protocols that preserve long-lived connections.
MarkLogic doesn't have this performance characteristic, and as already
mentioned, XDBC/XCC connections use the same backend code as HTTP
connections anyway.  There's a good reason why you're not finding newer XCC
PHP libraries -- the XCC/XDBC libraries are really there as a Java crutch.
You'll be very happy if you use the RESTful API over HTTP for monitoring
MarkLogic.

Am I getting ahead of myself again?  5.0 is right around the corner.

On Tue, Sep 13, 2011 at 7:32 AM, Erik Hennum <[email protected]>wrote:

> Hi, David:
>
> What Kelly has sketched:
>
> > I would think about what you are building as a set of services that can
> be invoked from your monitoring client. Each service can take different
> arguments, and each service can emit results in the format you feel is best
> for your needs (HTML, XML, JSON, etc). Each service would be written as an
> XQuery program that runs from within the database, like a stored procedure
> in a relational database (we call them stored modules).
>
> could server as the abstract for the set of RESTful endpoints for
> monitoring that MarkLogic 5 is going to provide.
>
> So, if you wrote your monitoring client using HTTP now, you would likely
> have an smaller upgrade path to take advantage of these services later.
>
>
> Erik Hennum
> ________________________________________
> From: [email protected] [
> [email protected]] On Behalf Of Kelly Stirman [
> [email protected]]
> Sent: Tuesday, September 13, 2011 6:52 AM
> To: [email protected]
> Subject: Re: [MarkLogic Dev General] Remote xqueries via php
>
> I would architect your monitoring program to interact with MarkLogic over
> HTTP. The performance differences between XCC and HTTP are small in most
> cases. I wouldn't assume HTTP is slow for MarkLogic - that's how many
> customers deploy their applications.
>
> I don't understand the use of Zorba in your approach, but maybe I'm
> overlooking something - it would be interesting to hear what you were
> thinking.
>
> I would think about what you are building as a set of services that can be
> invoked from your monitoring client. Each service can take different
> arguments, and each service can emit results in the format you feel is best
> for your needs (HTML, XML, JSON, etc). Each service would be written as an
> XQuery program that runs from within the database, like a stored procedure
> in a relational database (we call them stored modules). This approach allows
> the database to pre-parse and cache the program for optimal performance. As
> an aside, stored procedures never felt very natural to me in SQL, but in
> XQuery whole programs that are invoked as a service feel second nature
> almost as the language lends itself to this model very nicely.
>
> Once you have these services built, you can invoke them from any language
> that can call out over HTTP. You can use PerformanceMeters to test the
> performance of your modules. You can even compare between XCC and HTTP if
> you'd like.
>
> Kelly
>
> Message: 1
> Date: Tue, 13 Sep 2011 11:41:02 +0100
> From: [email protected]
> Subject: [MarkLogic Dev General] Remote xqueries via php
> To: [email protected]
> Message-ID:
>        <
> of14093a0c.d7c1e58d-on8025790a.00331710-8025790a.003ab...@yellgroup.com>
>
> Content-Type: text/plain; charset=US-ASCII
>
>
> Hi,
> I have begun work on monitoring our marklogic farm. The approach I've
> chosen to take, at the moment, is to compose xqueries with php and zorba,
> query the marklogic servers remotely and then proxy the responses into our
> network monitoring platform.
>
> The piece that I'm not entirely sure about is the remote querying of
> marklogic. Can anyone tell me if, and how, XCC can be used with php?
> Otherwise, I assume I'll need to use xdbc (I have an xdbc module for php).
> If anyone can provide advice/guidance, code samples or snippets that will
> offer greater insight into the solution I need I'll be very grateful.
> _______________________________________________
> General mailing list
> [email protected]
> http://developer.marklogic.com/mailman/listinfo/general
> _______________________________________________
> General mailing list
> [email protected]
> http://developer.marklogic.com/mailman/listinfo/general
>
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to