Caché

Syndicate content 118 

This post is intended to guide you through the new JSON capabilities that we introduced in Caché 2016.1. JSON has emerged to a serialization format used in many places. The web started it, but nowadays it is utilized everywhere. We've got plenty to cover, so let's get started.

Last comment 11 January 2019
+ 32   1 33
6972

views

+ 32

rating

Have some free text fields in your application that you wish you could search efficiently?  Tried using some methods before but found out that they just cannot match the performance needs of your customers?  Do I have one weird trick that will solve all your problems?  Don’t you already know!?  All I do is bring great solutions to your performance pitfalls!

As usual, if you want the TL;DR (too long; didn’t read) version, skip to the end.  Just know you are hurting my feelings.

If you open up your version of Sample.Company in the SAMPLES namespace of a recent (2015.1 or later) Caché/Ensemble/HealthShare version you will see a Mission field that is pseudo-randomly generated text.  Suppose we want to search this text field.  For the purpose of this exercise, I generated about 256,246 companies – feel free to populate some on your own and follow along.  Well you might run the following query

Last comment 10 May 2019
+ 19   1 3
1225

views

+ 19

rating

This post will show you an approach to size shared memory requirements for database applications running on InterSystems data platforms including global and routine buffers, gmheap, and locksize as well as some performance tips you should consider when configuring servers and when virtualizing Caché applications. As ever when I talk about Caché I mean all the data platform (Ensemble, HealthShare, iKnow and Caché).


A list of other posts in this series is here

Last comment 22 August 2017
+ 19   3 11
5219

views

+ 19

rating

The topic of for/while loop performance in Caché ObjectScript came up in discussion recently, and I'd like to share some thoughts/best practices with the rest of the community. While this is a basic topic in itself, it's easy to overlook the performance implications of otherwise-reasonable approaches. In short, loops iterating over $ListBuild lists with $ListNext or over a local array with $Order are the fastest options.

As a motivating example, we will consider looping over the pieces of a comma-delimited string.

A natural way to write such a loop, in minimal code, is

Last comment 3 October 2016
+ 18   0 12
4375

views

+ 18

rating

 

Estimated reading time: 6 minutes
 

Hello everyone,

I was first introduced to TDD almost 9 year ago, and I immediately fell in love with it. 
Nowadays it's become very popular but, unfortunately, I see that many companies don't use it. Moreover, many developers don't even know what it is exactly or how to use it, mainly beginners.

 

 

Overview

My goal with this article is to show how to use TDD with %UnitTest. I will show my workflow and explain how to use cosFaker, one of my first projects, which I created using Caché and recently uploaded to OpenExchange.

So buckle up and let's go.

Last comment 18 April 2019
+ 17   6 1
348

views

+ 17

rating


Hello!

This article is a small overview of a tool that helps to understand classes and their structure inside the InterSystems products: from IRIS to Caché, Ensemble, HealthShare.

In short, it visualizes a class or an entire package, shows the relations between classes and provides all the possible information to developers and team leads without making them go to Studio and examine the code there.

If you are learning InterSystems products, reviewing projects a lot or just interested in something new in InterSystems Technology solutions — you are more than welcome to read the overview of ObjectScript Class Explorer!

Last comment 3 July 2018
+ 17   1 11
3153

views

+ 17

rating

Your application is deployed and everything is running fine. Great, hi-five! Then out of the blue the phone starts to ring off the hook – it’s users complaining that the application is sometimes ‘slow’. But what does that mean? Sometimes? What tools do you have and what statistics should you be looking at to find and resolve this slowness? Is your system infrastructure up to the task of the user load? What infrastructure design questions should you have asked before you went into production? How can you capacity plan for new hardware with confidence and without over-spec'ing? How can you stop the phone ringing? How could you have stopped it ringing in the first place?

Last comment 30 September 2016
+ 17   2 19
2209

views

+ 17

rating

In the last post we scheduled 24-hour collections of performance metrics using pButtons. In this post we are going to be looking at a few of the key metrics that are being collected and how they relate to the underlying system hardware. We will also start to explore the relationship between Caché (or any of the InterSystems Data Platforms) metrics and system metrics. And how you can use these metrics to understand the daily beat rate of your systems and diagnose performance problems.

Last comment 24 March 2018
+ 16   1 16
2070

