go to post Dmitry Maslennikov · Apr 18, 2016 Caché has very useful feature names as Mapping, in your case you can look at Global MappingsHow it can help now. With a mapping you can split your globals which stores your tables.For example You have table Sample.Person, with globals ^Sample.PersonD for Data and ^Sample.PersonI for indices.then you may create new databases like PERSONDATA1, PERSONDATA2 and PERSONINDEXAnd create mappings likes on pictureIn this case we send first 10000 rows to database PERSONDATA1, and all next data to PERSONDATA2. When you decide to split it again, just create new database, and edit mappings.And you can place every database in any place as you want.But in future releases we expect to see new feature: Distributed SQL
go to post Dmitry Maslennikov · Apr 15, 2016 You can't change how project looks like in Studio, but with SourceControl class, you can organize your files for your source control as you want.
go to post Dmitry Maslennikov · Apr 3, 2016 In any way it is possible to check how this Global Buffer uses, with very useful tool ^GLOBUFF. And if you see that about 80-90% of buffers have already used, it means that you should increase Global Buffer size. %SYS>d ^GLOBUFF Find which globals are using the most buffers. Display the top <25>: Total buffers: 32768 Buffers in use: 2163 PPG buffers: 23 (1.063%) Item Global Database Percentage (Count) 1 rOBJ CACHESYS 37.540 (812) 2 rOBJ CACHELIB 27.323 (591) 3 oddCOM CACHELIB 9.154 (198) 4 oddDEF CACHELIB 7.258 (157) 5 %qCacheMsg CACHELIB 4.438 (96) 6 oddCOM CACHESYS 3.375 (73) 7 SYS CACHESYS 2.681 (58) 8 ROUTINE CACHESYS 0.693 (15) 9 ISC.Monitor.AlertD CACHESYS 0.509 (11)
go to post Dmitry Maslennikov · Apr 1, 2016 In troubleshooting with license, very useful tool is $system.License You may check validity any key for current instance. s sc=$system.License.IsValidKey("C:\InterSystems\Ensemble14\mgr\cache.key",.restart,.reason) if 'sc { d $system.OBJ.DisplayError(sc) } else { w sc } command to see all available functions Do $System.License.Help()
go to post Dmitry Maslennikov · Apr 1, 2016 And with latest announce from MS, such thing will be possible to do for Skype, with Skype Bots.
go to post Dmitry Maslennikov · Mar 28, 2016 LOG^%ETN it is very useful but in most cases overkill. And may take several seconds to gather full stack.and maybe used for any logging, but should have filled $zerrorsome time for logging I use such code.set $ze="test",t=$$LOG^%ETN,$ze=""
go to post Dmitry Maslennikov · Mar 28, 2016 You can use class %Routine set rtn=##class(%Routine).%OpenId("hello.mac") write rtn.Size 88
go to post Dmitry Maslennikov · Mar 24, 2016 Thanks for the reply Luca, of course, I know that I can write my own script for it, and your ccontainermain it is a very good solution. And it works quite well, and with some my modifications, more informative now. And I hope that I can help to improve this tool.Now I am goid to write an article (in russian yet), about Docker+Caché+HAProxy, not as a micro-service, but with ECP, my containers will work as ECP-Applications with registration on HAProxy. And on github I have some questions which I now faced, when worked on it.
go to post Dmitry Maslennikov · Mar 24, 2016 I use such code in one of my projects ClassMethod Test() { set address="One Memorial Drive, Cambridge, MA 02142, USA" do ..GetCoords(address, .latitude, .longitude, .partialMatch) zw latitude, longitude, partialMatch } ClassMethod GetCoords(Address As %String, Output Latitute As %Float = "", Output Longitude As %Float = "", Output PartialMatch As %Boolean) As %Status { set params("address")=Address set sc=..CallGoogleAPI("/maps/api/geocode/json", .params, .data) if data.status="OK" { set result=data.results.$get(0) set PartialMatch = +result."partial_match" set Latitute = result.geometry.location.lat set Longitude = result.geometry.location.lng } quit $$$OK } ClassMethod CallGoogleAPI(Url As %String, ByRef Params, Output Data) As %Status { #;set Params("key")="your api key here" quit ..CallApi("maps.googleapis.com", 1, Url, .Params, .Data) } ClassMethod CallApi(Server As %String, Secure As %Boolean = 1, Url As %String, ByRef Params, Output Data) As %Status { set ht=##class(%Net.HttpRequest).%New() set ht.Server="maps.googleapis.com" set ht.Https=Secure set:Secure ht.SSLConfiguration=..GetSSLCertificate(Server) set param="" for { set param=$order(Params(param),1,value) quit:param="" do ht.SetParam(param, value) } set sc=ht.Get(Url) if $$$ISERR(sc) quit sc set Data={} set Data=Data.$fromJSON(ht.HttpResponse.Data) quit $$$OK } ClassMethod GetSSLCertificate(Server As %String) As %Status { new $namespace znspace "%SYS" do { quit:##class(Security.SSLConfigs).Exists(Server) set tSC=##class(Security.SSLConfigs).Create(Server) $$$ThrowOnError(tSC) } while 0 quit Server }
go to post Dmitry Maslennikov · Mar 22, 2016 Caché doesn't have Zlogin routine, if it is %-routine, it should be in CACHESYS and any others, could be placed in any database. Z-routine means that it is developed outside from InterSystems, they recommend to use such naming to prevent overwriting with system routines, present or future.
go to post Dmitry Maslennikov · Mar 18, 2016 Luca, may I ask, what exactly means InterSystems supports Docker now. I have not found anything about docker in documentation in version 2016.1. Actually I see that you already use docker with version 2015, and with 2016 I still have to use ccontainermain. It would be better if we could just use ccontrol for the same functionality as it now used ccontainermain.
go to post Dmitry Maslennikov · Mar 16, 2016 No, I've already bought Parallels. I thought that Parallels, much better in some cases then Fusion. And I don't even know how to localize this problem, because after restarting studio, it seems like everithing works well, but sometime when it happens when I edited some file, and studio locked it, then I need to kill previous Studio's job.
go to post Dmitry Maslennikov · Mar 16, 2016 John looks like you worried about your leadership in this contest, not sure that somebody could do more than you, in just one day now.
go to post Dmitry Maslennikov · Mar 16, 2016 Is anybody knows why Studio in Windows7 through Parallels which connected to server on the host, too often says that connection have been lost, and offers to restart Studio? Version used on both sides 2016.1.
go to post Dmitry Maslennikov · Mar 11, 2016 Murray thanks for your articles. But I think, should be mentioned metrics related to Write Daemon too, such as WDphase and WDQsz. Some time when our system looks works too slow, it may depends how quickly our disks can write. And I think in this case it is very usefull metrics. In my own experience I saw when in usual day our server started to work to slow in we saw that writedaemon all time was in 8 phase, and with PhyWrs we can count how many blocks were really written on a disk, and it was not so big count in that time, and so we found a problem in our storage, something related with snapshots. And when storage was reconfigured, our witedaemon continued to work as before quickly.
go to post Dmitry Maslennikov · Mar 11, 2016 How about this way, just USER>s rs=##class(%File).FileSetFunc("c:\intersystems\") USER>d rs.%Display() Name Type Size DateCreated DateModified ItemName C:\InterSystems\Deltanji D 2016-02-08 18:11:24 2016-02-08 18:21:28 Deltanji C:\InterSystems\EMS D 2013-10-22 10:10:17 2014-05-12 11:44:27 EMS C:\InterSystems\Ensemble10 D 2013-01-12 09:28:38 2015-11-06 12:25:53 Ensemble10 C:\InterSystems\Ensemble14 D 2013-10-22 10:00:14 2015-11-06 12:29:29 Ensemble14 Much simplier, end returns %SQL.ClassQueryResultSet *Func available since 2012.2
go to post Dmitry Maslennikov · Mar 11, 2016 In our project we started to use it when InterSystems suddenly moved %cspSession global from CACHETEMP to CACHE. And after that, all our chnages in %session.Data started journaling. And to prevent it, we use %ALL to map this global to CACHETEMP.