简体   繁体   中英

Facebook proxy web application - Is it good architecture/design?

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.

I think that this is not architectural issue. Try to switch the point of view on the problem, for me it's about deployment.

You've designed an application and you want run it on different domains, is this right?

If true, you've at least these two options:

  • Act on web server configuration (if you decide for housing or you deploy in your organization).

  • Act on configuration provided by your service host (if you decide for hosting ).

About the legal question, sorry, I can't help you; but I can suggest to search facebook partnership guidelines (or try to ask to a facebook salesman).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM