[MarkLogic Dev General] HTTP vs XCC

Geert Josten Geert.Josten at daidalos.nl
Fri Sep 10 08:05:58 PDT 2010


Hi Jakob,

Not much to add from my side, the analysis of David is pretty thorough. Several pro/con's can be opposite as well, depending on your needs..

> I"ll unofficially answer with my personal non-sponsered opinion.
>
> XCC:
> Pro:
>
> Returns structured XML already converted into .NET native classes

Can be a con in a pass-through scenario..

> Native support for data 'uploads' (inserting data from local
> storage/memory)
> Can specifically exeucte arbitrary XQuery ("Ad Hoc query") or
> execute/invoke any xquery module explicitly

Can be considered a con with respect to security (code injection etc). You will need to apply good shielding..

> Con:
> Requires using the XCC Library

XCC library also ties you to .Net or Java (unless you manage to hook up to one of both from a different language)..

> Requires a separate app instance configuration (can also be a pro)
> Explicit coupling to MarkLogic API's.
>
>
> HTTP:
> Pro:
> Doesn't require a vendor library
> Requests are intercepted by the server and arbitrary business logic
> performed
> Can be viewed as a 'restful' serice which issolates the calling code
> from knowing how the request is processed.
> Gets through firewalls which limit requests to HTTP
> Can use HTTPS
> Can do intelligent URL mapping on server side to different services
> No need to know about the back end implementation, code or database
> structure.

No binding to ML API's, you can invent your own functional, to the point API.

> Con:
> Must parse your XML yourself as it is returned (if you are returning
> XML).
> Cannot call xquery code/expressions directly.

Unless you add a server side script that can do eval's for you (like QC does).

I usually tend to see this as a pro (not being able to inject arbitrary code) with regard to security (code injection etc etc)..

> No direct support for upload (but can be done in a PUT or POST with
> cooperative serever side code).

You will need server side code anyhow with HTTP, so no real argument. It is easy to write some general code that can handle basic CRUD on data in your database. The HTTP app server can handle PUT and POST with no trouble. Unquote can help marshall XML-as-text into XML..

Kind regards,
Geert


drs. G.P.H. (Geert) Josten
Consultant

Daidalos BV
Hoekeindsehof 1-4
2665 JZ Bleiswijk

T +31 (0)10 850 1200
F +31 (0)10 850 1199

mailto:geert.josten at daidalos.nl
http://www.daidalos.nl/

KvK 27164984


De informatie - verzonden in of met dit e-mailbericht - is afkomstig van Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend.



More information about the General mailing list