Oscar,

I interpreted your original message as being about creating something like Teletortoise, which is, as Seth described, "where the model runs on the server but displays [in the browser]". Creating a Teletortoise-like thing by yourself is much more feasible than creating something like Tortoise by yourself, because creating something where the simulation runs entirely in the browser requires reimplementing the entire simulation engine and the backend of the compiler, whereas Teletortoise mostly just involves writing a thin client and a bit of server code. We haven't done a whole lot of work on Teletortoise ourselves, but here <http://li425-91.members.linode.com:9000/client?username=Guest> it is in action.

You can find the webapp code for both Tortoise and Teletortoise here <https://github.com/NetLogo/Galapagos/tree/master/app> in Galapagos (though I think we really need to separate them out into two entirely different repos at some point). Folders named "remote" refer to code that is only for use in Teletortoise, "local" for Tortoise-only stuff, and "core" for things that are used by both of them. (The naming scheme is both poor /and/ my own doing.)

Any idea where I can start?

I would start by creating some web application project in a JVM language (e.g. Java, Scala, Clojure) that depends upon this artifact <https://bintray.com/netlogo/NetLogoHeadlessMaven/netlogoheadless/5.2.0-bb89cae/view>, which is a version of NetLogo that runs without any GUI. The artifact is accessible through the URL given and through BinTray's JCenter repository. If you're using Maven, this page <https://gradle.org/docs/current/userguide/dependency_management.html#sub:maven_jcenter> explains how you can configure Maven to add JCenter as a place from which to pull down dependencies.

Once your project's infrastructure is set up, I recommend looking at the files in this package <https://github.com/NetLogo/Galapagos/tree/master/app/models/remote/workspace> and this package <https://github.com/NetLogo/Galapagos/tree/master/app/models/core>. Probably the best starting points for your code are this <https://github.com/NetLogo/Galapagos/blob/master/app/models/remote/NetLogoController.scala#L129-L138> (which sets up the workspace) and this <https://github.com/NetLogo/Galapagos/blob/master/app/models/remote/workspace/StateTracker.scala#L36-L40> (which gets the model state updates from the workspace so you can send them to the client for display). If you're working on your project and want to do something with your running NetLogo workspace and you don't know what it's really capable of, I suggest looking at the code that is used for the artifact. Here <https://github.com/NetLogo/NetLogo-Headless/tree/bb89caec2ee73a1db394c9055d00380f88c500f6> is a link to all of the code in that artifact, and here <https://github.com/NetLogo/NetLogo-Headless/blob/bb89caec2ee73a1db394c9055d00380f88c500f6/src/main/workspace/AbstractWorkspace.scala> is a link to `AbstractWorkspace` in particular, which has all sorts of juicy information for you to chew over.

Hopefully you find this information helpful in getting started with your project.

On 1/29/2015 11:22 AM, Seth Tisue wrote:
On Thu, Jan 29, 2015 at 12:36 AM, Oscar Martinez
<[email protected] <mailto:[email protected]>> wrote:
> For an university project, I want to create a NetLogo/HubNet client based on
> Web technology. I'm not talking about a web client (I know that it exists),
> I'm talking about a web applications, where the user can access to the
> simulations of NetLogo/HubNet using only a web browser, with no downloads or
> configurations. It make sense? Any idea where I can start?

NetLogo Web (aka Tortoise) is already in pretty good shape:
https://github.com/NetLogo/NetLogo/wiki/Tortoise <https://github.com/NetLogo/NetLogo/wiki/Tortoise> Lots of models in the NetLogo Models Library work already; you can try them out at http://li425-91.members.linode.com:9000/create-standalone <http://li425-91.members.linode.com:9000/create-standalone>
In Tortoise, the simulation runs entirely on the client.

See also Teletortoise, where the model runs on the server but displays on the client. (As for the HubNet aspect, the intent is that Teletortoise will serve as the basis for a future of HubNet. so a lot of the groundwork has already been laid. but actual development work on a new HubNet hasn't started.)

Seth
--
You received this message because you are subscribed to the Google Groups "netlogo-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups 
"netlogo-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to