Find

Question
· Oct 24, 2018

Best Practice for data structure for multi-user systems

Hi,

I would like to know if anyone has had some experience in building systems for multiple end-users. 

To keep things simple, in a hypothetical example, say an Event Booking System, where a Venue could sign up to use such a system and define it's Venue, costs, calendars, etc.. and then invite their customers to book the Venue on different days/times. 

If I wish to offer such a system to many Venues, there are a number of options available.

  • Simply create a unique copy of the system for each Venue, in their own Namespace, unique classes and applications
  • Set it up, so that every Venue shares the same set of applications (saving to maintain multiple copies), but create unique classes for each Venue
  • Just provide one set of classes and applications and simply pre-fix every piece of data with a unique identifier for each Venue. So all the Bookings for example, would be in one large class, but each entry would be tagged with the Venue ID and the code would simply track all the data with the Venue's ID before creating or opening the records for that Venue.

From a maintenance point of view, only one set of classes and applications would make sense, but I'm hesitant in launching into this in fear of getting the data mixed up and allow one Venue to operate on another Venue's data.

So, my interest is in learning from other developer's experiences, if someone has gone down this road, what they chose to implement, how did it go, was the concept good down the road for expansion and would they do things differently, if they had to do it again.

I'm inspired by the likes of Xero Accounting, where you simply complete an application form, log in and immediately, you have a complete system at your disposal. Just by logging in, there does not seem to be a need for building your copy of a database and they manage it, as if you were running your own copy of the application. Seemingly simple. If you just wish to test the software, then close the account, no apparent need for any hands-on intervention form a human. That is the simplicity I would like to achieve.

Anyway, looking forward to some great suggestions.

Thanks,

Rosti.

6 Comments
Discussion (6)3
Log in or sign up to continue
Question
· Oct 18, 2018

$match or "?"

Hello all...

Is there two matching patterns in Caché, is there a difference in use one or the other?
Example:

USER>set a = "(1234)"

Using $match.

USER>w $match(a,"\([0-9]{4}\)")

USER>1

Using literal match (sorry if not correctly term expression)

USER>W a?1"("4n1")"

USER>1

What is different from using one or the other?

The 'a?1"("4n1")"' does this pattern exist only Caché.
Exists performance improvement with use pattern Caché?

2 Comments
Discussion (2)2
Log in or sign up to continue
Article
· Oct 9, 2018 3m read

Execute Server Commands from Caché / Ensemble / IRIS

The question has come up several times and I saw mixed answers and no quick example

My personal preference is using CPIPE device as you get back exactly the output you will get at the command line interface of your OS .
The tricky thing is to stop reading in time.
The example just displays what you normally see in your console.
it becomes useful if you look for things that you can't get from any $system.whatever()

e.g.
- your servers IP address or addresses depending on your configuration.  
- pinging any other server to see if it is still visible on the network
- running nslookup 

GitHub

 Zpipe  quit ; CPIPE example to run host console command
cmd(command="",test=0) ;
 if command="" set command="dir"
 quit $$execute(command,test)

execute(cmd,test) Public {
 set dev="|CPIPE|1"
 set $zt="cls"
 set empty=0
 open dev:cmd:0
 write:test $test,!
 else  write "pipe failed",! quit 0
 while empty<3 {
    use dev read line 
    set empty=$s($l(line):0,1:$i(empty))
    use 0 write line,!  ;;; or do any kind of analysis of the line 
    }

cls ;
 set $zt="" use 0
 close dev 
 if $ze'["<ENDOFFILE>" $ze,!
 quit $t
 }
 

..

Just run USER>do cmd^Zpipe() to see if you are allowed to use PIPES
(I just met a narrow-minded security manager that didn't allow the use of pipes to Caché) 

or 

USER>do cmd^Zpipe("tracert community.intersystems.com")

Tracing route to community.intersystems.com [54.83.203.138] over a maximum of 30 hops:
 
  1     3 ms     1 ms     1 ms  10.10.1.1
  2     *        *        *     Request timed out.
  3   116 ms   168 ms   132 ms  at-vie01b-rc1-ae11-0.aorta.net [84.116.228.201]
  4   142 ms   114 ms   115 ms  at-vie05d-rc1-ae29-0.aorta.net [84.116.140.2]
  5     *        *        *     Request timed out.
  6   114 ms   114 ms   115 ms  us-nyc01b-rd2-ae9-0.aorta.net [84.116.140.170]
  7   118 ms   116 ms   117 ms  us-was03a-rd1-ae5-0.aorta.net [84.116.146.142]
  8   114 ms   115 ms   114 ms  us-was03a-ri1-ae11-0.aorta.net [84.116.130.165]
  9   114 ms   116 ms   114 ms  213.46.182.202
 10   145 ms   132 ms   132 ms  54.239.111.240
 11   115 ms   115 ms   114 ms  54.239.110.152
 12   126 ms   136 ms   132 ms  54.239.110.149
 13   115 ms   116 ms   114 ms  54.239.108.133
 14   129 ms   148 ms   133 ms  52.93.24.94
 15   115 ms   114 ms   117 ms  52.93.24.85
 16     *        *        *     Request timed out.
 17     *        *        *     Request timed out.
 18     *        *        *     Request timed out.
 19     *        *        *     Request timed out.
 20     *        *        *     Request timed out.
 21   429 ms   121 ms   114 ms  ec2-54-83-203-138.compute-1.amazonaws.com [54.83.203.138]

Trace complete.

5 Comments
Discussion (5)2
Log in or sign up to continue
Question
· Oct 8, 2018

Backing up/Exporting created Roles

I have created some roles, and would like to know if there is a way to export the Roles and save them off to a file? I want to create a backup file of these roles for DR purpose, and in case I ever get hit by the preverbal bus.

Thanks

Scott Roth

The Ohio State University Wexner Medical Center

2 Comments
Discussion (2)2
Log in or sign up to continue
Question
· Sep 26, 2018

Upgrade from Caché 2013.1.7 (Build 974U) to 2017.2.2 (Build 865U_SU): Any experience/known issues/checklists/hints?

Upgrade of custom application

Dear community,

we are a company located in central Germany working with Intersystems Caché since 2003 (Jesus, that's actually a long time in IT).

As we struggle to keep pace with outside development we still operate on Caché 2013.1 surprise

We are, of course, aware that we need to upgrade Caché and therefor plan an upgrade to 2017.2.

Now my question to you bold ObjectScript warriors:

Our application is a medium sized ERPish application with around 250k lines of code. So a bit code to review.

Many thanks for your input in advance and best regards,

Udo

4 Comments
Discussion (4)2
Log in or sign up to continue