[GitHub] ermouth commented on issue #1534: proposed 1.x deprecations

2018-08-12 Thread GitBox
ermouth commented on issue #1534: proposed 1.x deprecations
URL: https://github.com/apache/couchdb/issues/1534#issuecomment-412367604
 
 
   > Could your embedded RasPi update function be written declaratively?
   
   Very unlikely, devices do not post json. For now both `_update` and 
`_rewrite` as a fn are able to chop up requests having binary body, and then 
decide. I have no doubts any DSL making this kind of work will be either 
useless for other scenarios, or too complex if it wants to cover everything. 
DSLs are not a substitute for yet unknown tasks. Any DSL is domain-specific, or 
it’s a cumbersome mess.
   
   > The UNIX philosophy applies to CouchDB as to any other program
   
   Indeed, however ‘do one thing’ is, looking at most of modern really user- 
and dev-friendly SW, bit unpopular from UX point of view. This rule was good at 
CLI-only times, and those times are gone. For now, standing for this rule 
mostly increases transaction costs: the approach of loosely stitching things 
together is good for scripts, but often induces heavy deployment and impedance 
alignment costs for continuous systems.
   
   Also let me remind another Unix rule that still stands, the rule of 
diversity: **Make programs flexible, allowing them to be used in ways other 
than those their developers intended.**
   
   > The same goes for a proxy server like HAproxy or Nginx when it comes to 
proxying, vhosts and rewrites
   
   I have nothing to say about vhosts and proxying, we never used them 
seriously as those settings are not replicatable, but as for rewrites...
   
   What about deployment? If you have hundreds of nodes which are not intended 
to be members of a cluster, updating external proxy rules is a serious pain 
with immense number of uncomfortable (or just dangerous) subtleties. With 
delivering API wiring using regular data flow deployment is just one click, 
because it uses most powerful feature of Couch: replication. Utils like 
nginx-sync do not stand even near.
   
   > So far, the big place he's stuck is implementing lists
   
   It would be nice to have more info, no one can help having no description of 
a problem. 
   
   Should removing or simplifying `.info` obj ease the task? It was done for 
rewrites as a fn, and this trim, aside of other effects, gives good perf 
improvement comparing to other QS stuff. Actually, CouchDB 1.6.1 patched with 
JS rewrites and called through rewrite JS function is still in most cases bit 
faster then naked single-node 2.x.
   
   > Alternately, what would Mango need added to it to give you sufficiently 
improved list functionality to fully replace JS lists?
   
   Full replacement is impossible, or you will make new DSL just another 
programming language. However if narrow the scope to simplest cases and 
JSON-only, joins and reducers are obvious answer. If former is more or less 
clear and implementable, the latter just does not fit well into DSL concept 
except simplest cases.
   
   So, summing up: I have nothing to say about non-replicatable features or 
features proven to be buggy and unreliable. But I think most features using 
benefits of syncing code with data flow better be kept.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] ermouth commented on issue #1534: proposed 1.x deprecations

2018-08-11 Thread GitBox
ermouth commented on issue #1534: proposed 1.x deprecations
URL: https://github.com/apache/couchdb/issues/1534#issuecomment-412308090
 
 
   @wohali 
   > recognize you are angry and want to fight for something you believe in
   > You want to contribute to couchapps still?
   
   There is kind of misunderstanding. We use couchapps, but not in the way you 
think. We have Couchbox, which completely replaces couchapp-related QS fns, 
able to run legacy code, and is much faster and reacher with features (but much 
heavier). So we do not need `_list`, `_rewrite` or `_update` for _couchapps_. 
   
   But there exist other scenarios, probably not so visible, where built-in QS 
stuff seem to be extremely valuable.
   
   Update fns is the only way to send whatever data to Couch without prior 
reading. It‘s invaluable feature for ie nets of sensors. Couch here acts as an 
aggregator, and ability to run Couch on PI allows to make aggregators very 
lean, setup them in place, and avoid app layer completely (which is obviously 
important for lean devices).
   
   Lists are also valuable for scenarios of aggregating data from net of 
sensors. You can perform remote data lookup on whatever basis without fetching 
real data, and have no serious bucket stalls, like you have with views. Mango 
queries seem to provide alternative mechanics for this, but they are less 
flexible (however much more fast).
   
   Rewrites (only as functions surely) are just great. Ability to re-wire API 
remotely has a lot of applications aside of couchapps. Also this approach of 
providing API is easily testable without deployment. Functions are easy to play 
with, unlike sets of nginx or haproxy rules.
   
   All those features just work. They might be faster, and some improvements 
are low hanging fruits, but they already work in acceptable way. They only need 
very minor repair time to time.
   
   So I can’t accept your ”submit PRs or stop complaining“. There’s not so lot 
of things I personally want to improve. However, I think I can help with fixing 
(or at least nailing down) QS-related bugs. Hope it may help to preserve those 
features little bit longer.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services