It's not on the roadmap, but I did some design work on the idea during 
ML6 development when I wrote the aggregate UDFs code. I've added an 
internal RFE for the feature (3043).

John

On 12/06/14 12:29, Retter, Adam (RBI-UK) wrote:
> Okay that is a shame. I appreciate that internal and external APIs should 
> always be decoupled, but I was just trying to look for an interim solution 
> until you have an external API published. Thanks for your suggestion, but the 
> use of a HTTP bridge here would incur a performance overhead which would 
> remove the reason for doing this work, so that is not an option in this 
> instance.
>
> Is the creation of an external API for non-aggregate UDF in the roadmap?
>
> Cheers Adam.
>
> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of John Snelson
> Sent: 12 June 2014 12:26
> To: MarkLogic Developer Discussion
> Subject: Re: [MarkLogic Dev General] Non-Aggregate UDF
>
> On Linux that would be way too complicated - the external APIs are quite 
> different from the internal APIs (which is good practice BTW), and the 
> internal APIs have much too broad a surface area. On Windows it's flat out 
> not possible, as the MarkLogic executable doesn't export symbols for the 
> internal APIs.
>
> Another way that people often do this is via an HTTP call to REST endpoint 
> running locally which performs the desired action. As far as I know HTTP to 
> localhost is an optimized path on most OSs these days.
>
> John
>
> On 12/06/14 12:17, Retter, Adam (RBI-UK) wrote:
>> Is there any way that I can do this using the internal API? And would you be 
>> willing to provide me with the minimum documentation to do this. I assume 
>> that I just need to extend a specific class and place my library onto a 
>> system load path somewhere? If you could share the .hpp file for the 
>> internal module base class that could be enough perhaps? p.s. It has been 
>> sometime since I have done C++ so my terminology may be way off!
>>
>>
>>
>> -----Original Message-----
>> From: [email protected]
>> [mailto:[email protected]] On Behalf Of John
>> Snelson
>> Sent: 12 June 2014 12:14
>> To: MarkLogic Developer Discussion
>> Subject: Re: [MarkLogic Dev General] Non-Aggregate UDF
>>
>> Hi Adam,
>>
>> The short answer is that you can't - we haven't written an external
>> API for that yet. The longer answer is that you can kind of twist the
>> aggregate UDF API to do that by just having blank map and reduce
>> methods
>> - but obviously you'll pay the cost of visiting the D-nodes each time they 
>> get called.
>>
>> John
>>
>> On 12/06/14 10:00, Retter, Adam (RBI-UK) wrote:
>>> Hi there,
>>>
>>> I would like to create some extension functions in C++. I believe
>>> that you call these UDF (User Defined Functions), however I can only
>>> seem to find documentation for creating Aggregate UDF functions. In
>>> this instance I am not interested in the content of the database,
>>> indexes or map-reduce, rather I want to create a set of XQuery
>>> functions that bridge to an external system, this bridge needs to use
>>> a proprietary communications protocol.
>>>
>>> Can someone please point me to the documentation on how to create
>>> non-Agrregate UDF functions?
>>>
>>> Cheers Adam.
>>
>

-- 
John Snelson, Lead Engineer                    http://twitter.com/jpcs
MarkLogic Corporation                         http://www.marklogic.com
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to