libmlxcc - MarkLogic Connector for C, PHP, Perl, Ruby, and Python

down arrow Code & Downloads

mlxcc is a C API for communicating with MarkLogic with bindings for perl, php, python, and ruby. It provides an implementation of the underlying wire protocol used to communicate with the server and is based off of the Java XCC/J libraries provided by MarkLogic. The goal of mlxcc is to provide a base interface into MarkLogic in which bindings into other popular languages can be built. You can download a copy here.

For more information see the project wiki at: http://mlxcc.qnot.org

This project was contributed by Andy Bruno of O'Reilly Media.

Comments

  • HOW TO CREATE MLXCC for MS Windows Vista/7/8  The following are instructions for successfully compiling and installing the MarkLogic MLXCC library libmlxcc available for download here so you can run it on the Microsoft Windows Intel platforms (x86,x64) for Vista and Windows 7.  In another post, I'll provide instructions on how to compile and install MLXCC under Mac OSX (Snow Leopard/Lion) on Intel. INTRODUCTION This project can be very educational and informative for someone who is interested in understanding how to  develop for the MarkLogic platform provided you understand just a bit about how C language files (source files, executable, libraries, etc.) are created work as API to connect your programs to  servers like the MarkLogic.  By no means does this kind of project require you posses expert knowledge of the C language or sys expertise of Microsoft's platform API (.NET, COM, MFC, ATL, etc.)  You do need to know a few simple DOS commands, a bit about how to work at the Windows command line under Vista ow Windows 7, and how to download and install the free Microsoft Express software developer tools from the Microsoft web site.  However, if you prefer not to delve into these areas and just want to use the XMLCC library, I will provide a link to a Windows setup/install program that will put the library in your \Windows\System32 or \Windows\System folder where you can use it with other programs like PHP, Python, and Ruby.  BEFORE YOU BEGIN To successfully compile the MLXCC library files from source on a Windows platform you can take two separate routes. The first route uses MinGW or CygWin emulators to compile the C language source files using the ported GCC toolset to install the MLXCC library. If you have wondered why MinGW and Cygwin are still around, this approach will answer that question and also give you a good foundation for looking into these two open source projects with renewed interest and understanding.    If you are reasonable familiar with Linux/Unix at the command line, this approach requires the least amount of work at the beginning other than downloading and installing either MinGW or Cygwin on your Windows machine. After installing either environment, the rest of the steps are easy to complete.  There are several excellent documentation sources and examples available on the project sites for each environment. Don't be too anxious and skip over the C Language tutorial (yes, read and follow the "Hello World" example) because you'll need to understand a few of the concepts involved in cross-platform compilation between those environments and Windows.     
    • Please look at your pull requests on github this is current BROKEN with ruby 1.9 for 9 months!
      • Thanks, this project, as you may surmise, has not been actively maintained for sometime.  For the past year or more, we've been pointing Ruby folks to ActiveDocument or Corona as these are simpler interfaces.  That said, we'll look at the old pull request.
  • This project shows a good deal of promise and potential, which is unfortunately marred by the lack of serious attention it is given by the developer.  The Python package for example is poorly documented especially for the Windows platform. What makes this even more frustrating is the problems could be easily fixed.  I personally downloaded the python-xcc-05.3.tar.gz package and successfully unpacked it using 7-Zip. The included setup.py file was ok except that it runs to an error ... \python-xcc-0.5.3>C:\Python27\python.exe setup.py installrunning installrunning buildrunning build_pyrunning build_extbuilding '_xcc' extensionerror: Unable to find vcvarsall.bat The included README file is useless and there are no other notes or documentation to explain what steps one can take to fix the problem.  What's even more frustrating and confusing is this error can easily be fixed, provided the maintainer would simply put ALL of the files for the project in the download area and a link to the Microsoft MSDN website where it explains in some detail the reasons for the error message.  Setup files in Python extensions SHOULD WORK, period. Yes, if the maintainer takes the time   to write them, they should run and abend with messages that are informative or at least provide some clue about what needs to be fixed. I shudder to think of the number of Python programmers that downloaded the files here and found they couldn't run them on Windows especially since Microsoft provides FREE C/C++ compiler tools. Shame on you Andy.    
    • This project has not been maintained for quite sometime.  If you are interested in participating, feel free to contact me, directly via twitter at @eedeebee.