Re: [sr-dev] [kamailio/kamailio] acc_json: adding module (#1440)

2018-02-16 Thread Julien Chavanton
Packet Type 1 - load tests

```
Total 250 INVITE calls sent in 2522028 ms at rate of 991/sec
Total 250 responses received in 2522826 ms at rate of 990/sec:

Detailed responses received:
 - 200 responses:  250 (OK)
--
 TOTAL responses:  250 (rate=990/sec)
```

rsyslog
```
wc -l /var/log/json_acc.log 
7500012 /var/log/json_acc.log
```
nsqd
```
nsqd v1.0.0-compat (built w/go1.8)
start_time 2018-02-16T22:36:24Z
uptime 2h1m51.901973386s

Health: OK

   [acc] depth: 0 be-depth: 0 msgs: 7500012  e2e%: 
  [nsq_to_file  ] depth: 7500012 be-depth: 7490012 inflt: 0
def: 0re-q: 0 timeout: 0 msgs: 7500012  e2e%: 
```
voip_perf client
```
./voip_perf -m INVITE -p 7075 sip:+1??@10.10.10.10:5060 \
--interval=1 \ 
--count=250 \  
--call-per-second=1000 \   
--thread-count=1 \ 
--timeout 17200  
```
voip_perf server
```
./voip_perf  -p 5072 --trying --ringing --thread-count=4 -d 500 
```

Latency graph showing stable response time
![image](https://user-images.githubusercontent.com/3736014/36335999-f11c213c-1338-11e8-9fa7-8df341df947f.png)


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1440#issuecomment-366399532___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] acc_json: adding module (#1440)

2018-02-15 Thread William King
Great work @jchavanton Glad to see this make it upstream. 

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1440#issuecomment-366010253___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] acc_json: adding module (#1440)

2018-02-15 Thread Julien Chavanton
Hi, @lazedo, thank for the feedback, we could keep some default provided 
outputs as "ease of use" default solutions and add a generic PV output or 
another module API.

I can share my thoughts, using mqueue we can already do routing script 
operation without blocking the worker process. (reusing an existing pattern in 
Kamailio)
As you have seen I provide an example with HTTP, tests have confirmed that this 
is very scalable with low latency local HTTP server. (especially with 
connection reuse recently introduced)
I did not test http_async not sure if it can be use in this scenario (I hope), 
but this would provide another very flexible solution to export using HTTP to 
anything with fluctuating latency.

@miconda
Thank you for the review and few fixes, I will gladly maintain this module and 
extensively test it shortly.


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1440#issuecomment-365982100___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] acc_json: adding module (#1440)

2018-02-15 Thread Daniel-Constantin Mierla
You can add a modparam to tune its behaviour and act as you want. Each 
developer is guided mainly by what he/she needs. What you suggest is also 
interesting to have and iirc  it was mentioned in the previous related PR, 
suggesting that future improvement, which can allow pushing out of kamailio via 
http or other channel.

Otherwise, generic operations/layers can add delays, e.g., in this case writing 
first in a pv buffer (private memory), then push it with another operation to 
mqueue (shared memory) or printed to syslog.

So, bottom line, one implementation doesn't exclude the other, they can 
co-exist.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1440#issuecomment-365898765___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] acc_json: adding module (#1440)

2018-02-15 Thread lazedo
this is a great addition but i think its restricted in the output.
`mqueue` and `syslog` shouldn't be here. the module should emit an event with 
the json payload as a new pseudo var,  and in the script we could the use 
mqueue, syslog or whatever the integrator/developer wishes to do with json 
payload. 


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1440#issuecomment-365896733___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] acc_json: adding module (#1440)

2018-02-15 Thread Daniel-Constantin Mierla
Merged #1440.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1440#event-1475570021___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio/kamailio] acc_json: adding module (#1440)

2018-02-14 Thread Julien Chavanton









 Pre-Submission Checklist



- [x] Commit message has the format required by CONTRIBUTING guide
- [x] Commits are split per component (core, individual modules, libs, utils, 
...)
- [x] Each component has a single commit (if not, squash them into one commit)
- [x] No commits to README files for modules (changes must be done to docbook 
files
in `doc/` subfolder, the README file is autogenerated)

 Type Of Change
- [ ] Small bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)

 Checklist:

- [ ] PR should be backported to stable branches
- [x] Tested changes locally
- [ ] Related to issue # (replace  with an open issue number)

 Description
See comments in this PR, https://github.com/kamailio/kamailio/pull/1437
new features are now implemented in the module `acc_json`

 Load tested
```
Total 100 INVITE calls sent in 2294479 ms at rate of 435/sec
Total 100 responses received in 2295273 ms at rate of 435/sec:

Detailed responses received:
 - 200 responses:  100 (OK)
--
 TOTAL responses:  100 (rate=435/sec)
```
You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/1440

-- Commit Summary --

  * acc_json: adding module

-- File Changes --

M src/Makefile.groups (2)
A src/modules/acc_json/Makefile (29)
A src/modules/acc_json/acc_json_mod.c (279)
A src/modules/acc_json/acc_json_mod.h (42)
A src/modules/acc_json/doc/Makefile (4)
A src/modules/acc_json/doc/acc_json.xml (42)
A src/modules/acc_json/doc/acc_json_admin.xml (299)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/1440.patch
https://github.com/kamailio/kamailio/pull/1440.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1440
___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev