Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Issue 146 in couchdb-python: Up-to-dated view server
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 26 - 30 of 30 - Collapse all  -  Translate all to Translated (View all originals) < Older 
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
couchdb-pyt...@googlecode.com  
View profile  
 More options Sep 13 2011, 6:45 am
From: couchdb-pyt...@googlecode.com
Date: Tue, 13 Sep 2011 10:45:48 +0000
Local: Tues, Sep 13 2011 6:45 am
Subject: Re: Issue 146 in couchdb-python: Up-to-dated view server

Comment #25 on issue 146 by kxepal: Up-to-dated view server
http://code.google.com/p/couchdb-python/issues/detail?id=146

It's good thing to review your own code after some time passed. This update  
includes a lot of fixes and even some new features:

global:
- removed global state and cross module references (WOO-HOO!)
- rewritten QueryServer api
- added SimpleQueryServer as high level abstraction on top of QS internals
- added MockQueryServer to help write unittests
- fix docstring and typos.
- query server logs are more useful now in debug mode
- update documentation with android paragraph and how to customize query  
server
- place TODO references to actual CouchDB issues: COUCHDB-729, COUCHDB-282,  
COUCHDB-1261, COUCHDB-898. I could fix them locally, but this will make  
more differences between original JS server and Python one.
- add more over 170 test cases

compiler:
- fix crush for compilation of source code with windows newlines
- fix double crush if function compilation failed
- fix crush for malformed base64 encoded egg
- fix crush on egg cache usage
- code refactoring

stream:
- abstraction from JSON module exception type on decode/encode operations

render:
- fix COUCHDB-1272
- code refactoring

validate:
- prevent query server crush by validate_doc_update on Python exceptions

views:
- reduce_output_overflow error now will be raised properly
- small refactoring
- document seal now works better with copy.deepcopy()

design functions:
- send(), start(), provides(), register_type() available only for show and  
list functions
- get_row() available only for list functions
- log() function is not proxy of logging.info anymore

All test passed for:
- Python 2.4 to 2.7
- PyPy 1.5 and 1.6
- Android 2.3.4 with Python for Android version 5 against CouchDB-1.0,  
andorid-0.1 and MobileFuton 1.7

Please, could someone review docstrings and sphinx docs? I'm sure  
documentation text is far from good state /:

Attachments:
        queryserver.zip  47.7 KB


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
couchdb-pyt...@googlecode.com  
View profile  
 More options Feb 12 2012, 6:49 am
From: couchdb-pyt...@googlecode.com
Date: Sun, 12 Feb 2012 11:49:51 +0000
Local: Sun, Feb 12 2012 6:49 am
Subject: Re: Issue 146 in couchdb-python: Up-to-dated view server

Comment #26 on issue 146 by djc.ochtman: Up-to-dated view server
http://code.google.com/p/couchdb-python/issues/detail?id=146

I took a look at this, but I'm having some trouble getting the tests  
running. In particular, this bit doesn't seem to work, independent of the  
view server used:

djc@enrai couchdb-python $ python
Python 2.7.2 (default, Oct 24 2011, 10:16:20)
[GCC 4.5.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.

>>> import subprocess
>>> pipe = subprocess.Popen(['/usr/bin/python2.7', 'couchdb/view.py'],  
>>> shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE,  
>>> stderr=subprocess.STDOUT)
>>> pipe.stdin.write('["reset"]\n')
>>> pipe.stdout.readline()

^CTraceback (most recent call last):
   File "<stdin>", line 1, in <module>
KeyboardInterrupt

Meanwhile, this works just fine from the command-line:

djc@enrai couchdb-python $ python couchdb/view.py
["reset"]
true

I looked at the queryserver.zip from comment 25 and the files from comment  
6. It seems to me that the former is too large and complex to take into  
couchdb-python at this time. The stuff from comment 6 is much more simple,  
but I couldn't run the test suite due to the above issue.

Finally, the code in comment 6 does a bunch of stuff to stay compatible  
with all of 0.9, 0.10 and 0.11+. I would propose that any new view server  
code we take for our next release be limited to supporting  
0.11+-compatible; that's already quite old at this point.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
couchdb-pyt...@googlecode.com  
View profile  
 More options Feb 12 2012, 7:42 am
From: couchdb-pyt...@googlecode.com
Date: Sun, 12 Feb 2012 12:42:01 +0000
Local: Sun, Feb 12 2012 7:42 am
Subject: Re: Issue 146 in couchdb-python: Up-to-dated view server

Comment #27 on issue 146 by kxepal: Up-to-dated view server
http://code.google.com/p/couchdb-python/issues/detail?id=146

Hi, Dirkjan!

Thanks for first review(: Actually, I never run it as subprocess, but if  
you take a look at couchdb/tests/testutil.py::QueryServer so it could be  
run as subprocess, just remove shell=True from Popen.

There is a huge difference between comment 6 and comment 25. It's not in  
code size, it's in bugs, code complexity, documentation, tests, features,  
logging and how easily you could extend it without getting things broken.  
Support of old CouchDB releases is not a little part of it, just a few  
functions that easily could be removed. For example, I've easily added  
multiprocessing support for qs#25 for map/reduce functions just by  
decorating server/views.py functions without touching source code.

Also, you have to change a look from comment 6 to comment 22. That was the  
last version of all-in-one-file queryserver, but it still buggy by design.

Main goal of qs#25 and all code splitting was to simplify future support,  
allow to extend it easy and help with couchapps unittesting because now you  
could run it not as subprocess. And it had been reached.

You may read changelogs in this thread and in my clone at viewserver  
branch, they are quite full.

I admit, that it's a little big patch for about 250KB of code(removing  
docstrings could reduce it by half I sure), but I'd like to take support of  
it, because I use it for everyday tasks, I knew each line of it, I'd like  
to help couchdb-python project and I do not want to create  
yet-another-python-queryserver-project. Peoples knows about couchdb-python,  
knows about his viewserver and expecting that it's fine. Why not to satisfy  
them?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
couchdb-pyt...@googlecode.com  
View profile  
 More options Aug 3 2012, 12:54 pm
From: couchdb-pyt...@googlecode.com
Date: Fri, 03 Aug 2012 16:54:14 +0000
Local: Fri, Aug 3 2012 12:54 pm
Subject: Re: Issue 146 in couchdb-python: Up-to-dated view server

Comment #28 on issue 146 by kxepal: Up-to-dated view server
http://code.google.com/p/couchdb-python/issues/detail?id=146

Updated Python query server in attachments. After almost year usage in  
production there was fixed some small problems:
- Eventually crush on chunk encoding for _list functions.
- View lib cleanup on reset command
- Handle single named MIME type params e.g. application/pdf;base64
- Reduced useless logging output to improve they readability.
- Fix COUCHDB-1330.
- Fix crush on malformed MIME type.
- Couchapp modules no more needed to be wrapped into some scope: just write  
regular
Python code for them. For example:
{{{
   import datetime

   def foo(datetime=datetime):
       return  
datetime.datetime.utcnow().replace(microsecond=0).isoformat('T')

   exports['foo'] = foo

}}}

Now you may remove any proxy hacks to have simply and expected code  
behavior:
{{{
   import datetime

   def foo():
       return  
datetime.datetime.utcnow().replace(microsecond=0).isoformat('T')

   exports['foo'] = foo

}}}

This change doesn't affects on other ddoc functions: show/lists/views etc.

Attachments:
        queryserver.zip  51.1 KB


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
couchdb-pyt...@googlecode.com  
View profile  
 More options Sep 21 2012, 4:35 am
From: couchdb-pyt...@googlecode.com
Date: Fri, 21 Sep 2012 08:35:25 +0000
Local: Fri, Sep 21 2012 4:35 am
Subject: Re: Issue 146 in couchdb-python: Up-to-dated view server
Updates:
        Owner: kxepal

Comment #29 on issue 146 by djc.ochtman: Up-to-dated view server
http://code.google.com/p/couchdb-python/issues/detail?id=146

(No comment was entered for this change.)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages < Older 
« Back to Discussions « Newer topic     Older topic »