views

+ 16

rating

The Art of Mapping Globals to Classes 1 of 3

Looking to breathe new life into an old MUMPS application?  Follow these steps to map your existing globals to classes and expose all that beautiful data to Objects and SQL.

By following the simple steps in this article and the next two you will be able to map all but the craziest globals to Caché classes.  For the crazy ones I will put up a zip file of different mappings I have collected over the years.  This is NOT for new data; if you don’t already have existing global please just use the default storage.

If you still can’t make heads or tails of your globals, send some example data to Support@InterSystems.com and we will be happy to help you figure it out.

Steps for mapping a global to a class

Last comment 1 February 2019
+ 16   1 15
2421

views

+ 16

rating

This is a  rather personal view on the history before Caché.
It is in no sense meant to compete with the excellent books from Mike Kadow  discussed in an earlier article.
We have different history and so this is meant to create a different prospective of the past.

The whole story started in 1966 at MGH (Mass.General Hospital) on a PDP-7 Ser.#103
with 8K of memory (18-bit words) [ today = 18K byte ]  as a spare system

Last comment 12 September 2017
+ 16   0 11
880

views

+ 16

rating

Cache rendering of an old classic:

 s enc="dQZ4nK1VzU7DMAy+I/EEveTcCWicpt3UU2VABTRA/AhBeYW+As/U7vE4VNhxypJuoAlhS1vixJ//"_
 "06TNsy5p4TppzRKTNqtMXuXQjSSrdEPSEmmtK1uZssp1l0Z3nHJ9fEQroJURlQLHNE35WPYWx7N3"_
 "YpJYkeRe4mQzkEKuGDwjkHTBP+9JW4oUsB+Y2CVj2JuttlkFAbhbfdIuRU/jhvZkryejtNok7UpO"_
 "Moww3JbdcPifW8APosVi4Q9Otwck5LMojmKOojNnDUIXe0XEvnVrdaEeiF95H8BYgXG38o6i0Vpg"_
 "lhSO00TVkN6VelRPaq1q9ehucnizrGopJ5TY+8zHzOBSPih8jjnLQWbyKSYy25Cpe+JXMTdM2dZS"_
 "cbAu3YP42EQw4GOq1a16VjfEtWoCGHJdS5dAjkPoYgRTCsw8DG4MaSAw2G++KfA6So0v9xTJVmHD"_
 "0UjTAeD4TQ7oRr1EMMbXm2N6IyO1AxtDLS2NCBqHiCIYX+9hLxGGtCxk2Me0D8Q5eknNcafW0j47"_
 "SiBNqVcYTSHEM3ASTfwvogDB4qFKc9G+YTzYg4yfqYyfqd2M6O6KqnOh3vgaK1SHIP8403/IitX/"_
 "khVb/JYVkBdCh4/53gmCHyZoh3kApk/BrNdcOsBMDzb/hCPEI+zfA/fnvjTWnn8BUo3vtEE=" 
 s enc=$SYSTEM.Util.Decompress($SYSTEM.Encryption.Base64Decode(enc))
 w enc

Share more ANSI art!

Merry XMas and a Happy New Year!

Last comment 31 December 2016
+ 16   0 9
627

views

+ 16

rating

So, one day you're working away at WidgetsDirect, the leading supplier of widget and widget accessories, when your boss asks you to develop the new customer facing portal to allow the client base to access the next generation of Widgets..... and he wants you to use Angular 1.x to read into the department's Caché server.   

There's only one problem:  You've never used Angular, and don't know how to make it talk to Caché.

This guide is going to walk through the process of setting up a full Angular stack which communicates with a Caché backend using JSON over REST.  


This is a parent page for the multipart series on creating a Material-Angular1x-REST-JSON-Caché application.  The current list of articles is

Last comment 13 December 2018
+ 16   3 10
3282

views

+ 16

rating

Index to Articles

Hi All

I am an avid user of ZEN for over 10 years now and it works for me.
But it seems that Intersystems are no longer actively developing it (or ZEN Mojo), the only published reference to this  is here

As an aside, Intersystems makes fine products (I have been using the technology for 35 years) and has great support BUT they are not good at being open with their product road map/retirement plans.  This is very embarrassing  to me when talking with my end user clients.

