1

I am trying to build a java web application, which is a facebook app. Say this app is "Test App" on facebook and it is hosted and served from "xyz.com". Now, I would like to make this java app running at xyz.com - a little generic - The idea would be to create N apps "Test App1" (hosted at abc.com) , "Test App2" (hosted at efg.com) , and so on (kind of like a service), use just this one webapp at xyz.com to serve the GUI for each of these apps. So, for every incoming request on any of the fb apps, xyz.com webapp would identify which app needs to be served and open a GET request to it, get the html response from it, include it as part of its own html response. In short, this is how it is going to look like:

User of "Test App1" -> iframe tries to load xyz.com -> servlet code on xyz.com app opens a HTTP GET request to abc.com -> Gets response -> includes it in its own reponse -> sends response.

Does this make sense? Is this a good design at all? I have a feeling that I am trying to make it look like a fake portal, with xyz.com opening up a new HTTP Get for every incoming request, I think it will fail miserably when it has to scale. What is the best way to design this kind of a proxy web app - a) for flexibility (to serve more apps) b) for scalability.

4

1 回答 1

1

我认为这不是架构问题。尝试转换问题的观点,对我来说这是关于部署的。

您已经设计了一个应用程序,并且希望在不同的域上运行它,对吗?

如果为真,您至少有以下两种选择:

  • 对 Web 服务器配置采取行动(如果您决定提供住房或部署在您的组织中)。

  • 根据您的服务主机提供的配置采取行动(如果您决定托管)。

关于法律问题,对不起,我帮不了你;但我可以建议搜索 facebook 合作指南(或尝试询问 facebook 推销员)。

于 2013-02-19T11:49:33.107 回答