FWIW, you could write some XQuery code to interact with Amazon SNS for
monitoring. I have done this in the past for both eXist and 28msec. In the
past, this was a problem to do this natively in MarkLogic XQuery because it
lacked the security hash algorithm(?) that was needed. I seem to recall that
the security hash algorithm was going to be implemented within MarkLogic at
some point down the road (not sure when) . Without this, you would have to
fall back to a MLJAM hack to do the calculation ... which is not really
appealing. If I get some time, I'll try and put the code on github sometime
next week.
Darin.
________________________________
From: "[email protected]" <[email protected]>
To: General MarkLogic Developer Discussion <[email protected]>
Cc: General MarkLogic Developer Discussion <[email protected]>;
[email protected]
Sent: Wednesday, September 14, 2011 4:57 PM
Subject: Re: [MarkLogic Dev General] Remote xqueries via php
Hi,
Apologies for not replying sooner. I've been tied up with a bunch of other
stuff...
My issue isn't with the inate speed of the protocol but more the fact that
it is stateless and so takes a long time timing-out when transport gremlins
strike. However, I'll follow you're advice on this.
I would like to ask though, what does marklogic provide by way of snmp
support? If it has a rich mib then that would seem to be the most natural
solution from a monitoring perspective.
_____________________________________________________
David Rooke
Website Performance Engineer
New Media Product Team
| Mob:
One Reading Central, Forbury Road, Reading, RG1 3YL
www.yellgroup.com
P Please consider your environmental responsibility before printing this
e-mail
To
Charles Greer General MarkLogic Developer Discussion
<[email protected]> <[email protected]>
Sent by: cc
general-bounces@devel
oper.marklogic.com Subject
Re: [MarkLogic Dev General] Remote
xqueries via php
13/09/2011 18:06
Please respond to
General MarkLogic
Developer Discussion
<[email protected]
rklogic.com>
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
[Information] -- PostMaster:
This transmission is intended solely for the addressee(s) and may be
confidential. If you are not the named addressee, or if the message has been
addressed to you in error, you must not read, disclose, reproduce, distribute
or use this transmission.
Delivery of this message to any person other than the named addressee is not
intended in any way to waive confidentiality. If you have received this
transmission in error please contact the sender or delete the message.
Thank you.
Yell Limited, One Reading Central, Forbury Road, Reading, Berkshire, RG1 3YL.
Registered in England No. 4205228
Yellow Pages Sales Limited, One Reading Central, Forbury Road, Reading,
Berkshire, RG1 3YL. Registered in England No. 1403041
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general