Last comment 11 May 2018
+ 16   0 8
1050

views

+ 16

rating

Greetings, InterSystems community!

I am pleased to announce that the web terminal project, Caché WebTerminal version 4 gets its release! After long period of enhancing this web application from 2013, it came to the version 4, which features major stability and security improvements, intelligent autocomplete and syntax highlighting, convenient SQL mode and a lot of other useful features.

The goal of this article is to spread the knowledge about this project over the InterSystems community.

Last comment 26 February 2019
+ 15   2 8
1743

views

+ 15

rating

As a developer, you have probably spent at least some time writing repetetive code. You may have even found yourself wishing you could generate the code programmatically. If this sounds familiar, this article is for you!

We'll start with an example. Note: the following examples use the %DynamicObject interface, which requires Caché 2016.2 or later. If you are unfamiliar with this class, check out the documentation here: Using JSON in Caché. It's really cool!

Example

You have a %Persistent class that you use to store data. Now, suppose that you are ingesting some data in JSON format, using the %DynamicObject interface. How do you map the %DynamicObject structure to your class? One solution is to simply write code to copy the values over directly

Last comment 22 November 2016
+ 15   0 7
1080

views

+ 15

rating

When using Studio, ODBC or a terminal connection to Caché or Ensemble, you may have wondered how to secure the connection. One option is to add TLS (aka SSL) to your connection. The Caché client applications - TELNET, ODBC and Studio - all understand how to add TLS to the connection. They just need to be configured to do it.

Configuring these clients is easier in 2015.1 and later. I'm going to be discussing this new method. If you're already using the old method, it will continue to work, but I would recommend you consider switching to the new one

+ 15   0 5
0

comments

2112

views

+ 15

rating

Index to Articles

Hi All

It's been 6 weeks since my original article sad
- - - - -but I have been busy on this project smiley

I have been looking at/thinking about a replacement for ZEN for around 12 months but only really started in depth 4 months ago.
Also been in IT for long enough that I can "get a feel" for a product/technology and make decisions accordingly without going into great detail. 
Any new technology has a learning curve and I don't want to waste time and effort on something that won't fly. 
And, as always, I am looking to minimise the learning curve as I want to concentrate on delivering business benefit. 

Last comment 11 April 2019
+ 15   0 4
452

views

+ 15

rating

Date range queries going too slow for you?  SQL Performance got you down?  I have one weird trick that might just help you out! (SQL Developers hate this!)*

If you have a class that records timestamps when the data is added, then that data will be in sequence with your IDKEY values - that is, TimeStamp< TimeStampif and only if ID1 < IDfor all IDs and TimeStamp values in table - then you can use this knowledge to increase performance for queries against TimeStamp ranges.  Consider the following table

Last comment 4 June 2018
+ 14   1 9
5042

views

+ 14

rating

So, one day you're working away at WidgetsDirect, the leading supplier of widget and widget accessories, when your boss asks you to develop the new customer facing portal to allow the client base to access the next generation of Widgets..... and he wants you to use Angular 1.x to read into the department's Caché server.   

There's only one problem:  You've never used Angular, and don't know how to make it talk to Caché.

This guide is going to walk through the process of setting up a full Angular stack which communicates with a Caché backend using JSON over REST.  

Part 1 - Setup

To start fresh, we will create a Namespace for our new application - WIDGETDIRECT, and set this up with Code and Data databases, and appropriate Security roles.  

Our next step is to set up 2 Applications to serve web content; one for the Angular web content and one to serve the REST conten

Last comment 25 April 2019
+ 14   1 7
2444

views

+ 14

rating

This 'feature' have been around for a long time, but I don't see any articles on it so I thought I would make everyone aware.

A method is provided to customize the appearance of the Cache cube icon in the system tray so different instances can be visually distinguished.  When csystray.exe, the Cache/Ensemble cube program, starts, it will look for files named "up.ico" and "down.ico" in the \bin directory below the instance installation directory.  If these .ico files are present, csystray.exe will load the icons and display them in place of the default blue and gray Cache/Ensemble cube icons.  These files should each contain a single small (16x16) icon.

