[Cubicweb] Feedback on rqlcontroller

Jinpeng Li mr.li.jinpeng at gmail.com
Tue May 20 17:37:59 CEST 2014


Hi Cubicweb Team,

Just let you know my feedback on rqlcontroller.

Therefore recently I imported all the data using rqlcontroller over
http(s). It works very well for small set of data. However, considering a
large data set, sometimes I fail to get response after I post data to the
server. It may be caused by too frequent http-post on cubicweb server.
Or rqlcontroller try to protect server from DOS attack. Or it is a problem
in *requests. *I found a solution that I need to set up a timeout parameter
for the *requests* to avoid unlimited waiting.  Please see the example as
below. The test script and server is running on the same machine. The
network is stable. I hope this feedback is useful for you.

Regards,
Jinpeng


Test script:
```
import json
import uuid

try:
    # ensure a recent request lib is available
    import requests
    assert [int(n) for n in requests.__version__.split('.', 2)][:2] >= [1,
2]
except (ImportError, AssertionError):
    requests = None

if __name__ == "__main__":
    for i in xrange(10000):
        print "=" * 30
        print "step %d" % i
        unique_filename = uuid.uuid4()
        args = [('INSERT Subject S: S identifier "%(name)s"',
                 dict(name=str(unique_filename))), ]
        base_url = 'http://localhost:8080'
        r = requests.Session()
        a = r.get(base_url + "?__login=admin&__password=admin")
        print a.status_code
        a = r.post(base_url + "/rqlio/1.0",
                   data=json.dumps(args),
                   headers={'Content-Type': 'application/json'})
        output_rql = a.json()[0]
        print a.status_code
        print output_rql
```

Output:
```
==============================
step 0
200
200
[[2345]]
.
.
.
==============================
step 31
200
200
[[2376]]
==============================
step 32
200
200
[[2377]]
==============================
step 33
200

Freezing
```

On Thu, Mar 13, 2014 at 4:39 PM, Florent Cayré <florent.cayre at logilab.fr>wrote:

>  Hi,
>
> some comments below.
>
> Be aware that as expected, we just released signedrequest + rqlcontroller
> (for now in http://download.logilab.org/acceptance/).
>
> Your feedback is very welcome if you find any time to test them.
>
> Cheers,
> Florent.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cubicweb.org/pipermail/cubicweb/attachments/20140520/1f257ae5/attachment-0164.html>


More information about the Cubicweb mailing list