db_mongodb_admin.xml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <?xml version="1.0" encoding='ISO-8859-1'?>
  2. <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
  4. <!-- Include general documentation entities -->
  5. <!ENTITY % docentities SYSTEM "../../../docbook/entities.xml">
  6. %docentities;
  7. ]>
  8. <!-- Module User's Guide -->
  9. <chapter>
  10. <title>&adminguide;</title>
  11. <section>
  12. <title>Overview</title>
  13. <para>
  14. This module provides DB APIv1 connector for MongoDB NoSQL server.
  15. </para>
  16. <para>
  17. It can be used as a replacement for other database modules such as
  18. db_mysql, db_postgres, a.s.o. Not all the specs of DB APIv1 are
  19. implemented, thus the usage of this module might be restricted to
  20. specific modules.
  21. </para>
  22. <para>
  23. You can read more about MongoDB at:
  24. <ulink url="http://www.mongodb.org">http://www.mongodb.org</ulink>.
  25. </para>
  26. <section>
  27. <title>Limitations</title>
  28. <itemizedlist>
  29. <listitem>
  30. <para>
  31. This module has implemented the equivalent operations for INSERT,
  32. UPDATE, DELETE and SELECT. The match condition (WHERE clause)
  33. works with the operators: equal, not equal, greater than, less than,
  34. equal or greater than, equal or less than. Raw query is not
  35. implemented inside this module, use ndb_mongodb for sending any
  36. kind of command to a MongoDB server.
  37. </para>
  38. </listitem>
  39. </itemizedlist>
  40. </section>
  41. </section>
  42. <section>
  43. <title>Dependencies</title>
  44. <section>
  45. <title>&kamailio; Modules</title>
  46. <para>
  47. The following modules must be loaded before this module:
  48. <itemizedlist>
  49. <listitem>
  50. <para>
  51. <emphasis>none</emphasis>.
  52. </para>
  53. </listitem>
  54. </itemizedlist>
  55. </para>
  56. </section>
  57. <section>
  58. <title>External Libraries or Applications</title>
  59. <para>
  60. The following libraries or applications must be installed before running
  61. &kamailio; with this module loaded:
  62. <itemizedlist>
  63. <listitem>
  64. <para>
  65. <emphasis>mongo-c-driver</emphasis> - available at
  66. <ulink url="https://github.com/mongodb/mongo-c-driver">https://github.com/mongodb/mongo-c-driver</ulink>
  67. </para>
  68. </listitem>
  69. </itemizedlist>
  70. </para>
  71. </section>
  72. </section>
  73. <section>
  74. <title>Usage</title>
  75. <para>
  76. Load the module and set the the DB URL for specific modules to:
  77. mongodb://username:password@host:port/database. Username, password
  78. and port are optional.
  79. </para>
  80. <example>
  81. <title>Usage</title>
  82. <programlisting format="linespecific">
  83. ...
  84. loadmodule "db_mongodb.so"
  85. ...
  86. #!define DBURL "mongodb://localhost/kamailio"
  87. modparam("acc", "db_url", DBURL)
  88. ...
  89. </programlisting>
  90. </example>
  91. </section>
  92. </chapter>