Multiple Copies of Self Hosted Web API  Topic is solved

Discussions relating to the REST API of Jiwa 7.

Multiple Copies of Self Hosted Web API

Postby SBarnes » Tue Sep 26, 2017 9:10 am

Hi Mike,

Is there a way to run multiple copies of the Self Hosted Web API on the same machine that would talk to different databases i.e would the following work?


    1 .Copy the Jiwa Program Directory.
    2. Use install util to register a second version of the service
    3. Configure both config files accordingly
    4. Start both services
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1620
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Re: Multiple Copies of Self Hosted Web API  Topic is solved

Postby Mike.Sheen » Thu Sep 28, 2017 2:25 pm

Yes.

We have some guidance on how to do this for the plugin scheduler service, and the same would apply to this.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2445
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 757

Re: Multiple Copies of Self Hosted Web API

Postby Mike.Sheen » Thu Sep 28, 2017 2:28 pm

You're going to ask next for a way to limit which IJiwaRESTAPI plugin classes are loaded / exposed per service, aren't you! :o
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2445
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 757

Re: Multiple Copies of Self Hosted Web API

Postby SBarnes » Thu Sep 28, 2017 2:33 pm

Ah actually I wasn't because I was actually thinking inter-company communication i.e. two separate databases but now that you've so kindly volunteered to tell me there must obviously be a way? :lol:
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1620
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Re: Multiple Copies of Self Hosted Web API

Postby Mike.Sheen » Thu Sep 28, 2017 5:53 pm

For multiple services hitting the same database, you could look at Assembly.GetExecutingAssembly().Location to reveal the file location of the service, then selectively add routes in the plugin based on that.

I've done this before with the Plugin Scheduler, before we had the ability to limit which plugins are executed via the config - so it should work also for the REST API self-hosted service. Not sure how to do this with IIS/App Service - probably there is a way to limit based on base URL.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2445
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 757

Re: Multiple Copies of Self Hosted Web API

Postby SBarnes » Thu Sep 28, 2017 6:06 pm

The only other way I could think of would be to have different users /user groups and permissions for the paths through the user interface.
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1620
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175


Return to REST API

Who is online

Users browsing this forum: No registered users and 2 guests