Separating the forum software into API and static website


(Sumeet) #1

Hi,

This is my first post. And i am new to this forum. Not sure if this question is asked before. My apologies if this question is repeated.

I was wondering if technically it is possible. That the Discourse forum could be separated into two components / Modules the REST API and the website.

Such that the API part can be hosted separately on cloud hosting services like Digital Ocean , AWS.
And the other part the website can be hosted separately on other hosting platforms which provide static website hosting.

gh-pages a hosting platform by github is a wonderful platform for hosting static websites. It is also free of cost.

This approach can have various Advantages.

  1. We can develop a mobile app like an Android app and a i-os app which could directly connect with the api.

  2. Reduced load and data transfer on cloud API server -

When the website part is hosted separately the server doesnt need to transfer the html and web pages. This could considerably reduce the data-transfer load on the api server.

  1. Reduction in overall Cost of Hosting and operating cost :

When the html/ javascript part is hosted on free hosting platforms like gh-pages. The data transfer through the api would be much less. Therefore it would enable us to host the forum on cloud server with lower memory and processing capacity.

  1. Easy to customise the forum - Most of the people doesnt know ruby and server side coding, But they might still know html / css and javascript. Therefore , by seperating the api and the website. It would make it much easier to customise the forum.

Right now also it is easy to customise the forum. but separation would make it more easier.

Anyway,

Any — Thoughts ? Inputs ? and suggestion.


(Rafael dos Santos Silva) #2

You are severely overestimating the load nginx uses to serve static assets. It’s minimal. And using a CDN provides most benefits you list above, and is already supported.

You can do this already, just connect to the same api the website uses.


(Tom Newsom) #3

I’m only lightly familiar with the innards of Discourse, but I can say with some confidence that this idea is a non-starter. The static content in a discourse session is dwafed by the dynamic content. The client-side JS app is transferred once and from then on everything is done through the API.

That API is already completely fully featured so an iOS/Android app is perfectly feasible. It’s just a very big project so nobody’s done it yet.


(Dave McClure) #4

Related:

And now this: