Architecture question

Hi,

Please consider the following situation:

  1. Desktop app that sits behind a firewall. Could be many installations.
  2. Cloud based app 1. RO Delphi server.
  3. Cloud based app 2. .NET WebService or RO .NET webservice.
  4. iOS/Android app

App 4 needs to connect to app 1 and send data / trigger events. Since App 1 is behind a firewall the idea is to connect to app 3 or 4 which in it’s turn should connect to app 1. Ideally I would like to have app 1 make an outbound connection and then listen to events coming in.

Question 1. How do you suggest handling this?

Question 2. Is there a way to combine a Delphi and .NET webservice in one? Ideally I would not like to have two webservices but because of external dependencies I need Delphi and .NET.

Thanks,

Hi,

it is possible.

  • Cloud based app. it can use hydra so you can have Delphi host and .NET plugin or .NET host and Delphi plugin. this is a kind of proxy so it should transfer requests from mobile app to desktop app. .NET and Delphi part should use different ports
  • Desktop based app that connects to cloud app via http/superhttp (or https/superhttps). it is able to receive events from cloud based app thru firewall
  • mobile app.

you can review of solution from Forward traffic between servers. HTTP Chat sample topic. it can be used in cloud app.

Hi,

Ok the traffic forwarding seems like a good solution. On more question. If the Desktop app is the server can I initiate the outgoing connection from the server and then make calls from the cloud app to the desktop app?

Thanks,

Hi,

if you are using superhttp channel - yes, you can send something to the desktop app after the desktop app is connected to the cloud app.

Read more about superhttp channel at Super HTTP Channel

Sorry to be more clear:

  • Desktop app is RO Delphi servcer behind firewall
  • Cloud app is client
  • Desktop app initiates connection.
  • At some time cloud app makes a call over the existing connection to the desktop app.

Thanks,.

Hi,

cloud app should be able to receive a call from mobile app so cloud app have to be a proxy server.
desktop app also should be able to establish connection to cloud app. you can’t establish connection thru firewall if cloud app will be a client.

as I can see this (if I correctly understand your idea):

  • desktop app connects to server (cloud app) and registers itself as a server
  • mobile app connects to server and receives info about suitable desktop app
  • mobile app makes a call to cloud app and includes an ident of suitable desktop app. cloud app forwards this call to desktop app and pass response to mobile app. ident of desktop app can be in url like http://cloud_app:port/server_1.2.3.4 . cloud app decodes url and forward a request to superhttp://1.2.3.4:port/bin.

Note: under forward a request I mean pass it via event sink for using existing connection from desktop app to cloud app.

Hi,

Yes sthis is how it should work.

Yes. Is there any sample of that?

Thanks,

Hi,

just create a usual ROD server from template and add a custom method like RegisterServer.