I would like to emphasize that if it is a new customer or if they are considering upgrading you would evaluate the possibility of guiding your customer to use Atelier. According to the 2017.1 release notes "the focus of future development will be on the new Eclipse based IDE". See the following link for additional details:

http://docs.intersystems.com/documentation/cache/20171/pdfs/GCRN.pdf (Page 6 - 1.8 New Features in Atelier, the Eclipse-Based IDE) 

Additional comments:

Basic authentication is the easiest to implement security to your application and it can be implemented without additional libraries. Everything needed to implement basic authentication is what you have done. The problem with basic authentication is that it is (well “basic”) and it offers the lowest security options of the common protocols. 

As far as I know there are no advanced options for using basic authentication, so you are just sending a username and password as base64 encoded. 

Basic authentication should never be used without SSL encryption because the username and password combination can be easily decoded otherwise.

The UseSession = 1 as you mentioned will break the stateless caracteristics of restfull services and you will also consume a CSP license until the session ends. 

You could take a look at other autorization frameworks as OAuth2.0, SAML (supported by Caché and Ensemble) or create your own custom protocols for access token control by using the ZAUTHENTICATE routine and Caché/Ensemble delegated access.

There are 2 nice posts from Daniel Kutac that may help you with additional options:

https://community.intersystems.com/post/cach%C3%A9-open-authorization-fr...

https://community.intersystems.com/post/cach%C3%A9-open-authorization-fr...

In order to solve  Access-Control-Allow-Origin error you can use the HandleCorsRequest feature from your rest service. 

Set class parameter HandleCorsRequest = 1 in your rest service class.

Override the OnHandleCorsRequest method in order to provide the origin domain that you want to allow  acces to your application.

https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY...

Hi Victor,

There is a customer in Brazil which is using HAProxy and KeepAlived  to set up high availability for their load balancers. They currently have 2 HAProxy servers (primary an secondary) 4 ECP servers and 1 DB server. They currently are load balancing all connections ODBC, JDBC, etc. with this solution. They are managing/load balancing approximately 5.000 user connections. I can manage to put you in contact with the customer in order to help you with some question about the architecture or configuration. 

I hope it helps.

Regards.

Fábio Gonçalves.

Hi Andrei,

As we have talked out list, it is possible to call the getContent client method in order to get data dinamically instead of using the zen mojo document stack. To do so, see the example code bellow:

ClientMethod onselect(key, value, docViewId) [ Language = javascript ]
{
console.log('select '+key);
var mainView zen(docViewId);
var realKey key.split(':')[0];
switch(realKey) {
case 'menu':
debugger;

zenPage.getContentProvider().invalidate('data','show-employee');
var obj {id:'103',level:value};
mainView.setDocumentKey('show-employee',obj);
mainView.getLayout().sourceData zenPage.getContent('data','show-employee',obj,1);
mainView.updateLayout();
break;
}
}

This example is going to manipulate de data document content on the document stack instead of adding a new document on the zen mojo document stack.

Also you can notice that the zen('mainView').currLevel will remains the same. It means that there is no new document inserted on the document stack after call getContent.

Zen Mojo is working with its all cache mechanism according to the document key which didn´t change. At this point when you call UpdateLayout Zen Mojo will just get the new document data (from getContent) and render the content (do the data binding) on the current document Layout.

Please, let me know if you have additional question about this topic.

P.S.: You can user 'force parameter' = 1 (zenPage.getContent('data','show-employee',obj,1); ) or call the invalidate (zenPage.getContentProvider().invalidate('data','show-employee'); ). According to the documentation the force parameter will clean the data before call the OnGetContent call back.

Regards.

Hi Andrei!

Although I understand your problem, I didn´t get exactely what you  want. Anyway, there is an example on SAMPLES namespace ( ZMdemo.bootstrap.HomePageServerSide.cls ) that demonstrates how to get your layout and data content from the server side. To do that yoy just to return null con getContent javascript method.

Please let me know if it helps otherwise provide additional details about what you realy expect to do.

Regards