Hi Yogesh,

It might be easiest to handle this outside of MarkLogic. There are lots of ways 
to make reusable code snippets available. You have Github for public sharing, 
which can be used together with the MLPM tool for MarkLogic libraries 
(http://registry.demo.marklogic.com/), but you can probably think of various 
ways of doing this internally as well, if necessary..

You can also share modules within an ML cluster, but I’d be reluctant with 
that. You’d use super/sub-databases for that. Put the shared code in a 
sub-database. Keep in mind though, that whenever you touch the shared code, all 
app-servers using that will be affected. For constants this might be good (for 
some system-wide configuration or such), but for shared code this might be less 
a good idea. It would be tricky to do regression testing on multiple apps for 
each code change. You’d probably want to use a sharing strategy that uses 
versioning. The above MLPM tool would allow that, it was inspired by how NPM 
works..

Cheers,
Geert

PS: small disclaimer, MLPM and its registry are not covered by MarkLogic 
Support, they are a community effort..

From: 
<general-boun...@developer.marklogic.com<mailto:general-boun...@developer.marklogic.com>>
 on behalf of "Jangam, Yogesh CWR" 
<yogesh.jan...@credit-suisse.com<mailto:yogesh.jan...@credit-suisse.com>>
Reply-To: MarkLogic Developer Discussion 
<general@developer.marklogic.com<mailto:general@developer.marklogic.com>>
Date: Thursday, November 17, 2016 at 9:12 AM
To: "general@developer.marklogic.com<mailto:general@developer.marklogic.com>" 
<general@developer.marklogic.com<mailto:general@developer.marklogic.com>>
Subject: [MarkLogic Dev General] Sharing Modules

Is there any recommended way of sharing module / functionality implementations 
across different DB on same ML server.
For example you could have a XQY code that does custom string 
conversion/manipulation or a map of constants/literals. How can this be shared ?


Yogesh Jangam
CREDIT SUISSE
Information Technology | Content Management APAC, VICC 23
S2, Rajiv Gandhi Infotech Park (Cs Sez) | Pune 411 057 | Asia-Pacific
Phone +91 20 6690 2130,*6882130
yogesh.jan...@credit-suisse.com<mailto:yogesh.jan...@credit-suisse.com> | 
www.credit-suisse.com<http://www.credit-suisse.com/>



==============================================================================
Please access the attached hyperlink for an important electronic communications 
disclaimer:
http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
==============================================================================
_______________________________________________
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to