Question Timothy Leavitt · Mar 10 Reading a chunked HTTP response in chunks I'm trying to read the response to a long (indefinitely) running HTTP response with Transfer-Encoding: chunked. Ideally I'd be able to read the individual chunks from the response and do something with them as they arrive rather than needing to wait for the response to finish (because it never will) - ultimately I'm thinking to wrap these back up over a WebSocket connection which seems cleaner from an API perspective. So far it looks like my options are: #ObjectScript #InterSystems IRIS 0 1 0 130
Question Timothy Leavitt · Jan 3 Putting standard CSP login in front of a web application with a REST dispatch class Has anybody ever enabled the standard CSP login page for a web application with REST dispatch class? Any ideas how to do this? (Context: I'm using %CSP.REST with other stuff behind it, not actually a REST API.) #CSP #REST API #InterSystems IRIS 0 4 1 168
Discussion Timothy Leavitt · Oct 19, 2022 Upgrading InterSystems software Hello community! I'm working on an internal innovation effort at InterSystems considering our documentation/resources around upgrades. As part of this, I'd love to have your answers to any/all of the following questions, either via comment or (if you prefer your answers to be more private) direct message. Thanks in advance! What InterSystems products + versions are you running? ($zv is ideal.) What makes you decide to upgrade? What are your blockers to upgrading? What is your process for evaluating and planning a possible upgrade? #InterSystems IRIS #InterSystems IRIS for Health 4 12 0 288
Article Timothy Leavitt · Oct 12, 2022 1m read Loading data into InterSystems IRIS from R using RJDBC I just wrote up a quick sample to help a colleague load data into IRIS from R using RJDBC, and figured it's worth sharing here for future reference. Ultimately it was pretty simple, aside from IRIS not liking "." in column names; the workaround is to just rename the columns. Someone better at R than me could probably provide some generic approach. #Analytics #Code Snippet #JDBC #SQL #InterSystems IRIS 4 2 0 149
Question Timothy Leavitt · Aug 31, 2022 Weird file encoding issue with %CSP.BinaryStream / CSP file upload Consider the simplest possible CSP file upload/download page - you upload a file, it's saved in the database, and the file is immediately re-download via %CSP.StreamServer: #CSP #InterSystems IRIS 0 2 1 83
Question Timothy Leavitt · Jul 20, 2022 Converting POSIX to ODBC timestamp in SQL I'm getting wrapped around the axle with CAST and CONVERT and can't seem to find a way to do this (short of adding a stored procedure wrapping $zdt($zdth(posix,-2),3), which I'm refusing to do on principle, because there has to be some way to make this work). Any ideas? #SQL #Caché #InterSystems IRIS 1 4 0 112
Article Timothy Leavitt · Jun 28, 2022 2m read Unique indices and null values in InterSystems IRIS An interesting pattern around unique indices came up recently (in internal discussion re: isc.rest) and I'd like to highlight it for the community. As a motivating use case: suppose you have a class representing a tree, where each node also has a name, and we want nodes to be unique by name and parent node. We want each root node to have a unique name too. A natural implementation would be: #Indexing #SQL #Caché #InterSystems IRIS 6 8 0 612
Announcement Timothy Leavitt · Jun 27, 2022 Accelerate your IRIS full-stack application development with three new Open Exchange packages (+ a demo) Hello community, I'd like to briefly announce three new packages, available on the Open Exchange / through ZPM, that can really help accelerate modern full-stack application development on IRIS. I announced all of these in a Global Summit session last week, but you may have missed it - and I hear there's a full-stack application development contest coming up! #Angular #JSON #REST API #UI Development #InterSystems IRIS Open Exchange app 4 0 1 190
Question Timothy Leavitt · Apr 25, 2022 Serving .woff/.woff2 over CSP I have a .woff2 file I'm trying to serve over CSP. If I set:^%SYS("CSP","DefaultFileCharset")="UTF8" Then it "just works" - but I'd rather not do something so heavy-handed/instance-wide, on principle. (This is for something that will ultimately be published on the Open Exchange.) A more granular option, it seems, is described in the %CSP.StreamServer class reference: #CSP #Web Gateway #InterSystems IRIS 0 2 0 154
Question Timothy Leavitt · Apr 6, 2022 Returning an HTTP 403 from %CSP.SessionEvents:OnStartRequest Is there a way, given a %CSP.SessionEvents subclass, to simply return an HTTP 403 error status from OnStartRequest? If I return an error %Status from the method, it'll go to the error page; if I don't, it's always a 200 OK and the page continues to render. #CSP #InterSystems IRIS 0 3 0 216