Using different PORT when access REST and Web App

Hi all,

Does it possible to set REST port different from Web App

Because I need to set different connector setting in tomcat (ex one NIO , one BIO) for REST and Web App, due to difference characteristic of performance,and number of concurrent connection, different usage (REST for mobile apps, Web app for desktop reporting)

thanks

Hi,

Perhaps you could use REST in the portal module and deploy it as a separate web application:
create portal module via Manage modules link on the Project properties tab, then build separate WAR files (do not check Single WAR … on Deployment settings).

Thanks Konstantin for quick reply

Another question, does those separate deployment configuration can manipulate same entity and trigger event afterward ? for instance , if an entity already modified by REST then some chart value in dashboard is also modified accordingly ?

Of course these deployments should work with the same middleware and hence with the same entities and same data. See Stage 3 diagram here but keep in mind that you can use both Portal Client blocks and Web Client blocks on the client tier.

As for propagating changes, there is currently no out-of-the-box mechanism to push an event from middleware to clients, so the clients should poll middleware for changes. And it doesn’t matter how you deploy the application. In your example, the simplest solution would be just refresh the chart periodically.

See also the issue: Communication between application tiers using asynchronous events

1 Like

thanks konstantin for advice :slightly_smiling_face: