Now with videos :) It always gets better :)
- Log in to post comments
Now with videos :) It always gets better :)
The datamodel in COS is such that you have multi-modal access to your data in different ways. Having the ability to access your data via objects (class definitions), SQL (tables), and raw globals is what makes it so powerful. Ultimately the data is always stored in globals. The mapping for the other modes of access are done via class definitions. Class definitions are also transparently mapped to SQL tables. So any time you create a class, a corresponding table is being created and vice-versa. The SQL-concept of "views" is separate from all of this and sits on top. @Robert already pointed out the documentation for storage mapping which actually allows you to customize the relationship between the global structure and a class(/table). This is usually not recommended unless you have legacy data you need to access. The default storage strategy does a very good job to store data effectively.
Note: Just creating a class will not create the global structure just yet, it will only be created once you start putting data in.
Note2: Indices are just additional globals that get added to your class storage.
Note3: If you are having trouble with your indices, it might be a good start to open a WRC issue. They have very good people to help you sort through any issues quickly.
usually that should go into your gateway directory.
Hi,
please make sure to never pass unchecked client supplied parameters to a query, that is a huge security risk. For general documentation on how to use filters with tablepane, have a look at : https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=GZCP_tables#GZCP_table_filter
If you have an instance with the SAMPLES namespace, have a look at ZENTest.TableTest.cls for an example on how to do filtering.
Best, Fabian
There are quite a few different possible causes for this. A 500 error generally indicates a problem of IIS getting any data from the backend. This could be a permissions issue, or a network issue (among others). Without more information it's hard to tell. If you want to debug yourself, you should start by looking at the CSP Gateway logs (CSP.log), possibly increase the gateway log level (in the gateway management page). This will tell you where to go next.
Of you need a quicker solution it would probably help to contact the WRC (https://www.intersystems.com/support-learning/support/), they debug this kind of thing all the time and will be able to sort you out quickly.
If you're hitting the 511 encoded character limit for a global reference, generally that means you should revisit your data design. What are you trying to do that you hit that limit?
Note: the system startup will rename the password.txt file to password.txt.done once it has applied it. So if you start a new container without reseting the filename, you won't get the password set to what you want, but it will fall back to the default password and asking for you to change it when you log in.
What's the OS and docker version you are running this on? There are known issues with running docker on windows, as well as known problems with older versions of docker on redhat/centos.
Yes, you can. See https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=GCAS_LDAP for details on what you need to setup.
Hi Thomas,
sorry for the long wait here, I just noticed this. From what I am reading about the OData specification, it is just a standard further clarifying on how to further structure your REST api beyond the general REST guidelines. (https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=odata)
As such your starting point to implement this would be the Creating REST Services.
While it has been discussed a couple of times, I'm not aware of anyone having done this already.
Best, Fab
Aside from what Robert pointed out, please keep in mind that this example was for a (now) ancient version and a couple of things have changed. We're currently working on a revised version of this article that includes the necessary updates to get it to run on a current setup.
It was great fun :) https://github.com/kazamatzuri/AoC
COS has some nice features, but most of the time it is lacking basic functionality that would make us competitive in these types of contests.
On top of that, there are no libraries, so you always have to code everything from scratch. Which has a certain appeal to it, but will not not get us close to the leaderboard. The closest I got was place 137 on day22, part2.
Given that mumps/COS only supports the most basic constructs and lacks any modern influence of programming tools, there isn't all that much we can do about that ;)
It was! Good Game everybody & Merry Xmas!
The configuration structure for apache is actually much more dependent on which distribution you are using than the OS. There are pretty huge differences in the way Ubuntu/SuSE/RH/Centos are setting things up. Even down to some of them calling the system service apache vs apache2 vs httpd. There are also differences with some of them using systemd vs still the old sysvinit.
The good news is, you can always re-arrange your apache config to your liking.
Please also note, setting
CSP On
SetHandler csp-handler-sa
Is redundant. CSP On on a path already maps all filetypes to be handled by the gateway. Adding the sethandler doesn't add anything. If you are omitting CSP On, but use the csp-handler-sa as detailed above, the gateway will not serve static files. Either you will need to add them (ok for low traffic sites), or you will need to configure apache to serve the static files directly (if your apache is not on the same machine as your instance you will need to copy the static files or mount a network drive)
Neat :) I also just recently implemented it as part of the adventofcode puzzles (2015,day18) https://adventofcode.com/2015/day/18 My code's here: https://github.com/kazamatzuri/AoC/blob/master/AoC/y2015/Day18.cls
You still have lot of coding to do ;)
grats :) I gave up for the night and finished late today.
15 19:11:21 1809 0 19:23:16 1624 0
worst time for me so far :)
ah! I hadn't found the json api, that's neat. Thanks for pointing me towards that!
I would also be very cautious of trying to make judgements based on the way people implemented things. For some of the puzzles there are very clear 'best solutions' and one would expect people with the necessary training in data structures/algorithms will simple go with a similar implementation because 'that's the way you solve a problem like that'. I'm sure once we get to harder problems that might change, but for these beginning problems there isn't a good way to fix this.
And for the record, I'm quite certain I'm not eligible for the price anyways ;)
Bert, I'd be curious where you get the data points from, I haven't been able to see other people's times. Also keep in mind, sometimes the way you do a solution is a maker/breaker on how quickly you get the second part. Day10 was another great example for that. I don't think you're accusing me of this since it took me more than 16 minutes to get from part1 to part2 on day7. But just in case you're doubting, here's my code: https://github.com/kazamatzuri/AoC/tree/master/AoC/User And yes, I did day 2/3 in python ...
ok, joined.
Please note, if you are running into permissions issues, that seems to be a windows only problem and can be worked around by creating a derivative image like this:
FROM intersystems/iris:2018.2.0.490.0
RUN adduser irisusr root && adduser irisusr irisusr
And use that.
The errors you might expect look like this:
Sign-on inhibited.
See messages.log for details.
[ERROR] Execvp failure. Executable /usr/irissys/bin//./irisdb. errno=13, file uid=0 gid=1000
perms=r-xr-x---, user uid=1000 gid=0
Call InterSystems Technical Support. : Permission denied
[ERROR] Possible causes:
[ERROR] - InterSystems IRIS was not installed successfully
[ERROR] - Invalid InterSystems IRIS instance name
[ERROR] - Insufficient privilege to start InterSystems IRIS (proc not in InterSystems IRIS group?)
[FATAL] Error starting InterSystems IRIS
Alternatively you could add those statements to the before parameter, but that seems less elegant.
Thanks, Fab
Please make very sure when you implement it that way, to sanitize your inputs. Otherwise you very easily create a way for attackers to download all files your instance has access to.
Any documentation on how to use/setup wireshark will do. It is a tool outside of Ensemble. So these are a good start: https://www.wireshark.org/#learnWS
The one thing you want to look out for is that you are quite possibly going to be capturing PHI, so you should keep that in mind before sharing the traces you captured.
Best, Fab
What is your question? Are you running these methods in parallel? And why are you mixing object access and embedded sql in the same method? Your embedded sql is going to update all rows, is that intentional?
Best, Fab
creating a new Project and adding the classes/routines you want to export
USER>s p=##class(%Studio.Project).%New()
USER>s rc=p.AddItem("TestPackage.Test.cls")
Of course this could be done it studio as well....
USER>s sc=p.DeployToGbl("^depl","k",1)
TestPackage.Test.cls
USER>d $System.OBJ.Export("depl.gbl","/home/kazamatzuri/deplgbl.xml")
Exporting to XML started on 01/13/2010 08:48:30
Exporting global: ^depl
Export finished successfully.
USER>w
p=
On the customers system .. (I just used another namespace)
USER>zn "TEST"
TEST>d $System.OBJ.Load("/home/kazamatzuri/deplgbl.xml")
Load started on 01/13/2010 08:48:58
Loading file /home/kazamatzuri/deplgbl.xml as xml
Imported global: ^depl
Load finished successfully.
TEST>s sc=##class(%Studio.Project).InstallFromGbl("^depl")
TestPackage.Test.cls
TEST>
Every instance has it's own apache installed. And unless you have manually forced it to not start, you will have it running. The default port for it is 57772.