<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix"><tt>John,<br>
        <br>
        Using "exec" has its own penalties - the exec itself is CPU
        consuming as the Operating System has to create a new process
        each time. Os it is not I/O, but it is CPU (system time).<br>
        <br>
        For the accounting part, I still recommend the flatstore as the
        most efficient approach. <br>
        <br>
        Regards,<br>
      </tt>
      <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
      On 12.01.2015 11:55, John Nash wrote:<br>
    </div>
    <blockquote
cite="mid:CAA4rGPy+cy=+b9CV4GFkPj8WBJ2BLzBrAQRckBN5VV9b1d0PiQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">OK..I think doing accounting in exec makes perfect
        sense.<br>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Mon, Jan 12, 2015 at 2:36 PM,
          Bogdan-Andrei Iancu <span dir="ltr">&lt;<a
              moz-do-not-send="true" href="mailto:bogdan@opensips.org"
              target="_blank">bogdan@opensips.org</a>&gt;</span> wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div text="#000000" bgcolor="#FFFFFF">
              <div><tt>Hi John,<br>
                  <br>
                  Indeed, depending on the nature of the query, some
                  answers can be cached, other not. If not, you need to
                  be sure your DB server is as efficient as possible in
                  answering.<br>
                  Accounting via flatstore file can be realtime (data is
                  written in RT into file and you can rote them when you
                  need).<br>
                  <br>
                  The next 2.1 is the first OpenSIPS version supporting
                  Async I/O ops. There are many kinds of I/O ops and
                  used in many places. It is hard to add async support
                  for all of them from the day one. The current plan is
                  to have support for exec module, for rest_client
                  module and possible for some mysql queries.<br>
                  In the worst case, you can push your DB queries into
                  external scripts and use the "exec" module with the
                  async support.<br>
                  <br>
                  Best regards,<br>
                </tt><span class="">
                  <pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a moz-do-not-send="true" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
                </span>
                <div>
                  <div class="h5"> On 11.01.2015 15:48, John Nash wrote:<br>
                  </div>
                </div>
              </div>
              <div>
                <div class="h5">
                  <blockquote type="cite">
                    <div dir="ltr">
                      <div>
                        <div>
                          <div>Hello Bogdan,<br>
                            <br>
                          </div>
                          Thank you. Cache features are really good and
                          I am using for Register and Invite auth  but I
                          need to run a query to find out allowed
                          duration for a call (unfortunately caching
                          cannot be used in that). Also Accounting I am
                          afraid has to be real time in my case.<br>
                          <br>
                        </div>
                        I think i should look forward to version 2.X
                        till the features I need are there. Any guess
                        how long full featured development version will
                        be out?<br>
                        <br>
                      </div>
                      John<br>
                      <div>
                        <div><br>
                          <br>
                          <br>
                          <br>
                          <br>
                        </div>
                      </div>
                    </div>
                    <div class="gmail_extra"><br>
                      <div class="gmail_quote">On Sat, Jan 10, 2015 at
                        1:16 AM, Bogdan-Andrei Iancu <span dir="ltr">&lt;<a
                            moz-do-not-send="true"
                            href="mailto:bogdan@opensips.org"
                            target="_blank">bogdan@opensips.org</a>&gt;</span>
                        wrote:<br>
                        <blockquote class="gmail_quote" style="margin:0
                          0 0 .8ex;border-left:1px #ccc
                          solid;padding-left:1ex">
                          <div text="#000000" bgcolor="#FFFFFF">
                            <div><tt>Hi Nash,<br>
                                <br>
                                It is somewhere in the middle :). Of
                                course the DB ops will bring some
                                penalties to the performance, so you
                                need to take care and tune your DB for
                                the best performance (not to drag down
                                opensips). With db ops is very common in
                                OpenSIPS scripts, so you do not do
                                anything crazy or stupid there.<br>
                                <br>
                                Of course, you should look into
                                optimizing the DB ops you use:<br>
                                    - DB auth - use caching at script
                                level (see <a moz-do-not-send="true"
                                  href="http://www.opensips.org/Documentation/Tutorials-MemoryCaching"
                                  target="_blank">http://www.opensips.org/Documentation/Tutorials-MemoryCaching</a>)<br>
                                    - ACC - consider using db_flatstore
                                to avoid writing into a real DB<br>
                                    - dialog - if not really a must use
                                db modes 2 or 3 (<a
                                  moz-do-not-send="true"
href="http://www.opensips.org/html/docs/modules/1.11.x/dialog.html#id294001"
                                  target="_blank">http://www.opensips.org/html/docs/modules/1.11.x/dialog.html#id294001</a>)<br>
                                <br>
                                Regards,<br>
                              </tt>
                              <pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a moz-do-not-send="true" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
                              <div>
                                <div> On 09.01.2015 20:19, John Nash
                                  wrote:<br>
                                </div>
                              </div>
                            </div>
                            <blockquote type="cite">
                              <div>
                                <div>
                                  <div dir="ltr">
                                    <div>
                                      <div>
                                        <div>
                                          <div>
                                            <div>I have used opensips
                                              for load balancing and
                                              some border proxy+
                                              NAT+rtpproxy in past and
                                              am quite happy with it.
                                              Recently I decided to add
                                              DB operations (Auth and
                                              accounting, routing and
                                              dialog into it so that
                                              heavy lifting of VOIP
                                              network can be given to
                                              opensips. I wanted to send
                                              call to PBX only when it
                                              is really needed (Like
                                              voicemail and conference
                                              etc)<br>
                                              <br>
                                            </div>
                                            But in a long time I saw
                                            this article <a
                                              moz-do-not-send="true"
                                              href="http://www.opensips.org/Documentation/TroubleShooting-FindPerfPb"
                                              target="_blank">http://www.opensips.org/Documentation/TroubleShooting-FindPerfPb</a>
                                            <br>
                                            <br>
                                          </div>
                                          As per this tutorial I think
                                          if any DB operation is slow,
                                          it will hit overall
                                          performance (I mean the
                                          transactions which do not
                                          require DB can also be stuck).<br>
                                          <br>
                                        </div>
                                        I know good engineers at
                                        openisps have already figured it
                                        out and working on 2.X version
                                        but looks like it will take a
                                        while so that I can give it a
                                        try (As dialog is not in current
                                        release).<br>
                                        <br>
                                      </div>
                                      With 1.X series + DB auth/acc +
                                      dialog should I reconsider my
                                      approach or there are systems
                                      running successfully and I am just
                                      being paranoid?<br>
                                      <br>
                                    </div>
                                    John<br>
                                    <div>
                                      <div>
                                        <div>
                                          <div>
                                            <div><br>
                                              <br>
                                              <div>
                                                <div>
                                                  <div><br>
                                                  </div>
                                                </div>
                                              </div>
                                            </div>
                                          </div>
                                        </div>
                                      </div>
                                    </div>
                                  </div>
                                  <br>
                                  <fieldset></fieldset>
                                  <br>
                                </div>
                              </div>
                              <pre>_______________________________________________
Users mailing list
<a moz-do-not-send="true" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a moz-do-not-send="true" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
                            </blockquote>
                            <br>
                          </div>
                        </blockquote>
                      </div>
                      <br>
                    </div>
                  </blockquote>
                  <br>
                </div>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
  </body>
</html>