You can subscribe to this list here.
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(36) |
Aug
(8) |
Sep
(1) |
Oct
|
Nov
(14) |
Dec
(6) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2008 |
Jan
(13) |
Feb
(15) |
Mar
(3) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Trevor F. S. <tr...@tr...> - 2007-07-20 20:35:38
|
Hey, again. I just checked in a change which clears up the XP client stall on textures on my test box. Let me know if you're still seeing the problem with the new code. The change consisted of making the client not request gzip compression for textures and making the server not set a content-length when responding with gzipped data. Just so you know, I've started seeing a bug on XP where a dozen or so reloads of the viewer (which I often do while developing) eventually places all GL panels in the browser into a state where they render a frame only once or twice a minute. Memory usage looks fine, the CPU is mostly idle, and there aren't abnormal numbers of threads, but something's in a bad state that stalls on every frame. - Trevor |
|
From: Trevor F. S. <tr...@tr...> - 2007-07-20 14:18:17
|
Hey folks, I've duplicated Gal's trouble with gzip compression of textures on XP using the latest JRE. The client stalls when loading the texture, complains that the GZip stream ended prematurely, times out after 30 seconds and loads the model without the texture. If the first model to load has a texture you'll see whitescreen for 30 seconds when loading the client. One interesting bit: I don't see the same problem when I point the client at transmutable.com, which is running the same server code. One difference is that transmutable.com is running tomcat behind an Apache httpd via mod_jk, unlike the usual development case where the client talks directly to tomcat. Anyway, since gzip compression doesn't actually do much good for texture transfer speeds I'm going to check in a change that turns it off for textures but leaves it on for models and see if that solves the stalls. I also need to check that we're setting the content-length correctly for compressed transfers. I remain, - Trevor Java: Write Once, Debug Everywhere |
|
From: Gal N. <gal...@gm...> - 2007-07-13 18:14:07
|
Hi Trevor, Sorry... false alarm. I was accessing my local ip 192.168 instead of the domain name. I still haven't figure this out yet :( . Any way, all is working fine. Thanks, Gal. > -----Original Message----- > From: ogo...@li... [mailto:ogoglio- > dev...@li...] On Behalf Of Trevor F. Smith > Sent: Friday, July 13, 2007 7:49 PM > To: ogo...@li... > Subject: Re: [Ogoglio-developers] rendering problem? > > Hey, Gal. > > Please put a println in J3DRenderer.SpaceListener.userAdded(...) to > see if you're getting the same user added more than once. > > Thanks, > > - Trevor > > On 7/13/07, Gal Nitzan <gal...@gm...> wrote: > > One more issue :( > > > > This exception shows up on the plugin console: > > > > Adding Default Land > > Exception in thread "Thread-37" javax.media.j3d.MultipleParentException: > > Group.addChild: child already has a parent > > at > javax.media.j3d.GroupRetained.checkValidChild(GroupRetained.java:452) > > at > javax.media.j3d.GroupRetained.addChild(GroupRetained.java:461) > > at javax.media.j3d.Group.addChild(Group.java:271) > > at > > > com.ogoglio.viewer.j3d.J3DUserRenderable.setCamera(J3DUserRenderable.java: > 206) > > at > > > com.ogoglio.viewer.j3d.J3DRenderer.createUserRenderable(J3DRenderer.java:6 > 57) > > at > com.ogoglio.viewer.j3d.J3DRenderer.access$700(J3DRenderer.java:71) > > at > > > com.ogoglio.viewer.j3d.J3DRenderer$SpaceListener.userAdded(J3DRenderer.jav > a:394) > > at com.ogoglio.client.model.Space.addListener(Space.java:126) > > at > com.ogoglio.viewer.j3d.J3DRenderer$1.run(J3DRenderer.java:236) > > > > > > > > > -----Original Message----- > > > From: ogo...@li... > [mailto:ogoglio- > > > dev...@li...] On Behalf Of Trevor F. Smith > > > Sent: Friday, July 13, 2007 2:05 AM > > > To: ogo...@li... > > > Subject: Re: [Ogoglio-developers] rendering problem? > > > > > > Hey, Gal. > > > > > > The question mark model is used when the client either can't get the > > > obj data or can't parse the data it gets. You can manually check that > > > the obj data is being served by opening the following URL in firefox: > > > > > > http://<host and port>/og/account/<username>/template/<template > > > id>/geometry/data/0 > > > > > > For example: > > > http://example.com:8080/og/account/library/template/1/geometry/data/0 > > > > > > If you get a 404, then the server can't find the template data, either > > > because it wasn't uploaded or it wasn't stored. Double check that the > > > obj file that you uploaded is in your media directory in a file named > > > templateGeometry-<template id>-0, for example templateGeometry-1-0 for > > > template 1. > > > > > > If you don't get a 404 and you do get the obj data when you hit the > > > URL, then I'm not sure what's going on. Try debugging (or adding some > > > println's to) the SpaceClient to check that it's getting the data. > > > > > > For what it's worth, using the current trunk I just created a template > > > and loaded defaultLand.obj and defaultLand.mtl into a template and > > > they rendered in a space. So, it could be a local change you've made. > > > Double check that in the template editor UI you're uploading the obj > > > into the "lod 0 .obj" field and the mtl file into the "resource" > > > field. > > > > > > - Trevor > > > > > > On 7/12/07, Gal Nitzan <gal...@gm...> wrote: > > > > Hi Trevor, > > > > > > > > I seem to have some problem with rendering. > > > > > > > > I create a space and add the "Default Land".obj and mtl. > > > > > > > > When I enter the space I get a question mark. > > > > > > > > Any idea what I'm doing wrong? > > > > > > > > Thanks, > > > > > > > > Gal. > > > > > > > > > > > > > > > > -------------------------------------------------------------------- > ---- > > > - > > > > This SF.net email is sponsored by DB2 Express > > > > Download DB2 Express C - the FREE version of DB2 express and take > > > > control of your XML. No limits. Just data. Click to get it now. > > > > http://sourceforge.net/powerbar/db2/ > > > > _______________________________________________ > > > > Ogoglio-developers mailing list > > > > Ogo...@li... > > > > https://lists.sourceforge.net/lists/listinfo/ogoglio-developers > > > > > > > > > > ---------------------------------------------------------------------- > --- > > > This SF.net email is sponsored by DB2 Express > > > Download DB2 Express C - the FREE version of DB2 express and take > > > control of your XML. No limits. Just data. Click to get it now. > > > http://sourceforge.net/powerbar/db2/ > > > _______________________________________________ > > > Ogoglio-developers mailing list > > > Ogo...@li... > > > https://lists.sourceforge.net/lists/listinfo/ogoglio-developers > > > > > > > > ------------------------------------------------------------------------ > - > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > _______________________________________________ > > Ogoglio-developers mailing list > > Ogo...@li... > > https://lists.sourceforge.net/lists/listinfo/ogoglio-developers > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Ogoglio-developers mailing list > Ogo...@li... > https://lists.sourceforge.net/lists/listinfo/ogoglio-developers |
|
From: Trevor F. S. <tr...@tr...> - 2007-07-13 16:48:59
|
Hey, Gal. Please put a println in J3DRenderer.SpaceListener.userAdded(...) to see if you're getting the same user added more than once. Thanks, - Trevor On 7/13/07, Gal Nitzan <gal...@gm...> wrote: > One more issue :( > > This exception shows up on the plugin console: > > Adding Default Land > Exception in thread "Thread-37" javax.media.j3d.MultipleParentException: > Group.addChild: child already has a parent > at javax.media.j3d.GroupRetained.checkValidChild(GroupRetained.java:452) > at javax.media.j3d.GroupRetained.addChild(GroupRetained.java:461) > at javax.media.j3d.Group.addChild(Group.java:271) > at > com.ogoglio.viewer.j3d.J3DUserRenderable.setCamera(J3DUserRenderable.java:206) > at > com.ogoglio.viewer.j3d.J3DRenderer.createUserRenderable(J3DRenderer.java:657) > at com.ogoglio.viewer.j3d.J3DRenderer.access$700(J3DRenderer.java:71) > at > com.ogoglio.viewer.j3d.J3DRenderer$SpaceListener.userAdded(J3DRenderer.java:394) > at com.ogoglio.client.model.Space.addListener(Space.java:126) > at com.ogoglio.viewer.j3d.J3DRenderer$1.run(J3DRenderer.java:236) > > > > > -----Original Message----- > > From: ogo...@li... [mailto:ogoglio- > > dev...@li...] On Behalf Of Trevor F. Smith > > Sent: Friday, July 13, 2007 2:05 AM > > To: ogo...@li... > > Subject: Re: [Ogoglio-developers] rendering problem? > > > > Hey, Gal. > > > > The question mark model is used when the client either can't get the > > obj data or can't parse the data it gets. You can manually check that > > the obj data is being served by opening the following URL in firefox: > > > > http://<host and port>/og/account/<username>/template/<template > > id>/geometry/data/0 > > > > For example: > > http://example.com:8080/og/account/library/template/1/geometry/data/0 > > > > If you get a 404, then the server can't find the template data, either > > because it wasn't uploaded or it wasn't stored. Double check that the > > obj file that you uploaded is in your media directory in a file named > > templateGeometry-<template id>-0, for example templateGeometry-1-0 for > > template 1. > > > > If you don't get a 404 and you do get the obj data when you hit the > > URL, then I'm not sure what's going on. Try debugging (or adding some > > println's to) the SpaceClient to check that it's getting the data. > > > > For what it's worth, using the current trunk I just created a template > > and loaded defaultLand.obj and defaultLand.mtl into a template and > > they rendered in a space. So, it could be a local change you've made. > > Double check that in the template editor UI you're uploading the obj > > into the "lod 0 .obj" field and the mtl file into the "resource" > > field. > > > > - Trevor > > > > On 7/12/07, Gal Nitzan <gal...@gm...> wrote: > > > Hi Trevor, > > > > > > I seem to have some problem with rendering. > > > > > > I create a space and add the "Default Land".obj and mtl. > > > > > > When I enter the space I get a question mark. > > > > > > Any idea what I'm doing wrong? > > > > > > Thanks, > > > > > > Gal. > > > > > > > > > > > > ------------------------------------------------------------------------ > > - > > > This SF.net email is sponsored by DB2 Express > > > Download DB2 Express C - the FREE version of DB2 express and take > > > control of your XML. No limits. Just data. Click to get it now. > > > http://sourceforge.net/powerbar/db2/ > > > _______________________________________________ > > > Ogoglio-developers mailing list > > > Ogo...@li... > > > https://lists.sourceforge.net/lists/listinfo/ogoglio-developers > > > > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > _______________________________________________ > > Ogoglio-developers mailing list > > Ogo...@li... > > https://lists.sourceforge.net/lists/listinfo/ogoglio-developers > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Ogoglio-developers mailing list > Ogo...@li... > https://lists.sourceforge.net/lists/listinfo/ogoglio-developers > |
|
From: Trevor F. S. <tr...@tr...> - 2007-07-13 16:46:26
|
You don't want to disable gzip compression completely, because obj
models are quite large if they're not compressed so load times are
slow and bandwidth charges are increased.
The default landscape model uses the Grid.gif as a texture. Did you
upload that to the template or perhaps it's trying to gzip nothing?
On OS X and linux we don't get that far when a template resource
doesn't exist, but perhaps there's something different about XP?
On 7/13/07, Gal Nitzan <gal...@gm...> wrote:
> OK, got the bugger....
>
> It seems that when sending the gif zipped the client throws an exception. For
> now I commented out the lines and peace is back :)
>
> //if ("gzip".equals(request.getHeader("Accept-encoding"))) {
> // response.setHeader("Content-encoding", "gzip");
> // StreamUtils.write(data, new
> GZIPOutputStream(response.getOutputStream()));
> //} else {
> StreamUtils.write(data, response.getOutputStream());
> //}
>
> > -----Original Message-----
> > From: ogo...@li... [mailto:ogoglio-
> > dev...@li...] On Behalf Of Trevor F. Smith
> > Sent: Friday, July 13, 2007 2:05 AM
> > To: ogo...@li...
> > Subject: Re: [Ogoglio-developers] rendering problem?
> >
> > Hey, Gal.
> >
> > The question mark model is used when the client either can't get the
> > obj data or can't parse the data it gets. You can manually check that
> > the obj data is being served by opening the following URL in firefox:
> >
> > http://<host and port>/og/account/<username>/template/<template
> > id>/geometry/data/0
> >
> > For example:
> > http://example.com:8080/og/account/library/template/1/geometry/data/0
> >
> > If you get a 404, then the server can't find the template data, either
> > because it wasn't uploaded or it wasn't stored. Double check that the
> > obj file that you uploaded is in your media directory in a file named
> > templateGeometry-<template id>-0, for example templateGeometry-1-0 for
> > template 1.
> >
> > If you don't get a 404 and you do get the obj data when you hit the
> > URL, then I'm not sure what's going on. Try debugging (or adding some
> > println's to) the SpaceClient to check that it's getting the data.
> >
> > For what it's worth, using the current trunk I just created a template
> > and loaded defaultLand.obj and defaultLand.mtl into a template and
> > they rendered in a space. So, it could be a local change you've made.
> > Double check that in the template editor UI you're uploading the obj
> > into the "lod 0 .obj" field and the mtl file into the "resource"
> > field.
> >
> > - Trevor
> >
> > On 7/12/07, Gal Nitzan <gal...@gm...> wrote:
> > > Hi Trevor,
> > >
> > > I seem to have some problem with rendering.
> > >
> > > I create a space and add the "Default Land".obj and mtl.
> > >
> > > When I enter the space I get a question mark.
> > >
> > > Any idea what I'm doing wrong?
> > >
> > > Thanks,
> > >
> > > Gal.
> > >
> > >
> > >
> > > ------------------------------------------------------------------------
> > -
> > > This SF.net email is sponsored by DB2 Express
> > > Download DB2 Express C - the FREE version of DB2 express and take
> > > control of your XML. No limits. Just data. Click to get it now.
> > > http://sourceforge.net/powerbar/db2/
> > > _______________________________________________
> > > Ogoglio-developers mailing list
> > > Ogo...@li...
> > > https://lists.sourceforge.net/lists/listinfo/ogoglio-developers
> > >
> >
> > -------------------------------------------------------------------------
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > _______________________________________________
> > Ogoglio-developers mailing list
> > Ogo...@li...
> > https://lists.sourceforge.net/lists/listinfo/ogoglio-developers
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Ogoglio-developers mailing list
> Ogo...@li...
> https://lists.sourceforge.net/lists/listinfo/ogoglio-developers
>
|
|
From: Gal N. <gal...@gm...> - 2007-07-13 16:28:46
|
One more issue :( This exception shows up on the plugin console: Adding Default Land Exception in thread "Thread-37" javax.media.j3d.MultipleParentException: Group.addChild: child already has a parent at javax.media.j3d.GroupRetained.checkValidChild(GroupRetained.java:452) at javax.media.j3d.GroupRetained.addChild(GroupRetained.java:461) at javax.media.j3d.Group.addChild(Group.java:271) at com.ogoglio.viewer.j3d.J3DUserRenderable.setCamera(J3DUserRenderable.java:206) at com.ogoglio.viewer.j3d.J3DRenderer.createUserRenderable(J3DRenderer.java:657) at com.ogoglio.viewer.j3d.J3DRenderer.access$700(J3DRenderer.java:71) at com.ogoglio.viewer.j3d.J3DRenderer$SpaceListener.userAdded(J3DRenderer.java:394) at com.ogoglio.client.model.Space.addListener(Space.java:126) at com.ogoglio.viewer.j3d.J3DRenderer$1.run(J3DRenderer.java:236) > -----Original Message----- > From: ogo...@li... [mailto:ogoglio- > dev...@li...] On Behalf Of Trevor F. Smith > Sent: Friday, July 13, 2007 2:05 AM > To: ogo...@li... > Subject: Re: [Ogoglio-developers] rendering problem? > > Hey, Gal. > > The question mark model is used when the client either can't get the > obj data or can't parse the data it gets. You can manually check that > the obj data is being served by opening the following URL in firefox: > > http://<host and port>/og/account/<username>/template/<template > id>/geometry/data/0 > > For example: > http://example.com:8080/og/account/library/template/1/geometry/data/0 > > If you get a 404, then the server can't find the template data, either > because it wasn't uploaded or it wasn't stored. Double check that the > obj file that you uploaded is in your media directory in a file named > templateGeometry-<template id>-0, for example templateGeometry-1-0 for > template 1. > > If you don't get a 404 and you do get the obj data when you hit the > URL, then I'm not sure what's going on. Try debugging (or adding some > println's to) the SpaceClient to check that it's getting the data. > > For what it's worth, using the current trunk I just created a template > and loaded defaultLand.obj and defaultLand.mtl into a template and > they rendered in a space. So, it could be a local change you've made. > Double check that in the template editor UI you're uploading the obj > into the "lod 0 .obj" field and the mtl file into the "resource" > field. > > - Trevor > > On 7/12/07, Gal Nitzan <gal...@gm...> wrote: > > Hi Trevor, > > > > I seem to have some problem with rendering. > > > > I create a space and add the "Default Land".obj and mtl. > > > > When I enter the space I get a question mark. > > > > Any idea what I'm doing wrong? > > > > Thanks, > > > > Gal. > > > > > > > > ------------------------------------------------------------------------ > - > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > _______________________________________________ > > Ogoglio-developers mailing list > > Ogo...@li... > > https://lists.sourceforge.net/lists/listinfo/ogoglio-developers > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Ogoglio-developers mailing list > Ogo...@li... > https://lists.sourceforge.net/lists/listinfo/ogoglio-developers |
|
From: Gal N. <gal...@gm...> - 2007-07-13 16:19:15
|
OK, got the bugger....
It seems that when sending the gif zipped the client throws an exception. For
now I commented out the lines and peace is back :)
//if ("gzip".equals(request.getHeader("Accept-encoding"))) {
// response.setHeader("Content-encoding", "gzip");
// StreamUtils.write(data, new
GZIPOutputStream(response.getOutputStream()));
//} else {
StreamUtils.write(data, response.getOutputStream());
//}
> -----Original Message-----
> From: ogo...@li... [mailto:ogoglio-
> dev...@li...] On Behalf Of Trevor F. Smith
> Sent: Friday, July 13, 2007 2:05 AM
> To: ogo...@li...
> Subject: Re: [Ogoglio-developers] rendering problem?
>
> Hey, Gal.
>
> The question mark model is used when the client either can't get the
> obj data or can't parse the data it gets. You can manually check that
> the obj data is being served by opening the following URL in firefox:
>
> http://<host and port>/og/account/<username>/template/<template
> id>/geometry/data/0
>
> For example:
> http://example.com:8080/og/account/library/template/1/geometry/data/0
>
> If you get a 404, then the server can't find the template data, either
> because it wasn't uploaded or it wasn't stored. Double check that the
> obj file that you uploaded is in your media directory in a file named
> templateGeometry-<template id>-0, for example templateGeometry-1-0 for
> template 1.
>
> If you don't get a 404 and you do get the obj data when you hit the
> URL, then I'm not sure what's going on. Try debugging (or adding some
> println's to) the SpaceClient to check that it's getting the data.
>
> For what it's worth, using the current trunk I just created a template
> and loaded defaultLand.obj and defaultLand.mtl into a template and
> they rendered in a space. So, it could be a local change you've made.
> Double check that in the template editor UI you're uploading the obj
> into the "lod 0 .obj" field and the mtl file into the "resource"
> field.
>
> - Trevor
>
> On 7/12/07, Gal Nitzan <gal...@gm...> wrote:
> > Hi Trevor,
> >
> > I seem to have some problem with rendering.
> >
> > I create a space and add the "Default Land".obj and mtl.
> >
> > When I enter the space I get a question mark.
> >
> > Any idea what I'm doing wrong?
> >
> > Thanks,
> >
> > Gal.
> >
> >
> >
> > ------------------------------------------------------------------------
> -
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > _______________________________________________
> > Ogoglio-developers mailing list
> > Ogo...@li...
> > https://lists.sourceforge.net/lists/listinfo/ogoglio-developers
> >
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Ogoglio-developers mailing list
> Ogo...@li...
> https://lists.sourceforge.net/lists/listinfo/ogoglio-developers
|
|
From: Trevor F. S. <tr...@tr...> - 2007-07-12 23:05:54
|
Hey, Gal. The question mark model is used when the client either can't get the obj data or can't parse the data it gets. You can manually check that the obj data is being served by opening the following URL in firefox: http://<host and port>/og/account/<username>/template/<template id>/geometry/data/0 For example: http://example.com:8080/og/account/library/template/1/geometry/data/0 If you get a 404, then the server can't find the template data, either because it wasn't uploaded or it wasn't stored. Double check that the obj file that you uploaded is in your media directory in a file named templateGeometry-<template id>-0, for example templateGeometry-1-0 for template 1. If you don't get a 404 and you do get the obj data when you hit the URL, then I'm not sure what's going on. Try debugging (or adding some println's to) the SpaceClient to check that it's getting the data. For what it's worth, using the current trunk I just created a template and loaded defaultLand.obj and defaultLand.mtl into a template and they rendered in a space. So, it could be a local change you've made. Double check that in the template editor UI you're uploading the obj into the "lod 0 .obj" field and the mtl file into the "resource" field. - Trevor On 7/12/07, Gal Nitzan <gal...@gm...> wrote: > Hi Trevor, > > I seem to have some problem with rendering. > > I create a space and add the "Default Land".obj and mtl. > > When I enter the space I get a question mark. > > Any idea what I'm doing wrong? > > Thanks, > > Gal. > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Ogoglio-developers mailing list > Ogo...@li... > https://lists.sourceforge.net/lists/listinfo/ogoglio-developers > |
|
From: Gal N. <gal...@gm...> - 2007-07-12 20:52:46
|
Hi Trevor, I seem to have some problem with rendering. I create a space and add the "Default Land".obj and mtl. When I enter the space I get a question mark. Any idea what I'm doing wrong? Thanks, Gal. |
|
From: Trevor F. S. <tr...@tr...> - 2007-07-11 21:51:26
|
Hey, folks. I just replaced the old boxy avatar with one from the Open Croquet project which they call "Mike". I haven't rigged or animated him yet, but he has a nice texture. This is a temporary model until we add a more complete and customizable avatar system, but in the mean time the new avatar is a good example of the power of open standards helping multiple projects. The Blend, texture, and obj files for the new avatar are checked into art/Mike/ - Trevor |
|
From: Gal N. <gal...@gm...> - 2007-07-11 19:36:20
|
Hi Trevor, > -----Original Message----- > From: ogo...@li... [mailto:ogoglio- > dev...@li...] On Behalf Of Trevor F. Smith > Sent: Wednesday, July 11, 2007 8:20 PM > To: ogo...@li... > Subject: Re: [Ogoglio-developers] [Ogoglio-commits] SF.net SVN: > ogoglio:[224] spaces/trunk/src/com/ogoglio > > Hey, Gal. > > On 7/11/07, Gal Nitzan <gal...@gm...> wrote: > > Thanks for adding the patches... I still need to figure out what goes > where > > :) and how. > > Indeed, there are a lot of moving parts despite my best efforts to > pare it down to the basics. [Gal Nitzan] Until everything is in its place :) > > > In regards to using log4j I believe it to be a better solution than > using > > System.out/err, since we can benefit from the logging levels, changing > > logging level at runtime, code guards etc. > > After using it for several projects I've found that log4j is usually > overkill, code verbose, and misused. The line between debug, warning, > and info aren't at all clear and in general it takes futzing to use > properly. My tactic is to only check in println's for the information > we'd want in the server log for a production machine. During debug > we just use a debugger or add and remove println's as they're needed. > > In addition, log4j is another moving part with its own config file and > API. See my first comment about trying to pare down to the basics. > :-) [Gal Nitzan] Well I'm familiar with the debate logging vs. println :-) fine by me either way. > > > In regards to the space delete issue, I think it make more sense to put > the > > DELETE in the AccountServlet and not in the SpaceServlet. The reason is > that > > since spaces are created in the AccountServlet it would make more sense > to > > delete it in the same place i.e. AccountServlet. Also, since > SpaceServlet > > manages the space's inner data only, I think it is better that the > creation > > and deletion of space stays in the level of the account. > > You make a valid point about my questionable decision to separate POST > and DELETE for space creation and deletion. After looking at the > options I think it makes more sense to move space creation over to > SpaceServlet (where deletion is now) and make the > /og/account/username/space/ resource be a read-only list of an > account's spaces. [Gal Nitzan] Great, it is even a better choice than mine. A good problem domain separation :). > > I'll try to get to that today. [Gal Nitzan] Thanks, Gal > > - Trevor > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Ogoglio-developers mailing list > Ogo...@li... > https://lists.sourceforge.net/lists/listinfo/ogoglio-developers |
|
From: Trevor F. S. <tr...@tr...> - 2007-07-11 17:20:16
|
Hey, Gal. On 7/11/07, Gal Nitzan <gal...@gm...> wrote: > Thanks for adding the patches... I still need to figure out what goes where > :) and how. Indeed, there are a lot of moving parts despite my best efforts to pare it down to the basics. > In regards to using log4j I believe it to be a better solution than using > System.out/err, since we can benefit from the logging levels, changing > logging level at runtime, code guards etc. After using it for several projects I've found that log4j is usually overkill, code verbose, and misused. The line between debug, warning, and info aren't at all clear and in general it takes futzing to use properly. My tactic is to only check in println's for the information we'd want in the server log for a production machine. During debug we just use a debugger or add and remove println's as they're needed. In addition, log4j is another moving part with its own config file and API. See my first comment about trying to pare down to the basics. :-) > In regards to the space delete issue, I think it make more sense to put the > DELETE in the AccountServlet and not in the SpaceServlet. The reason is that > since spaces are created in the AccountServlet it would make more sense to > delete it in the same place i.e. AccountServlet. Also, since SpaceServlet > manages the space's inner data only, I think it is better that the creation > and deletion of space stays in the level of the account. You make a valid point about my questionable decision to separate POST and DELETE for space creation and deletion. After looking at the options I think it makes more sense to move space creation over to SpaceServlet (where deletion is now) and make the /og/account/username/space/ resource be a read-only list of an account's spaces. I'll try to get to that today. - Trevor |
|
From: Gal N. <gal...@gm...> - 2007-07-11 14:21:15
|
Hi Trevor, Thanks for adding the patches... I still need to figure out what goes where :) and how. In regards to using log4j I believe it to be a better solution than using System.out/err, since we can benefit from the logging levels, changing logging level at runtime, code guards etc. Just as an example, "System.out.println(new Date() + ": Deleted space: " + spaceID);" Why would I want to have this line in the logs when the system is stable? It can help me debugging the system but not more than that. If we used log4j I might have marked this message as info level and usually I would run the system at warn level... In regards to the space delete issue, I think it make more sense to put the DELETE in the AccountServlet and not in the SpaceServlet. The reason is that since spaces are created in the AccountServlet it would make more sense to delete it in the same place i.e. AccountServlet. Also, since SpaceServlet manages the space's inner data only, I think it is better that the creation and deletion of space stays in the level of the account. Gal. |
|
From: Gal N. <gal...@gm...> - 2007-07-11 13:57:07
|
Hi Trevor, Thanks for adding the patches... I still need to figure out what goes where :) and how. In regards to using log4j I believe it to be a better solution than using System.out/err, since we can benefit from the logging levels, changing logging level at runtime, code guards etc. Just as an example, "System.out.println(new Date() + ": Deleted space: " + spaceID);" Why would I want to have this line in the logs when the system is stable? It can help me debugging the system but not more than that. If we used log4j I might have marked this message as info level and usually I would run the system at warn level... In regards to the space delete issue, I think it make more sense to put the DELETE in the AccountServlet and not in the SpaceServlet. The reason is that since spaces are created in the AccountServlet it would make more sense to delete it in the same place i.e. AccountServlet. Also, since SpaceServlet manages the space's inner data only, I think it is better that the creation and deletion of space stays in the level of the account. Gal. On 7/10/07, tre...@us... < tre...@us...> wrote: > > Revision: 224 > http://ogoglio.svn.sourceforge.net/ogoglio/?rev=224&view=rev > Author: trevorolio > Date: 2007-07-10 13:03:06 -0700 (Tue, 10 Jul 2007) > > Log Message: > ----------- > Implemented space deletion, based in part on Gal's patch. > > Modified Paths: > -------------- > spaces/trunk/src/com/ogoglio/client/ClientTests.java > spaces/trunk/src/com/ogoglio/client/WebAPIClient.java > spaces/trunk/src/com/ogoglio/persist/SpacePersistTasks.java > spaces/trunk/src/com/ogoglio/sim/Sim.java > spaces/trunk/src/com/ogoglio/sim/SpaceSimulator.java > spaces/trunk/src/com/ogoglio/sim/site/SimServlet.java > spaces/trunk/src/com/ogoglio/site/AccountServlet.java > spaces/trunk/src/com/ogoglio/site/SpaceServlet.java > > Modified: spaces/trunk/src/com/ogoglio/client/ClientTests.java > =================================================================== > --- spaces/trunk/src/com/ogoglio/client/ClientTests.java 2007-07-10 > 18:13:02 UTC (rev 223) > +++ spaces/trunk/src/com/ogoglio/client/ClientTests.java 2007-07-10 > 20:03:06 UTC (rev 224) > @@ -374,10 +374,6 @@ > thingDocs = webClient1.getThingDocuments(); > assertEquals(0, thingDocs.length); > > - webClient1.deletePossession(possDoc.getPossessionID()); > - possDocs = webClient1.getPossessionDocuments(USERNAME1); > - assertEquals(numPossessions, possDocs.length); > - > String guestCookie1 = WebAPIClient.requestGuestCookie > (serviceURI1); > assertNotNull(guestCookie1); > try { > @@ -402,6 +398,22 @@ > assertEquals(2, userDocs.length); > assertTrue(guestCookie1.equals(userDocs[1].getUsername()) || > guestCookie1.equals(userDocs[0].getUsername())); > > + possDoc = webClient1.addPossessionToSpace(possDocs[numPossessions].getPossessionID(), > spaceDocument.getSpaceID()); > + assertNotNull(possDoc); > + try { > + Thread.sleep(100); > + } catch (Exception e) { > + } > + thingDocs = webClient1.getThingDocuments(); > + assertEquals(1, thingDocs.length); > + assertTrue(webClient1.deleteSpace()); > + possDoc = webClient1.getPossessionDocuments( > possDoc.getOwnerUsername())[0]; > + assertEquals(-1, possDoc.getSpaceID()); > + assertEquals(-1, possDoc.getThingID()); > + > + webClient1.deletePossession(possDoc.getPossessionID()); > + possDocs = webClient1.getPossessionDocuments(USERNAME1); > + assertEquals(numPossessions, possDocs.length); > } catch (IOException e) { > e.printStackTrace(); > fail(); > > Modified: spaces/trunk/src/com/ogoglio/client/WebAPIClient.java > =================================================================== > --- spaces/trunk/src/com/ogoglio/client/WebAPIClient.java 2007-07-10 > 18:13:02 UTC (rev 223) > +++ spaces/trunk/src/com/ogoglio/client/WebAPIClient.java 2007-07-10 > 20:03:06 UTC (rev 224) > @@ -118,6 +118,10 @@ > return new SpaceDocument(result); > } > > + public boolean deleteSpace() throws IOException { > + return sendDelete(getSpaceURI(), authCookie); > + } > + > public static AccountDocument updateAccount(URI serviceURI, String > authCookie, AccountDocument accountDoc) throws IOException { > XMLElement result = sendAuthenticatedXML(WebAPIUtil.appendToURI(serviceURI, > "account/" + accountDoc.getUsername()), accountDoc.toElement().toString(), > "POST", authCookie); > if (result == null) { > > Modified: spaces/trunk/src/com/ogoglio/persist/SpacePersistTasks.java > =================================================================== > --- spaces/trunk/src/com/ogoglio/persist/SpacePersistTasks.java 2007-07-10 > 18:13:02 UTC (rev 223) > +++ spaces/trunk/src/com/ogoglio/persist/SpacePersistTasks.java 2007-07-10 > 20:03:06 UTC (rev 224) > @@ -56,16 +56,16 @@ > record.setPublished(spaceDocument.isPublished()); > } > > - if(spaceDocument.getDisplaySea() != record.getDisplaySea()) > { > + if (spaceDocument.getDisplaySea() != record.getDisplaySea()) > { > dirty = true; > record.setDisplaySea(spaceDocument.getDisplaySea()); > } > - > + > if (Math.abs(spaceDocument.getSeaLevel() - > record.getSeaLevel()) > 0.0001) { > dirty = true; > record.setSeaLevel(spaceDocument.getSeaLevel()); > } > - > + > if (dirty) { > hibernateSession.update(record); > } > @@ -165,6 +165,26 @@ > return (SpaceRecord) task.execute(); > } > > + public static boolean deleteSpace(final SpaceRecord record, > SessionFactory sessionFactory) throws PersistException { > + HibernateTask task = new HibernateTask() { > + public Object run(Session session) throws PersistException { > + Query possQuery = session.getNamedQuery( > PossessionPersistTasks.POSSESSIONS_BY_SPACE_ID); > + possQuery.setLong("spaceID", record.getSpaceID()); > + PossessionRecord[] possessionRecords = > (PossessionRecord[])possQuery.list().toArray(new PossessionRecord[0]); > + for (int i = 0; i < possessionRecords.length; i++) { > + possessionRecords[i].setSpaceID(-1); > + possessionRecords[i].setThingID(-1); > + session.update(possessionRecords[i]); > + } > + session.delete(record); > + return Boolean.TRUE; > + } > + }; > + > + task.setSessionFactory(sessionFactory); > + return Boolean.TRUE == task.execute(); > + } > + > public static boolean delete(final SpaceMemberRecord memberRec, > SessionFactory sessionFactory) throws PersistException { > HibernateTask task = new HibernateTask() { > public Object run(Session hibernateSession) { > @@ -195,10 +215,10 @@ > return Boolean.TRUE; > } > > - if(!space.isPublished()) { > + if (!space.isPublished()) { > return Boolean.FALSE; > } > - > + > Query membersQuery = hibernateSession.getNamedQuery( > SpaceMemberPersistTasks.SPACE_MEMBERS_BY_SPACE_ID); > membersQuery.setLong("spaceID", spaceID); > SpaceMemberRecord[] members = (SpaceMemberRecord[]) > membersQuery.list().toArray(new SpaceMemberRecord[0]); > @@ -210,7 +230,7 @@ > } > } > > - return space.isPublished() && space.getMaxGuests() > 0 ? > Boolean.TRUE: Boolean.FALSE; > + return space.isPublished() && space.getMaxGuests() > 0 ? > Boolean.TRUE : Boolean.FALSE; > } > }; > task.setSessionFactory(sessionFactory); > > Modified: spaces/trunk/src/com/ogoglio/sim/Sim.java > =================================================================== > --- spaces/trunk/src/com/ogoglio/sim/Sim.java 2007-07-10 18:13:02 UTC > (rev 223) > +++ spaces/trunk/src/com/ogoglio/sim/Sim.java 2007-07-10 20:03:06 UTC > (rev 224) > @@ -22,6 +22,8 @@ > > import nanoxml.XMLElement; > > +import org.apache.commons.logging.Log; > +import org.apache.commons.logging.LogFactory; > import org.hibernate.SessionFactory; > > import com.ogoglio.media.MediaService; > @@ -40,7 +42,6 @@ > import com.ogoglio.xml.TemplateDocument; > > public class Sim { > - > public static final long MAX_GEOMETRY_SIZE = 1048576; > > public static final long MAX_GEOMETRY_RESOURCE_SIZE = 1048576; > @@ -165,7 +166,10 @@ > > public void requestSave(SpaceSimulator simulator) { > try { > - saveSpaceDocument(simulator.toSpaceDocument()); > + if (!simulator.getDeleted()) { > + saveSpaceDocument(simulator.toSpaceDocument()); > + return; > + } > } catch (IOException e) { > e.printStackTrace(); > } > @@ -205,7 +209,8 @@ > } > } > > - private boolean shutdownSpaceSim(long spaceID) { > + // TODO is there a better way to shutdown this sim ? > + public boolean shutdownSpaceSim(long spaceID) { > try { > SpaceRecord record = SpacePersistTasks.findSpaceBySpaceID(spaceID, > sessionFactory); > if (record == null) { > @@ -219,6 +224,7 @@ > } > return false; > } > + > record.setSimID(-1); > SpacePersistTasks.update(record, sessionFactory); > SpaceSimulator spaceSim = null; > @@ -245,31 +251,32 @@ > } > > public SpaceSimulator getOrCreateSpaceSimulator(SpaceRecord record) { > - SpaceSimulator simulator = null; > synchronized (spaceSimulators) { > - simulator = (SpaceSimulator) spaceSimulators.getForward(new > Long(record.getSpaceID())); > - if (simulator == null) { > - SpaceDocument spaceDoc = null; > - try { > - spaceDoc = getSpaceDocument(record.getSpaceID()); > - } catch (IOException e) { > - } > - if (spaceDoc == null) { > - spaceDoc = new SpaceDocument(record); > - } else { > - spaceDoc.setDisplayName(record.getDisplayName()); > - spaceDoc.setMaxGuests(record.getMaxGuests()); > - spaceDoc.setSimID(record.getSimID()); > - spaceDoc.setPublished(record.isPublished()); > - } > + SpaceSimulator simulator = (SpaceSimulator) > spaceSimulators.getForward(new Long(record.getSpaceID())); > + if (simulator != null) { > + return simulator; > + } > > - simulator = new SpaceSimulator(spaceDoc, > spaceSimulatorListener); > - spaceSimulators.put(new Long(record.getSpaceID()), > simulator); > - simulator.startSim(); > - System.out.println(new Date() + ": Starting space sim " + > record.getSpaceID() + ": " + record.getDisplayName()); > + SpaceDocument spaceDoc = null; > + try { > + spaceDoc = getSpaceDocument(record.getSpaceID()); > + } catch (IOException e) { > } > + if (spaceDoc == null) { > + spaceDoc = new SpaceDocument(record); > + } else { > + spaceDoc.setDisplayName(record.getDisplayName()); > + spaceDoc.setMaxGuests(record.getMaxGuests()); > + spaceDoc.setSimID(record.getSimID()); > + spaceDoc.setPublished(record.isPublished()); > + } > + > + simulator = new SpaceSimulator(spaceDoc, > spaceSimulatorListener); > + spaceSimulators.put(new Long(record.getSpaceID()), > simulator); > + simulator.startSim(); > + System.out.println(new Date() + ": Starting space sim " + > record.getSpaceID() + ": " + record.getDisplayName()); > + return simulator; > } > - return simulator; > } > > private void saveSpaceDocument(SpaceDocument doc) throws IOException > { > > Modified: spaces/trunk/src/com/ogoglio/sim/SpaceSimulator.java > =================================================================== > --- spaces/trunk/src/com/ogoglio/sim/SpaceSimulator.java 2007-07-10 > 18:13:02 UTC (rev 223) > +++ spaces/trunk/src/com/ogoglio/sim/SpaceSimulator.java 2007-07-10 > 20:03:06 UTC (rev 224) > @@ -26,6 +26,9 @@ > import javax.vecmath.Point3d; > import javax.vecmath.Vector3d; > > +import org.apache.commons.logging.Log; > +import org.apache.commons.logging.LogFactory; > + > import com.ogoglio.client.UserInputListener; > import com.ogoglio.client.model.Door; > import com.ogoglio.client.model.GeometryProvider; > @@ -64,7 +67,7 @@ > private SpaceScriptEngine scriptEngine = null; > > private long lastLogoutTime = System.currentTimeMillis(); > - > + > //TODO stop shoving the log into memory > private Vector log = new Vector(); > > @@ -73,7 +76,10 @@ > private J3DRenderer renderer = null; > > private HashMap settings = new HashMap(); > - > + > + // a flag that mark this simulator to be deleted after it will be > shutdown > + private boolean deleted = false; > + > public SpaceSimulator(SpaceDocument spaceDocument, Listener listener) > { > ArgumentUtils.assertNotNull(listener); > this.listener = listener; > @@ -99,14 +105,14 @@ > for (int i = 0; i < settingDocs.length; i++) { > settings.put(settingDocs[i].getKey(), > settingDocs[i].getValue()); > } > - > + > DoorDocument[] doorDocs = spaceDocument.getDoorDocuments(); > for (int i = 0; i < doorDocs.length; i++) { > Template template = new Template(listener.getTemplateDocument > (doorDocs[i].getTemplateID())); > space.addTemplate(template); > space.addDoor(new Door(space, template, doorDocs[i])); > } > - > + > scriptEngine = new SpaceScriptEngine(this); > //TODO construct the space script > } > @@ -114,12 +120,12 @@ > public Listener getListener() { > return listener; > } > - > + > public interface Listener { > public void generatedSpaceEvent(SpaceEvent event, SpaceSimulator > spaceSimulator); > > public void generatedSpaceEventForUser(String username, > SpaceEvent event, SpaceSimulator spaceSimulator); > - > + > public TemplateDocument getTemplateDocument(long templateID); > > public String getTemplateScript(long templateID); > @@ -198,12 +204,14 @@ > if (cleaned) { > return; > } > - System.out.println(new Date() + ": Stopping " + > space.getSpaceID() + ": " + space.getDisplayName()); > + System.out.println(new Date() + ": Stopping" + (deleted ? " > deleted" : "") + " space " + space.getSpaceID() + ": " + > space.getDisplayName()); > cleaned = true; > renderer.stopRenderer(); > scriptEngine.cleanup(); > simThread.queue.close(); > - listener.requestSave(this); > + if (!deleted) { > + listener.requestSave(this); > + } > } catch (Throwable e) { > e.printStackTrace(); > } > @@ -224,7 +232,7 @@ > super("SimThread"); > setDaemon(true); > } > - > + > public void run() { > while (!cleaned) { > try { > @@ -280,7 +288,7 @@ > > } else if (SpaceEvent.SHAPE_START_MOTION_EVENT.equals > (event.getName())) { > String shapeName = event.getStringProperty( > SpaceEvent.SHAPE_NAME); > - if(shapeName == null) { > + if (shapeName == null) { > log("Tried to move a shape with no name " + > event); > continue; > } > @@ -300,7 +308,7 @@ > > } else if (SpaceEvent.SHAPE_STOP_MOTION_EVENT.equals( > event.getName())) { > String shapeName = event.getStringProperty( > SpaceEvent.SHAPE_NAME); > - if(shapeName == null) { > + if (shapeName == null) { > log("Tried to stop a shape with no name " + > event); > continue; > } > @@ -362,23 +370,23 @@ > } > > String chatMessage = event.getStringProperty( > SpaceEvent.TSE_MESSAGE); > - > + > // this is a hack to play pre-baked animations in > demos > // TODO create a user animation record and a > method to dl and play them > - if("/wave".equals(chatMessage)) { > + if ("/wave".equals(chatMessage)) { > SpaceEvent waveEvent = new SpaceEvent( > SpaceEvent.PLAY_ANIMATION_EVENT); > waveEvent.setProperty(SpaceEvent.USERNAME, > user.getUsername()); > waveEvent.setProperty(SpaceEvent.ANIMATION_ID, > new Long(3)); > listener.generatedSpaceEvent(waveEvent, > SpaceSimulator.this); > continue; > - } else if("/point".equals(chatMessage)) { > + } else if ("/point".equals(chatMessage)) { > SpaceEvent waveEvent = new SpaceEvent( > SpaceEvent.PLAY_ANIMATION_EVENT); > waveEvent.setProperty(SpaceEvent.USERNAME, > user.getUsername()); > waveEvent.setProperty(SpaceEvent.ANIMATION_ID, > new Long(4)); > listener.generatedSpaceEvent(waveEvent, > SpaceSimulator.this); > continue; > } > - > + > chatMessage = markdownChatMessage(chatMessage); > > SpaceEvent markedUpEvent = new SpaceEvent( > SpaceEvent.TEXT_SAY_EVENT); > @@ -405,7 +413,7 @@ > > } else if (SpaceEvent.MESSAGE_BROWSER_EVENT.equals( > event.getName())) { > listener.generatedSpaceEvent(event, > SpaceSimulator.this); > - > + > } else { > System.err.println("Received a space event " + > event.getName() + ", and dropping it on the floor."); > } > @@ -790,29 +798,29 @@ > } > > public long getVacancyTime() { > - if(getUserCount() > 0) { > + if (getUserCount() > 0) { > return 0; > } > return System.currentTimeMillis() - lastLogoutTime; > } > - > + > private class UserCounts { > private HashMap map = new HashMap(); > > public UserCounts() { > } > - > + > synchronized int getTotalUserCount() { > - String[] keys = (String[])map.keySet().toArray(new > String[0]); > + String[] keys = (String[]) map.keySet().toArray(new > String[0]); > int result = 0; > for (int i = 0; i < keys.length; i++) { > - result += ((Integer)map.get(keys[i])).intValue(); > + result += ((Integer) map.get(keys[i])).intValue(); > } > return result; > } > - > + > synchronized void bootUser(String username) { > - while(decrementUserCount(username) > 0) { > + while (decrementUserCount(username) > 0) { > //do nothing > } > } > @@ -847,7 +855,7 @@ > map.remove(username); > User user = space.getUser(username); > if (user == null) { > - System.err.println("Tried to remove a user that > wasn't there: " + username); > + System.out.println("Tried to remove a user that > wasn't there: " + username); > return 0; > } > > @@ -876,7 +884,7 @@ > } > > private static final SimpleDateFormat LOG_DATE_FORMAT = new > SimpleDateFormat("yyyy.MM.dd HH:mm:ss z"); > - > + > public void log(String message) { > if (log.size() > 400) { > log.remove(0); > @@ -895,14 +903,14 @@ > for (int i = 0; i < thingDocs.length; i++) { > spaceDoc.addThingDocument(thingDocs[i]); > } > - > - synchronized(settings) { > - String[] keys = (String[])settings.keySet().toArray(new > String[0]); > + > + synchronized (settings) { > + String[] keys = (String[]) settings.keySet().toArray(new > String[0]); > for (int i = 0; i < keys.length; i++) { > - spaceDoc.addSetting(keys[i], > (String)settings.get(keys[i])); > + spaceDoc.addSetting(keys[i], (String) settings.get > (keys[i])); > } > } > - > + > DoorDocument[] doorDocs = getDoorDocuments(); > for (int i = 0; i < doorDocs.length; i++) { > spaceDoc.addDoorDocument(doorDocs[i]); > @@ -915,6 +923,14 @@ > return space; > } > > + public void setDeleted() { > + this.deleted = true; > + } > + > + public boolean getDeleted() { > + return this.deleted; > + } > + > public ThingDocument thingUpdated(ThingDocument proposedDoc) { > ArgumentUtils.assertNotNull(proposedDoc); > Thing thing = space.getThing(proposedDoc.getThingID()); > @@ -957,34 +973,34 @@ > } > > public Map getSettings() { > - synchronized(settings) { > - return (Map)settings.clone(); > + synchronized (settings) { > + return (Map) settings.clone(); > } > } > > - public String getSetting(String key) { > - if(key == null) { > + public String getSetting(String key) { > + if (key == null) { > return null; > } > - synchronized(settings) { > - return (String)settings.get(key); > + synchronized (settings) { > + return (String) settings.get(key); > } > } > - > + > public void putSetting(String key, String value) { > ArgumentUtils.assertNotEmpty(key); > ArgumentUtils.assertNotEmpty(value); > - synchronized(settings) { > + synchronized (settings) { > settings.put(key, value); > } > } > - > + > public String removeSetting(String key) { > - synchronized(settings) { > - return (String)settings.remove(key); > + synchronized (settings) { > + return (String) settings.remove(key); > } > } > - > + > private class InSimErrorGeometryProvider implements GeometryProvider > { > > public InputStream getAnimationStream(long animationID) throws > IOException { > > Modified: spaces/trunk/src/com/ogoglio/sim/site/SimServlet.java > =================================================================== > --- spaces/trunk/src/com/ogoglio/sim/site/SimServlet.java 2007-07-10 > 18:13:02 UTC (rev 223) > +++ spaces/trunk/src/com/ogoglio/sim/site/SimServlet.java 2007-07-10 > 20:03:06 UTC (rev 224) > @@ -203,6 +203,17 @@ > return; > } > } > + > + public void doDelete(HttpServletRequest request, > HttpServletResponse response, String[] pathElementsauthedAccount) throws > ServletException, IOException { > + long spaceID = Long.parseLong(pathElementsauthedAccount[ > pathElementsauthedAccount.length-1]); > + > + SpaceSimulator spaceSim = sim.getOrCreateSpaceSimulator > (spaceID); > + spaceSim.setDeleted(); > + sim.shutdownSpaceSim(spaceID); > + response.setStatus(HttpServletResponse.SC_OK); > + response.setContentLength(0); > + return; > + } > } > > private class SettingsResource extends SiteResource { > > Modified: spaces/trunk/src/com/ogoglio/site/AccountServlet.java > =================================================================== > --- spaces/trunk/src/com/ogoglio/site/AccountServlet.java 2007-07-10 > 18:13:02 UTC (rev 223) > +++ spaces/trunk/src/com/ogoglio/site/AccountServlet.java 2007-07-10 > 20:03:06 UTC (rev 224) > @@ -676,9 +676,8 @@ > } > > String displayName = spaceElement.getStringAttribute( > SpaceDocument.DISPLAY_NAME); > - String ownerUsername = spaceElement.getStringAttribute( > SpaceDocument.OWNER_USERNAME); > > - SpaceRecord newSpace = SpacePersistTasks.createSpace(displayName, > ownerUsername, getSessionFactory()); > + SpaceRecord newSpace = SpacePersistTasks.createSpace(displayName, > requestedAccount.getUsername(), getSessionFactory()); > if (newSpace == null) { > response.setStatus(HttpServletResponse.SC_BAD_REQUEST); > return; > @@ -1100,7 +1099,6 @@ > long bodyID = Long.parseLong(pathElements[pathElements.length- 1]); > BodyRecord record = BodyPersistTasks.findBodyByID(bodyID, > getSessionFactory()); > if (record == null || !record.getOwnerUsername().equals( > requestedAccount.getUsername())) { > - System.out.println("No such body: " + bodyID); > response.setStatus(HttpServletResponse.SC_NOT_FOUND); > return; > } > > Modified: spaces/trunk/src/com/ogoglio/site/SpaceServlet.java > =================================================================== > --- spaces/trunk/src/com/ogoglio/site/SpaceServlet.java 2007-07-10 > 18:13:02 UTC (rev 223) > +++ spaces/trunk/src/com/ogoglio/site/SpaceServlet.java 2007-07-10 > 20:03:06 UTC (rev 224) > @@ -16,6 +16,7 @@ > import java.io.IOException; > import java.net.URI; > import java.net.URISyntaxException; > +import java.util.Date; > > import javax.servlet.ServletConfig; > import javax.servlet.ServletException; > @@ -26,6 +27,8 @@ > > import com.ogoglio.client.SpaceClient; > import com.ogoglio.client.WebAPIClient; > +import com.ogoglio.client.WebAPIUtil; > +import com.ogoglio.media.MediaService; > import com.ogoglio.persist.AccountRecord; > import com.ogoglio.persist.PersistException; > import com.ogoglio.persist.SimPersistTasks; > @@ -55,9 +58,9 @@ > config.getServletContext().setAttribute(MESSAGE_PROXY_KEY, > messageProxy); > } catch (IOException e) { > throw new ServletException("Could not start the message > proxy: " + e); > - } > + } > } > - > + > public void destroy() { > try { > super.destroy(); > @@ -164,6 +167,38 @@ > return; > } > > + public void doDelete(HttpServletRequest request, > HttpServletResponse response, String[] pathElements, AccountRecord > authedAccount) throws PersistException, ServletException, IOException { > + long spaceID = Long.parseLong(pathElements[ > pathElements.length - 1]); > + SpaceRecord spaceRecord = > SpacePersistTasks.findSpaceBySpaceID(spaceID, getSessionFactory()); > + if (spaceRecord == null) { > + response.setStatus(HttpServletResponse.SC_NOT_FOUND); > + return; > + } > + > + if (authedAccount == null || > !authedAccount.getUsername().equals(spaceRecord.getOwnerUsername())) { > + response.setStatus(HttpServletResponse.SC_FORBIDDEN); > + return; > + } > + > + if (spaceRecord.getSimID() != -1) { > + SimRecord simRecord = SpacePersistTasks.findOrAssignSim(spaceRecord, > getSessionFactory()); > + URI spaceURI = WebAPIUtil.appendToURI(simRecord.getSimURI(), > "space/" + spaceID); > + if (!WebAPIClient.sendDelete(spaceURI, null)) { > + response.setStatus( > HttpServletResponse.SC_INTERNAL_SERVER_ERROR); > + return; > + } > + } > + > + // delete the space from database > + SpacePersistTasks.deleteSpace(spaceRecord, > getSessionFactory()); > + > + // delete the file if exists > + getMediaService().delete(MediaService.getSpaceDocumentName > (spaceID)); > + > + System.out.println(new Date() + ": Deleted space: " + > spaceID); > + > + response.setStatus(HttpServletResponse.SC_OK); > + } > } > > private class DoorsResource extends DescendingSiteResource { //NOTE > this will proxy eveything below "door" in the URL space > > > This was sent by the SourceForge.net collaborative development platform, > the world's largest Open Source development site. > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Ogoglio-commits mailing list > Ogo...@li... > https://lists.sourceforge.net/lists/listinfo/ogoglio-commits > |
|
From: Trevor F. S. <tr...@tr...> - 2007-07-08 21:07:29
|
Hey, Gal. On 7/8/07, Gal Nitzan <gal...@gm...> wrote: > While debugging the space viewer I get an error when the SpaceClient > is trying to load the door. The problem seems to be here: > > Template template = space.getTemplate(doorDocs[i].getTemplateID()); > > As far as I remember a door is not a thing. So the template is missing unless > of course I create a thing for a door and than I have 2 doors. > > Any clue to what I'm missing? This is a quirk of the way doors were originally implemented. Originally, the template with ID 1 was the default landscape and template with ID 2 held the model which the client used for doors. The default landscape is no longer used but the client still loads the models for template 2 when rendering a door. The client side door code needs work in terms of how the client renders them, how they're triggered, and exactly what happens if a door as a link URI to a space on a remote ogoglio service. Right now they're rendered as whatever is in template 2, you have to click them to trigger a teleport, and they only work if they're linked to a local space and even then you can't specify where in that space you'd like to teleport so you teleport to 0,0,0. The main reason I haven't tackled doors in a complete manner is that there's a bit of careful design work which needs to be done about how to teleport avatars and limited account information to remote services. In the mean time doors can be used for simple, local teleports to demonstrate the basic idea. - Trevor |
|
From: Gal N. <gal...@gm...> - 2007-07-08 20:13:35
|
Hi, While debugging the space viewer I get an error when the SpaceClient is trying to load the door. The problem seems to be here: Template template = space.getTemplate(doorDocs[i].getTemplateID()); As far as I remember a door is not a thing. So the template is missing unless of course I create a thing for a door and than I have 2 doors. Any clue to what I'm missing? Thanks, Gal |
|
From: Trevor F. S. <tr...@tr...> - 2007-07-07 00:50:31
|
Hey, Gal. On 7/6/07, Gal Nitzan <gal...@gm...> wrote: > I was wandering, is it possible to have something like a "space template"? Templates define what a thing will be when it is instantiated in a space. Accounts have templates, but spaces don't. So, I might log in to my account, create a "Big Box" template, and upload an obj and mtl file to it. Then I would create a "Possession" from that template, which in the current UI is the "Add to inventory" button. Then to create a "Thing" in a space I would use the "Add to..." drop down and pick a space. So, accounts have templates and possessions. Spaces have things which reference a template id. When the 3D viewer loads a space it gets a list of all of the things in the space, looks at the template ID that each thing references, and then fetches the models, materials, and textures from that template to use to display a thing. > > Regards, > > Gal. > > P.S. does the system send a notification when I submit a patch? Not yet, but I'll see if I can set it up that way. I didn't know you'd submitted some already. Thanks! - Trevor |
|
From: Gal N. <gal...@gm...> - 2007-07-07 00:33:56
|
Hey Folks, I was wandering, is it possible to have something like a "space template"? Regards, Gal. P.S. does the system send a notification when I submit a patch? |
|
From: Trevor F. S. <tr...@tr...> - 2007-07-04 21:45:14
|
Hey, folks. I've coped the contents of the Ogoglio server manual onto the project wiki: http://ogoglio.wiki.sourceforge.net/ I'll change the old manual pages to link to their new home and from this point forward the wiki will have the latest version of the script and web API docs. I also uploaded a new snapshot of the Ogoglio demo server. This includes a major improvement in the HTML UI as well as several key viewer optimizations which result in faster load times as well as more aggressive texture caching so the second visit to a space is speedy. Download it from the sourceforge project page: http://sourceforge.net/projects/ogoglio The snapshot also includes improvements in the media store to work around quirks in Windows XP (thanks, Gal!) but if you're still having trouble let me know. - Trevor |