That's the job of the client with HTTP auth. Which client are you using? What
does your XHR request look like? Is there CORS involved? HTTPS? A password
manager?
Justin
On Jul 30, 2015, at 10:00 AM, Danny Sinang d.sin...@gmail.com wrote:
I have an ML app on port 7600 which prompts me for
Hi,
there is something which has surprised me so I'd like to share it. The
Word Query settings of a database do not only influence cts:word-query
searches, but also cts:element-word-query searches. The former are
mentioned on the help page, the latter not and so I thought there would be
a
I have an ML app on port 7600 which prompts me for credentials, which is
fine.
But the same app makes subsequent HTTP service calls to fetch data via Ajax
from the same port. Each of these subsequent calls will prompt for a
username and password unless I hard-code the credentials in my XQuery
Would this help? It takes tasks from a shared database, but runs from a
schedule, so I think it would spread across the cluster. Haven’t thoroughly
tested it in a cluster environment though..
https://github.com/grtjn/ml-queue
Cheers,
Geert
From:
This is what let me to believe spawn *may* work across nodes
https://docs.marklogic.com/guide/admin/scheduling_tasks
10. In the Task User and Task Host fields, specify the user with permission to
invoke the task and the host computer on which the task is to be invoked. If no
host is specified,
Yes, this is exactly one way my library could work: Setting up a one-time
scheduled task.
The drawback of scheduled tasks is that the task code needs to be in the
module database. So I would always have to deploy it first.
2015-07-30 14:36 GMT+02:00 David Lee david@marklogic.com:
This is
David, thanks for your response.
It's true, that often my tasks are quite simple. Then IO bound is indeed
the bottleneck. But using distribution I could speed up the processing by
the number of available nodes.
I am using Taskbot for batch-processing currently and I start it on every
node
This is an interesting use case. Much of the distributed processing external
tools (like mlcp) are designed around initial ingestion.
That is a case that if careful distributed can scale much better than a
simplistic approach. However in even in ingestion there are very specific
cases that
Hi Justin,
The ML web app is accessed directly via a browser (Chrome or Firefox).
The subsequent request (apparently not via Ajax yet) looks like this :
GET /release-tracking/services/get-products.xqy HTTP/1.1 401 209 - MarkLogic
This is when I comment out the http:authentication option in my
' The drawback of scheduled tasks is that the task code needs to be in the
module database. So I would always have to deploy it first.'
When first learning ML I had the same view of modules DBs.
But I have come fully around to never using a file for modules.
The 'initial pain' is due to there
Hmm, I didn't mean it that way. I didn't want to bring up the topic modules
database vs. filesystem. I am using module databases and know the
advantages :) And by the way: scheduled tasks could be run from the file
system too.
What I meant is that in production I would like to run an ad-hoc query
That's an improvement, thanks.
But I think what I am seeing is that it iterates through the doc results and
returns
Doc1 : ordered audience list 1
Doc2 : ordered audience list 2
...
Is there a better way to build out the list in one fell swoop so I can get them
all together?
From:
Just to look ahead a little to that next question: fn:distinct-values
says The order in which the sequence of values is returned is
implementation dependent.
One way to maintain order is to go through your values in order, only
pass the ones that haven't been seen. map:map is useful for that
Actually I found my answer.
Your snippet worked perfectly if I remove the /@audience from the order by
statement.
for $audience in $these-docs//ec:audience
order by $audience
return $audience/fn:string()
Now to dedupe
... I am sure there's a fn:distinct-values function I can use somewhere...
Thanks. I haven't worked with the map function yet. I was trying to use
distinct-values in the for loop, but get an error that my value isn't a node
(which is true)
for $audience in xs:string(fn:distinct-values($these-docs//ec:audience))
order by $audience
return $audience/fn:string()
The result of your search is a sequence of documents. I think you want to
xpath down to audience for each document in your FLOWR. Something like:
for $audience in $these-docs//ec:audience
order by $audience/@audience
return $audience/fn:string()
-Danny
From:
Hi Andreas,
Interesting slides, good find!
If you are talking about more ad hoc processing, you could look into things
like https://github.com/mblakele/taskbot, and
https://github.com/marklogic/corb2. These are tools that can batch up the work
very well. They won’t spread load across a
This is missing some of the traces and the timestamps (is this from
ErrorLog.txt ?)
But from what I can see this is working 'as expected'
The first 3 lines are from an unknown unauthenticated user:
[Event:id=AppRequest Authentication Details] Authenticated Request User: 0
[Event:id=HTTPRequest
Gert's ml-queue does something similar. Its stores the query in the database
and calls xdmp:eval on the query. And this can be done from a scheduled task on
every node.
Yes that should do the trick. It should be easy to write your own as well.
Note that this is no different than deploying
Hi David,
Thanks for the response. Please find the attached app-server configuration.
What I am exactly doing is I want to throw some custom error which was running
in ML 6 from the user-defined error-handler in ML 8 as well when an
unauthorized user comes in who is not being listed in
Hi Geert,
Thanks for the update.
Triggers and the CPF aren't exactly what I'm looking for. What I want to do
is to distribute one-time tasks like adding new elements to all existing
documents.
I've found some slides
21 matches
Mail list logo