Multiple appservers per rest service

Posted by Elsworth Burmeister on 12-Sep-2016 04:52

Hi guys

Progress mobile consumes a rest service which is connected to one appserver and this appserver connects to one specific db. We have a situation where im trying to find the best practice or way forward to a solution that involves us having 1 mobile app that can serve many clients and each client having their own db. My solution to this is to have a a DB connected to the appserver on the rest service and this will authenticate the client and get their DB details.. I will store those details in a session storage variable on the mobile app and pass these details to the rest service every time they do an appserver hit to connect to that clients DB and retrieve the information accordingly. 

However this does not seem like the best solution.. Im new to the mobile developement and think there is a much easier way to do this.

any ideas or solutions?

TIA

All Replies

Posted by Brian K. Maher on 12-Sep-2016 05:04

or you can add on the multi-tenant functionality to the database.  That was designed for this.

Posted by bronco on 12-Sep-2016 05:11

Re-connecting every single call is a performance killer. Have you considered the multi-tenancy features of he OpenEdge database?

Posted by Elsworth Burmeister on 12-Sep-2016 05:24

Multi-tenant is not an option we have to use existing architecture and the DB's as they are.

Posted by Brian K. Maher on 12-Sep-2016 05:36

Well, good luck then.  I think you are going to love (hate) the connect/disconnect model.  Not scalable at all.

Posted by marian.edu on 12-Sep-2016 05:45

Don't even consider connect/disconnect on request, why can't you just have separate rest services one for each database set and then one entry point that can just keep references (service url's) of those so the client mobile all just get the 'service catalog' and the user will use one of the available rest services.

Posted by bronco on 12-Sep-2016 06:18

Instead of 1 appserver to N databases you could have N appservers to N databases as well. In this case you could have yadaaydaa.com/.../... and yadaaydaa.com/.../...

A reverse proxy (nginx f.e.) could forward companyabc to appserverAbc and companyxyz appserverXyz (or what names you have for your appservers). I would suggest 11.6 and PASOE since this makes life easier when creating appservers from script (which you probably want) and PASOE has incorporated Tomcat as well...

Posted by bronco on 12-Sep-2016 06:20

after yadaa.com I meant /companyabc & /companyxyz. The forum "eats" URL's.

Posted by marian.edu on 12-Sep-2016 06:26

Yeah, something along that line only I would recommend akera.io with a bunch of node.js application servers spread around and one web service as single entry point that can balance/distribute/route requests between those… works great if you want to create new instances from scripting and it does NOT have an incorporated tomcat ;)



Marian Edu

Acorn IT 
+40 740 036 212

Posted by bronco on 12-Sep-2016 06:31

we from akera.io recommend akera.io ;-)

Posted by marian.edu on 12-Sep-2016 06:36

right, not only because it’s better but it’s something we’ve done and darn proud of it ;)


Marian Edu

Acorn IT 
+40 740 036 212

Posted by bronco on 12-Sep-2016 06:40

and you have every right to be proud! I was just teasing.

Posted by bheavican on 13-Sep-2016 07:58

Are you saying this is possible to do within the Progress toolset?  I'm not following where those capabilities are.

Posted by bheavican on 15-Sep-2016 09:34

Trying again, are you saying this is possible to do within the Progress toolset?  I'm not following where those capabilities are.

Posted by marian.edu on 19-Sep-2016 01:14

I’m not sure to whom this question is addressed, can you please clarify what are you interested in? The multi-tenant feature of the database server can work very well, it was simply designed for situations like that and it’s doing a data partitioning inside the database for each tenant. It does require one to buy that extra package but I think it’s cheaper than having a set of multiple database servers anyway.



 
Marian Edu

Acorn IT 
+40 740 036 212

This thread is closed