On Sun, Dec 1, 2013 at 4:28 PM, Filippo Fadda < [email protected]> wrote:
> > On Dec 1, 2013, at 4:26 AM, Alexander Shorin wrote: > > You can do the same with Erlang query server since it has access to > > all internal functions. > > I can do it in PHP inside my Query Server (I already said this to you), > without the need to investigate the CouchDB internals, trying to find the > functions to do that. I can simply include ElephantOnCouch inside my query > server and use it. But I'm not gonna do that, because I can obtain the same > result with a simple PHP script. > Should I use ErLang, learning something that is not documented, spending > days, just to obtain a little performance gain? Who cares! > You know why Oracle invented PL/SQL, Microsoft created Transact SQL or any > other RDBMS uses an SQL dialect? BECAUSE THEY ARE SIMPLE! > The internal functions you are talking about are not even documented for > christ's sake. > > > But I don't think you'd like to shot youself > > in foot by such side effects by losing all your data (; I even wonder > > if you really wanted them since it's good practice to have no global > > state and no side effects for any functions no matter where they are > > been executed: on CouchDB or inside your program. No state and no side > > effects guarantees you portability and explicit behaviour. For more > > arguments follow the functional programming languages - this is quite > > interesting world, but this is offtopic. > > The main purpose of a stored procedure is to elaborate data. The results > are new data or data changes. You can't do that inside a list or a show, so > they are not stored procedures. The only way you can do that is using > ErLang, right? Wow, this is great, same as writing an Oracle stored > procedure using C and the Oracle undocumented "internal functions". I'm > sarcastic. > Purpose of the lists are to manipulate results from secondary indexes aka views. SInce you can join and link inside a view. You have alreayd a lot without having to access to a db. Like stored procedures in facts (not triggers). > There is no point using list and show, unless you are writing a CouchApp > using CouchDB as an application server. Full stop. Ypu're wrong about that. Having a way to share data transformations using the replications amd make it available to all clients whatever their languages is quite convenient. Anyway you made your point. I just wanted to clarify this.