In order for the change to take affect, you need to exit the cube and then start it again from the Start menu (note - obviously this only works on Windows as the Cube doesn't run on other platforms)

Last comment 7 September 2017
+ 14   0 8
476

views

+ 14

rating

Enterprises need to grow and manage their global computing infrastructures rapidly and efficiently while simultaneously optimizing and managing capital costs and expenses. Amazon Web Services (AWS) and Elastic Compute Cloud (EC2) computing and storage services meet the needs of the most demanding Caché based application by providing
 a highly robust global computing infrastructure.

+ 14   3 9
0

comments

4362

views

+ 14

rating

In this post I would like to talk about the syslog table.  I will cover what it is, how you look at it, what the entries really are, and why it may be important to you.  The syslog table can contain important diagnostic information.  If your system is having any problems, it is important to understand how to look at this table and what information is contained there.

Last comment 9 November 2016
+ 14   0 5
869

views

+ 14

rating

Does anyone NOT use a debugger? I can't remember the last time I did. It's not because I don't dislike them, I just don't need to use them. The main reason for this is because I have a certain development methodology that either produces less bugs, catches them at a unit test level, or makes tracking them down much easier.

Here are my tips...

1. Write your own COS cheat-sheet.

This is mainly for anyone that is new to COS. One of the biggest bug hazards is not knowing how certain commands and functions work. Take the time to play with a language and try out all of its variances. The process of then documenting your own cheat-sheet will cement the knowledge and provide a quick reference review tool. Not only will you become more productive, but you will certainly write less of those avoidable bugs.

2. Switch on track variables in Studio

Last comment 5 January 2018
+ 14   1 4
810

views

+ 14

rating

In this article we are going to compare $Increment and $Sequence functions.

First of all, a note for readers who have never heard of $Increment. $Increment is a Caché ObjectScript function which performs an atomic operation to increment its argument by 1 and return the resulting value. You can only pass a global or local variable node as a parameter to $Increment, not an arbitrary expression. $Increment is heavily used when assigning sequential IDs. In such cases parameter of $Increment is usually a global node. $Increment guarantees that each process using it gets a unique ID

Last comment 19 August 2016
+ 14   0 8
750

views

+ 14

rating

Class Queries in InterSystems Caché is a useful tool that separates SQL queries from Caché Object Script code. Basically, it works like this: suppose that you want to use the same SQL query with different arguments in several different places.In this case you can avoid code duplication by declaring the query body as a class query and then calling this query by name. This approach is also convenient for custom queries, in which the task of obtaining the next row is defined by a developer. Sounds interesting? Then read on!

Last comment 9 December 2016
+ 14   0 9
3800

views

+ 14

rating

Importance and Collection of Exact Version Information ($zv / $zversion)
 
The explanation of:
- why collecting $zv is important (The WHY),
- what the components of $zv mean (The WHAT),
- and how to collect $zv (The HOW). 
(The Ultimate $zv Guide to the ISC Galaxy in large, friendly letters)
Last comment 15 November 2016
+ 13   0 7
762

views

+ 13

rating

GraphQL is a standard for declaring data structures and methods of data access that serves as a middleware layer between the client and the server. If you’ve never heard about GraphQL, here is a couple of useful online resources: here, here and here.

In this article, I will tell you how you can use GraphQL in your projects based on InterSystems technologies.

Last comment 22 January 2019
+ 13   9 5
867

views

+ 13

rating

Introduction

The field test of Caché 2016.2 has been available for quite some time and I would like to focus on one of the substantial features that is new in this version: the document data model. This model is a natural addition to the multiple ways we support for handling data including Objects, Tables and Multidimensional arrays. It makes the platform more flexible and suitable for even more use cases.

Last comment 15 June 2016
+ 13   0 11
1798

views

+ 13

rating

Recently, a partner company started to develop an Angular client for their Cache application. Together, we decided to leverage the power of Caché dynamic objects to exchange JSON encoded data between client and server parts. However, we realized that currently there is a gap in Cache JSON implementation that prevents simple use of traditional registered and persistent classes to exposed their data with the same ease as with XML. I wrote a small JSON adapter, that does the job and bridgers the gap. It's purpose is simple expose data described by a regular Cache class in a one-to-one fashion to a %DynamicObject. On the other hand, when a serialized JSON data comes in, it can be easily deserialized into dynamic object and subsequently bound to regular class by the newly created adapter.

Last comment 18 October 2018
+ 13   1 8
1140

views

+ 13

rating