You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having a bunch of files separate from the main binary is a real drag. I have to remember to copy a whole folder whenever I move the rethinkdb binary or run it from a different location or I have to figure out where the folder is installed and pass it as an option to rethinkdb on startup.
We should compile the web assets into the rethinkdb binary and have the web server point serve from there. This would be much more convenient than having a separate directory.
This could also be a dev vs. release difference. If the fallback is in
place this could be done by simply not distributing the
rethinkdb_web_assets folder with the package.
The old behaviour can be kept if dirname $0/rethinkdb_web_assets exists.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/1093#issuecomment-20305260
.
sorry, I should have been clear. I meant to say that we could build the web
assets into the binary and build the web assets directory, defaulting to
the directory if its available and falling back to the inbuilt versions at
runtime. When developing the directory would be available and that would be
used. The main change we would make would be to exclude the web assets
directory from the package so that the released version installed by most
users would end up using the built in versions of the web assets.
We should avoid using build options for features that can easily be
runtime options.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/1093#issuecomment-20309993
.
After upgrading from 1.11 to 1.12, users may encounter this error:
RqlClientError: MALFORMED PROTOBUF (missing field `type`)
This happens when the running 1.11 server starts serving the web assets for the 1.12 server. The solution is to stop the 1.11 instance and then start the 1.12 instance (after migrating the data).
Putting the web assets into the binary would also solve this issue. The gzipped web assets weigh under 2 MiB.
One good reason to do this would be to make sure that the version reported on the web interface is actually the version of the server.
What could happen is
` The user starts 1.11
The user update to 1.12
The user doesn't restart the server, but the web assets have been changed, so the version reported in the web interface is 1.12 while the server is actually running 1.11.
@neumino: that's a very strong argument for packaging the web assets into the binary. I think that keeping --web-static-directory is a reasonable workaround for the development workflow.
The easiest, most flexible and most portable way I can find to implement this is to write a small script that generates a C file that contains each file from the web assets as a separate string literal along with metadata such as file names and sizes.
It is no longer possible to build rethinkdb without building the web assets.
The --web-static-directory flag is now the only way to use custom web assets at runtime. The ./rethinkdb_web_assets folder no longer has any special meaning.
The rethinkdb executable is now about 5 MiB larger.
Activity
neumino commentedon Jun 29, 2013
Hum currently my workflow is the following one
If the web assets are in the binary, I would have to kill and restart the server every time , and that would be kind of painful.
AtnNn commentedon Jul 1, 2013
The old behaviour can be kept if
dirname $0/rethinkdb_web_assets exists.wmrowan commentedon Jul 1, 2013
This could also be a dev vs. release difference. If the fallback is in
place this could be done by simply not distributing the
rethinkdb_web_assets folder with the package.
On Mon, Jul 1, 2013 at 12:42 PM, Etienne Laurin [email protected]:
AtnNn commentedon Jul 1, 2013
We should avoid using build options for features that can easily be runtime options.
wmrowan commentedon Jul 1, 2013
sorry, I should have been clear. I meant to say that we could build the web
assets into the binary and build the web assets directory, defaulting to
the directory if its available and falling back to the inbuilt versions at
runtime. When developing the directory would be available and that would be
used. The main change we would make would be to exclude the web assets
directory from the package so that the released version installed by most
users would end up using the built in versions of the web assets.
On Mon, Jul 1, 2013 at 2:00 PM, Etienne Laurin [email protected]:
AtnNn commentedon Apr 1, 2014
After upgrading from 1.11 to 1.12, users may encounter this error:
This happens when the running 1.11 server starts serving the web assets for the 1.12 server. The solution is to stop the 1.11 instance and then start the 1.12 instance (after migrating the data).
Putting the web assets into the binary would also solve this issue. The gzipped web assets weigh under 2 MiB.
neumino commentedon Apr 1, 2014
I would be ok with that as long as we keep the
web-static-directoryor the current behavior for DEBUG build.neumino commentedon Apr 10, 2014
One good reason to do this would be to make sure that the version reported on the web interface is actually the version of the server.
What could happen is
` The user starts 1.11
mglukhovsky commentedon Apr 10, 2014
@neumino: that's a very strong argument for packaging the web assets into the binary. I think that keeping
--web-static-directoryis a reasonable workaround for the development workflow.AtnNn commentedon Sep 24, 2014
This issue has come up again.
The easiest, most flexible and most portable way I can find to implement this is to write a small script that generates a C file that contains each file from the web assets as a separate string literal along with metadata such as file names and sizes.
timmaxw commentedon Sep 24, 2014
The
xxdtool may be useful:But it seems like an incomplete solution. At the very least we would also need to construct a file lookup table.
AtnNn commentedon Sep 30, 2014
I have had some success with a custom python script that generates both compact string literals for the data along with a lookup table for file names.
AtnNn commentedon Oct 17, 2014
--web-static-directoryflag is now the only way to use custom web assets at runtime. The./rethinkdb_web_assetsfolder no longer has any special meaning.