Fabian Haupt · Aug 18, 2017 go to post

You can use netstat to identify which process is using a port (and then kill it). Sometime we're seeing a process hang around and not free the port. This has happenend with the .net gateway before. 

Fabian Haupt · Aug 11, 2017 go to post

As to your second part, $ZTS is the most precise time you have. On unix:

The $ZTIMESTAMP time value is a decimal numeric value that counts the time in seconds and fractions thereof. The number of digits in the fractional seconds may vary from zero to nine, depending on the precision of your computer’s time-of-day clock. On Windows systems the fractional precision is three decimal digits; on UNIX® systems it is six decimal digits. $ZTIMESTAMP suppresses trailing zeroes or a trailing decimal point in this fractional portion.

(http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=RCOS_vztimestamp#RCOS_C129648)

Fabian Haupt · Aug 11, 2017 go to post

Hi,

no. There aren't any library methods for that. It should be simple enough to implement a fairly generic quicksort you can re-use.

cheers, Fab

Fabian Haupt · Jul 17, 2017 go to post

That seems to be a very specific question. What is the actual problem you're trying to solve? (on a sidenote, check out $QUERY, which allows you to do what you are asking for)

Fabian Haupt · Jul 10, 2017 go to post

Wouldn't it be easier and more direct to have your react app talk to a REST API created in Cache? I wonder how the performance compares between having to go through server side nodejs instead of going through a REST API directly? Do you have any experience comparing the two?

Fabian Haupt · Jul 5, 2017 go to post

While you are right that all the code is always going to be there in server/explorer view, the 'Project Explorer' view only shows the classes that have been added to the project?

Fabian Haupt · Jun 21, 2017 go to post

No. Unfortunately that's not something that's implemented. You'll have to extend the toolbar and implement that on your own.

-Fab

Fabian Haupt · Jun 15, 2017 go to post

I still don't get the benefit of exposing terminal functionality through a webpage. Maybe I'm getting old, but all I can see are security nightmares with this ;) What can one do with the web terminal that one can't do with a ssh session to the server?

Fabian Haupt · Jun 13, 2017 go to post

Why do you need to change that? Semantically identical xml should not make a difference anywhere?

Fabian Haupt · Jun 12, 2017 go to post

Hi:

You are missing the CSP shell.

SAMPLES>d $SYSTEM.CSP.Shell()
CSP Shell

Command shell for debugging CSP pages. It looks and acts like a Cache programmer prompt, but you can use the GET or HEAD command to fetch a CSP page. You can set breakpoints, step into the code etc. You may pass query parameters to the page as well, eg.:CSP>>> GET /csp/samples/request.csp?A=1&B=2

The output you see is what would be sent to the browser, including any HTTP headers. You can also interact with the session, request and response objects via the special variables %session, %request and %response.

CSP:SAMPLES>>> get /csp/samples/menu.csp
HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
Set-Cookie: CSPSESSIONID-UP-csp-samples-=41056            41056; path=/csp/samples/;  httpOnly;
Cache-Control: no-cache
Date: Mon, 12 Jun 2017 12:34:00 GMT
Expires: Thu, 29 Oct 1998 17:04:19 GMT
Pragma: no-cache


[....]

This can then be used with the command line debugger (zbreak/break) to step through your csp/rest code.

Another useful set of toosl: syntax coloring for isclog/csplog for sublime text: https://github.com/seanklingensmith/LogColors

Fabian Haupt · May 31, 2017 go to post

Since you can emulate any type of request with JMeter, yes. It is 'compatible'. For anything other than standard http/soap/rest requests you might have to write your own request module, but other than that you can use it out of the box.

-Fab

Fabian Haupt · May 30, 2017 go to post

Hard to say anything generic here, but if you are transporting sensitive data (or really any time, actually), you should use both authentication and encryption (ssl on the transport layer) -Fab

Fabian Haupt · May 26, 2017 go to post

Why don't you just set the initialexpression to the current date? That's the easiest way in this case.

Fabian Haupt · May 25, 2017 go to post

You can do: s ret={} s ret.propa={} s ret.propa.subprop="something"

Ok! I have just one more question ... s ret = {} s ret.IdClient= "123" How can i do something like that ?: s ret.client.name = "peter" When i try ...

Fabian Haupt · May 25, 2017 go to post

You could create a temporary object and just put in the properties you want:

USER>s ret={}

USER>s ret.idDate="something"

USER>s ret.Datetime="something2"

USER>s ret.time="something3"

USER>w ret.%ToJSON()
{"idDate":"something","Datetime":"something2","time":"something3"}
USER>
Fabian Haupt · May 22, 2017 go to post

Part of testing with populated data is performance testing. If your data populating utilities can't give a high enough throughput, you can't really test your application under load.
And generating meaningfully big sets of data requires a lot of time. So for example, with Caché populate utils it takes 7.891 seconds on my machine to create 1M pairs of ,

The same takes 0.39s on my machine with a rudimentary go implementation. I very much disagree that performance doesn't matter.

In terms of an online service, you could do something like:

curl -H "Content-Type: application/json" -X POST --data '{"count":1000000,"headers":false,"fields":[{"name":"Name","type":"name"},{"name":"Age","type":"digits"}]}' http://data.panadadata.com -o data.json

(disclaimer, I run that service)

Fabian Haupt · May 18, 2017 go to post

I am not aware of any WS client implementation in COS. Keep in mind that WS would mean a continuous connection, which doesn't really fit with the Operations model for Ensemble.

Fabian Haupt · May 17, 2017 go to post

Not sure what you are asking? Since you implement the handling method for REST services, you can handle any format? -Fab