Re: [basex-talk] Nugets?

2018-06-08 Thread Christian Grün
Hi Peter,

In the past, users of BaseX have contributed custom packages for
various package managers (npm, Homebrew, etc.). I don’t know much
about the .NET package manager, but from what I’ve read it seems to be
fairly simple to create NuGet packages. And (as has already been
indicated), our C# client is slick and has no external dependencies,
so it should be even easier.

Peter, do you have some experience with Nuget packages that you would
be willing to share with us? Following Michael’s suggestion, I have
created a little GitHub issue [1]; all hints on what needs to be done
are welcome.

Thanks in advance,
Christian

[1] https://github.com/BaseXdb/basex/issues/1578



On Fri, Jun 8, 2018 at 4:06 PM Michael Seiferle  wrote:
>
> Hi Radim, hi Dirk, hi Peter,
>
> in my opinion  offering nuget packages might at least be worth investigating, 
> if we were able to automate their creation I sure don’t have any objections!
>
> After (briefly) reading the documentation at 
> https://docs.microsoft.com/en-us/nuget/what-is-nuget I think shipping a 
> precompiled version of our c# client (including version information, license 
> information etc.)
> would already help Peter, Radim and their teams in using our client, right?
>
> If there is mutual interest we could move the discussion to GitHub, I’d be 
> grateful if s/o with more .net platform expertise was willing to join the 
> actual process or at least provide some pointers in the right direction :-)
>
> Best from Konstanz
>
> Michael
>
>
>
> Am 08.06.2018 um 15:37 schrieb  
> :
>
> Hello,
>
> it would be nice to have BaseX as a Nuget package, but I can live without 
> that. It's quite easy to integrate it as-is.
> Regads,
>
> Radim Havlicek
> C# developer
>
> -- Původní e-mail --
> Od: Kirsten, Dirk 
> Komu: Peter Villadsen 
> Datum: 8. 6. 2018 12:45:53
> Předmět: Re: [basex-talk] Nugets?
>
> Hello Peter,
>
> just my thoughts, and Christian for sure will answer you more politely, but I 
> am quite confused by your email. First of, I (and I am sure many others…) 
> have never heard of Nuget before and saying “engineers expect that” is 
> certainly wrong. It might be true for the C# community, but there are other 
> engineers out there…
>
> And given that C# is not a focus of BaseX, but instead only provides a client 
> for your convenience I am not surprised the BaseX team does not support that.
>
> Also, I have a hard time believing the trivial 302 lines of code of the C# 
> client are that expensive and time consuming to check. Also, the Microsoft 
> internal pre-shipping legal audits seem to be neither the fault nor the 
> responsibility of BaseX. Hey, BaseX is even under the most liberal open 
> source licence, something which can not be said about many Microsoft products 
> (although I appreciate the improvements Microsoft have done in their actions 
> and think regarding open source).
>
> Given that BaseX is an open source product you are more than welcome to 
> contribute these nuget packages. It is even super-easy, because the BaseX 
> repository is hosted on this Microsoft webplatform GitHub.
>
> Best regards
> Dirk
>
>
> Senacor Technologies Aktiengesellschaft - Sitz: Eschborn - Amtsgericht 
> Frankfurt am Main - Reg.-Nr.: HRB 105546
> Vorstand: Matthias Tomann, Marcus Purzer - Aufsichtsratsvorsitzender: Daniel 
> Grözinger
>
> On 7. Jun 2018, at 18:55, Peter Villadsen  
> wrote:
>
>
> Hello,
> I am building a system that relies on a Basex backend, and for that I have 
> chosen to use the TCP protocol. My system is built in managed code, so I went 
> ahead and copied the code provided here: 
> https://github.com/BaseXdb/basex/tree/master/basex-api/src/main/c%23 which 
> satisfied my needs very nicely. However, since I have not written this code 
> myself, it is subject to expensive and time consuming pre-shipping legal 
> audits where it is checked that the code does not contain references to other 
> public domain code.
>
> Engineers developing managed code today expect APIs to be shipped as Nuget 
> packages. This has the advantages that it is extremely easy to uptake, you 
> can regard it as a black box (but get the source if you need to), and it 
> supports dependencies (none, in your case) and you can go back and use 
> previously shipped versions (which is important in your case, since you have 
> just changed the authentication scheme I believe). Could  you consider 
> offering the API as both Nugets and source on Github?
>
>
> Best Regards
>
> Peter Villadsen
> Principal Architect
> Microsoft Business Applications Group


Re: [basex-talk] Nugets?

2018-06-08 Thread Michael Seiferle
Hi Radim, hi Dirk, hi Peter,

in my opinion  offering nuget packages might at least be worth investigating, 
if we were able to automate their creation I sure don’t have any objections! 

After (briefly) reading the documentation at 
https://docs.microsoft.com/en-us/nuget/what-is-nuget 
 I think shipping a 
precompiled version of our c# client (including version information, license 
information etc.)
would already help Peter, Radim and their teams in using our client, right?

If there is mutual interest we could move the discussion to GitHub, I’d be 
grateful if s/o with more .net platform expertise was willing to join the 
actual process or at least provide some pointers in the right direction :-)

Best from Konstanz

Michael



> Am 08.06.2018 um 15:37 schrieb  
> :
> 
> Hello,
> 
> it would be nice to have BaseX as a Nuget package, but I can live without 
> that. It's quite easy to integrate it as-is.
> Regads,
> 
> Radim Havlicek
> C# developer
> 
> -- Původní e-mail --
> Od: Kirsten, Dirk 
> Komu: Peter Villadsen 
> Datum: 8. 6. 2018 12:45:53
> Předmět: Re: [basex-talk] Nugets?
> 
> Hello Peter,
> 
> just my thoughts, and Christian for sure will answer you more politely, but I 
> am quite confused by your email. First of, I (and I am sure many others…) 
> have never heard of Nuget before and saying “engineers expect that” is 
> certainly wrong. It might be true for the C# community, but there are other 
> engineers out there… 
> 
> And given that C# is not a focus of BaseX, but instead only provides a client 
> for your convenience I am not surprised the BaseX team does not support that.
> 
> Also, I have a hard time believing the trivial 302 lines of code of the C# 
> client are that expensive and time consuming to check. Also, the Microsoft 
> internal pre-shipping legal audits seem to be neither the fault nor the 
> responsibility of BaseX. Hey, BaseX is even under the most liberal open 
> source licence, something which can not be said about many Microsoft products 
> (although I appreciate the improvements Microsoft have done in their actions 
> and think regarding open source).
> 
> Given that BaseX is an open source product you are more than welcome to 
> contribute these nuget packages. It is even super-easy, because the BaseX 
> repository is hosted on this Microsoft webplatform GitHub.
> 
> Best regards
> Dirk
> 
> 
> Senacor Technologies Aktiengesellschaft - Sitz: Eschborn - Amtsgericht 
> Frankfurt am Main - Reg.-Nr.: HRB 105546
> Vorstand: Matthias Tomann, Marcus Purzer - Aufsichtsratsvorsitzender: Daniel 
> Grözinger
> 
> On 7. Jun 2018, at 18:55, Peter Villadsen  > wrote:
> 
>  
> Hello,
> I am building a system that relies on a Basex backend, and for that I have 
> chosen to use the TCP protocol. My system is built in managed code, so I went 
> ahead and copied the code provided here: 
> https://github.com/BaseXdb/basex/tree/master/basex-api/src/main/c%23 
>  which 
> satisfied my needs very nicely. However, since I have not written this code 
> myself, it is subject to expensive and time consuming pre-shipping legal 
> audits where it is checked that the code does not contain references to other 
> public domain code. 
>  
> Engineers developing managed code today expect APIs to be shipped as Nuget 
> packages. This has the advantages that it is extremely easy to uptake, you 
> can regard it as a black box (but get the source if you need to), and it 
> supports dependencies (none, in your case) and you can go back and use 
> previously shipped versions (which is important in your case, since you have 
> just changed the authentication scheme I believe). Could  you consider 
> offering the API as both Nugets and source on Github?
>  
>  
> Best Regards
>  
> Peter Villadsen
> Principal Architect
> Microsoft Business Applications Group
> 



Re: [basex-talk] Nugets?

2018-06-08 Thread radim-havlicek

Hello,




it would be nice to have BaseX as a Nuget package, but I can live without 
that. It's quite easy to integrate it as-is.

Regads,




Radim Havlicek

C# developer


-- Původní e-mail --
Od: Kirsten, Dirk 
Komu: Peter Villadsen 
Datum: 8. 6. 2018 12:45:53
Předmět: Re: [basex-talk] Nugets?
"
Hello Peter,



just my thoughts, and Christian for sure will answer you more politely, but
I am quite confused by your email. First of, I (and I am sure many others…)
have never heard of Nuget before and saying “engineers expect that” is
certainly wrong. It might be true for the C# community, but there are other
engineers out there… 




And given that C# is not a focus of BaseX, but instead only provides a
client for your convenience I am not surprised the BaseX team does not
support that.




Also, I have a hard time believing the trivial 302 lines of code of the C#
client are that expensive and time consuming to check. Also, the Microsoft
internal pre-shipping legal audits seem to be neither the fault nor the 
responsibility of BaseX. Hey, BaseX is even under the most liberal open
source licence, something which can not be said about many Microsoft
products (although I appreciate the improvements Microsoft have done in 
their actions and think regarding open source).




Given that BaseX is an open source product you are more than welcome to 
contribute these nuget packages. It is even super-easy, because the BaseX 
repository is hosted on this Microsoft webplatform GitHub.




Best regards

Dirk


"


Senacor Technologies Aktiengesellschaft - Sitz: Eschborn - Amtsgericht 
Frankfurt am Main - Reg.-Nr.: HRB 105546
Vorstand: Matthias Tomann, Marcus Purzer - Aufsichtsratsvorsitzender: Daniel
Grözinger
On 7. Jun 2018, at 18:55, Peter Villadsen mailto:peter.villad...@microsoft.com)> wrote:




 

Hello,

I am building a system that relies on a Basex backend, and for that I have
chosen to use the TCP protocol. My system is built in managed code, so I 
went ahead and copied the code provided here: https://github.com/BaseXdb/
basex/tree/master/basex-api/src/main/c%23
(https://github.com/BaseXdb/basex/tree/master/basex-api/src/main/c) which
satisfied my needs very nicely. However, since I have not written this code
myself, it is subject to expensive and time consuming pre-shipping legal 
audits where it is checked that the code does not contain references to 
other public domain code. 

 

Engineers developing managed code today expect APIs to be shipped as Nuget
packages. This has the advantages that it is extremely easy to uptake, you
can regard it as a black box (but get the source if you need to), and it 
supports dependencies (none, in your case) and you can go back and use
previously shipped versions (which is important in your case, since you have
just changed the authentication scheme I believe). Could  you consider
offering the API as both Nugets and source on Github?

 

 

Best Regards

 

Peter Villadsen

Principal Architect

Microsoft Business Applications Group


"



"

Re: [basex-talk] Nugets?

2018-06-08 Thread Kirsten, Dirk
Hello Peter,

just my thoughts, and Christian for sure will answer you more politely, but I 
am quite confused by your email. First of, I (and I am sure many others…) have 
never heard of Nuget before and saying “engineers expect that” is certainly 
wrong. It might be true for the C# community, but there are other engineers out 
there…

And given that C# is not a focus of BaseX, but instead only provides a client 
for your convenience I am not surprised the BaseX team does not support that.

Also, I have a hard time believing the trivial 302 lines of code of the C# 
client are that expensive and time consuming to check. Also, the Microsoft 
internal pre-shipping legal audits seem to be neither the fault nor the 
responsibility of BaseX. Hey, BaseX is even under the most liberal open source 
licence, something which can not be said about many Microsoft products 
(although I appreciate the improvements Microsoft have done in their actions 
and think regarding open source).

Given that BaseX is an open source product you are more than welcome to 
contribute these nuget packages. It is even super-easy, because the BaseX 
repository is hosted on this Microsoft webplatform GitHub.

Best regards
Dirk


Senacor Technologies Aktiengesellschaft - Sitz: Eschborn - Amtsgericht 
Frankfurt am Main - Reg.-Nr.: HRB 105546
Vorstand: Matthias Tomann, Marcus Purzer - Aufsichtsratsvorsitzender: Daniel 
Grözinger

On 7. Jun 2018, at 18:55, Peter Villadsen 
mailto:peter.villad...@microsoft.com>> wrote:




Hello,
I am building a system that relies on a Basex backend, and for that I have 
chosen to use the TCP protocol. My system is built in managed code, so I went 
ahead and copied the code provided here: 
https://github.com/BaseXdb/basex/tree/master/basex-api/src/main/c%23
 which satisfied my needs very nicely. However, since I have not written this 
code myself, it is subject to expensive and time consuming pre-shipping legal 
audits where it is checked that the code does not contain references to other 
public domain code.

Engineers developing managed code today expect APIs to be shipped as Nuget 
packages. This has the advantages that it is extremely easy to uptake, you can 
regard it as a black box (but get the source if you need to), and it supports 
dependencies (none, in your case) and you can go back and use previously 
shipped versions (which is important in your case, since you have just changed 
the authentication scheme I believe). Could  you consider offering the API as 
both Nugets and source on Github?


Best Regards

Peter Villadsen
Principal Architect
Microsoft Business Applications Group



Re: [basex-talk] EXECUTE syntax

2018-06-08 Thread Christian Grün
Hi Ben,

If you want to execute XQuery expressions, the XQUERY should do the job.

I agree that the error output is somewhat confusing. This is just a
guess, but maybe it indicates that there is still a little bug in the
R client? Did you compare the behavior with any other of our clients?

Cheers,
Christian


On Fri, Jun 8, 2018 at 10:15 AM Ben Engbers  wrote:
>
> Hi,
>
> I want to use my R-client to insert csv in a database.
>
> These lines works:
>
> csv_add_run <- 'RUN "./DataScience/RBaseX/CSVexample.xq"'
> Session$command(csv_add_run)
>
> When I take the content from CSVexample.xq and incorporate that into a
> EXECUTE command, I get this:
>
> csv_add_exe <- 'EXECUTE "let $root :=
> '/home/bengbers/DataScience/RBaseX/Examples/Parse/;)'; for $path in
> file:children($root)[ends-with(., '.csv')] return db:add('CSV_test',
> $path, 'CSV_API', map { 'parser': 'csv', 'csvparser': map { 'header':
> 'yes', 'separator': ';' }) "'
>
> Session$command(csv_add_exe)
>
> Stopped at , 1/9:
> Unknown command: 'EXECUTE. Did you mean 'EXECUTE'?
>
>
> My question is how to define the input for the EXECUTE-command?
>
> Cheers,
> Ben
>


Re: [basex-talk] Long queries on big data timing out.

2018-06-08 Thread Christian Grün
Dear Peter,

1. and 2. If you are working with the client/server architecture of
BaseX, you can adjust the default timeout of 30 seconds by assigning
another number of seconds to the TIMEOUT option [1]. This can e.g. be
done by editing the .basex configuration file (please find more
information in the top of the referenced Wiki document).
3. There is a CACHETIMEOUT option for caching the results of
jobs:eval; see [2] for more details.
4. The jobs:list-details function will also list finalized jobs with
enabled 'cache' option:

  http://docs.basex.org/wiki/Options#TIMEOUT
[2] http://docs.basex.org/wiki/Jobs_Module#jobs:eval


> Hello,
>
> We have some complicated queries that are submitted to a database that is 
> really, really big. The system will time out, just bringing back a message 
> saying "Interrupted".
>
> 1.  I know that you can provide a timeout parameter when using jobs:eval etc 
> for batch jobs, but is there a setting that we can tweak to set the default 
> for interactive (i.e. non jobs:eval) queries?
> 2.  What is the default value for the timeout value?
> 3.  How long will the server hang on to results from jobs:eval()? I think I 
> remember reading that this is configurable, but how? Is it per job or 
> globally for the server?
> 4.  Can you consider adding an API that tells how long the job has been 
> running?


[basex-talk] EXECUTE syntax

2018-06-08 Thread Ben Engbers
Hi,

I want to use my R-client to insert csv in a database.

These lines works:

csv_add_run <- 'RUN "./DataScience/RBaseX/CSVexample.xq"'
Session$command(csv_add_run)

When I take the content from CSVexample.xq and incorporate that into a
EXECUTE command, I get this:

csv_add_exe <- 'EXECUTE "let $root :=
'/home/bengbers/DataScience/RBaseX/Examples/Parse/;)'; for $path in
file:children($root)[ends-with(., '.csv')] return db:add('CSV_test',
$path, 'CSV_API', map { 'parser': 'csv', 'csvparser': map { 'header':
'yes', 'separator': ';' }) "'

Session$command(csv_add_exe)

Stopped at , 1/9:
Unknown command: 'EXECUTE. Did you mean 'EXECUTE'?


My question is how to define the input for the EXECUTE-command?

Cheers,
Ben