phoenixbf / aton

ATON framework is based on modern web standards and technologies to create interactive, liquid and collaborative Web3D/WebXR apps targeting Cultural Heritage field. It adopts a “develop once, deploy everywhere” approach, providing building-blocks and a modular architecture
GNU General Public License v3.0
74 stars 7 forks source link

Deploy by a Flask webserver #19

Closed dirkroorda closed 1 year ago

dirkroorda commented 2 years ago

We are building a website where we want to view 3D models in a variety of viewers, such as Smithsonian Voyager, Aton, and others. The project is called Pure3D.

So how do I offer the ATON viewer to the browser, and how does that viewer interact with the server? Currently we use a Flask webserver.

Are there docs about what data traffic between client and server ATON will be conducting?

Obviously, we cannot let ATON dictate the choice of webserver that we want to use for Pure3D.

phoenixbf commented 1 year ago

Hello Dirk, sorry for late reply. The framework itself is based on Node.js (you can find tutorials here on how to set it up & running: http://osiris.itabc.cnr.it/aton/), since its architecture is composed by multiple services leveraging on Express.js, Passport.js, etc.

If Node.js is not available on your setup/server, you can use any webserver you like exposing mainly content in public/ folder, including resources (css, icons, etc.) and a Web3D/XR app, for instance the Hathor front-end - or a custom front-end to present 3D scenes.

Data traffic in this scenario from server to client is basically resources related to front-end (js, css, html, etc.) and 3D assets (glTF, textures, etc.)

I'm working on a minimal example + documentation for such setup in the next upcoming commits.

dirkroorda commented 1 year ago

I assume that users can use the ATON viewer to create annotations. When our framework serves them the aton viewer, then aton loads the 3d model from our server, upon which the users can create annotations. When the users save their annotations, our framework has to pick up the saved data and store that somewhere.

Obviously we need a fair amount of business-logic for that, which we program in our web server (authentication, authorisation). So we have to handle the requests coming from the aton viewer, apply our business logic to it, and then give responses.

That's why we want to know what requests ATON will generate, and moreover, how we can influence those requests.

For example, when using Smithsonian Voyager, we can pass it a root url, and we know that all its requests start with that root url. We also know, that if we use voyager-story, that the requests are webdav requests, so we made our server capable of receiving webdav requests.

So, what we essentially want is the client-side of the viewer, not the server side.

Looking forward to your documentation. Especially how user-generated data is transported back to the server.

phoenixbf commented 1 year ago

Hello @dirkroorda, you can find a minimal standalone 3D viewer example in public/standalone/ folder. It can be used without NodeJS requirement, using a web-server of your choice.

You can find a detailed tutorial here. You can then apply your logic to 3D models and scenes requests.

On the other hand for the standard NodeJS-based deployment, client requests rely on REST API (https://aton.ispc.cnr.it/apidoc/server/)

dirkroorda commented 1 year ago

Hoping to explore this somewhere in February/March!