Monday, July 13, 2009

Seaside 2.9 and Comet to control replicated Croquet islands.

I want to share some of my experiments in combination of Open Croquet and Seaside/Comet at image level.

The main aim is: to allow multi-user interactions with shared content on the Croquet island just from web browser in real time (from any place, device like smart-phone, low-end machine (sometimes without OpenGL) etc. so, that a connection to the network and http web based browser just needed.
Also, it could help to implement open source "Forum pages" like features , which are existed only in Qwaq forums 2.0 (access recent activity from your web browser etc.).

I have prepared the ready-to-go image for those, who want to explore the infinite possibilities :)
1. CroquetSDK.v1.0.18 with new image.
2. Just one image for using with manual downloaded any Croquet SDK.

Also, I prepared the Script for loading Seaside 2.9 alpha updated (13-07-09) into any fresh OpenCroquet image (1.0.18 users should update from sources to the latest, or use this one Croquet.1.0.25 )

For examples look at SmotriniWorldControl class.


Here on the screen-shot there are two participants and two opened web browsers (Safari, Firefox).
Just only one participant run Seaside/Comet application.
Changing any of the RGB sliders (in one of browser window) causes the change of the active space color, and glad to Comet in all opened Web browsers slider's handles change their visual state automatically (without manual refreshing).

All callbacks from seaside to croquet island are future events, like from proper harness in Croquet, so they dose not destroy the replicated state.
-----
onSlide: (html jQuery ajax
callback: [ :value |
aColor = #red ifTrue:[self class valueRGB red: value asNumber.
aFrame future color: (Color r: self class valueRGB red g: aFrame color green b: aFrame color blue)].
-----

How to run:

1. Start WAListenerAdaptor (support Comet Seaside applications)

WAListenerAdaptor startOn: 8888. (different ports for several participants, if needed)

2. Open Croquet master (KAT Demo harness is used in this example, from default Croquet SDK).

KCroquetParticipant new openInWorld.

When it asks about interactivity server, leave it blank, as (www.croquetcollaborative.org) could not work, so it will start locally.

3. Point your any web browser (Firefox, Safari preferable) to:

http://localhost:8888/seaside/croquet

4. To test Comet functions (RGB Slider), just open another browser window and point it also to:

http://localhost:8888/seaside/croquet


To be continued..

25 comments:

brasspen said...

I don't mean to be obtuse, but I'm a little lost. I have two tabs in Firefox running the panel. I have the SDK image running with the rabbit.

I get the idea that what's going on in a World can be pushed to a browser on a cell phone or whatever. I get that non-visual data can be pushed out.

I don't get what "Create 3D Window Text" is for if I can't see it. I get the impresion only data is being pushed to the cell phone browser.

Are they supposed to be running the Croquet image at the same time? But you said they may not have any OpenGL?

I know: Tell me this. Am I supposed to be seeing anything else beside your control panel in the browser window?

I'm curious about this. It's cool, but I'm not quite getting it.

Suslov Nikolay said...

Ok, for example:

Imagine the classroom or exhibition/art gallery hall, where we have several projections of Croquet 3D (OpenGL based) space on the walls. And the audience (several people) could easily interact with shared content by using their own web based devices, come with.
They will observe both the web control panel changings on the web-device and real Croquet OpenGL graphic on the walls.

The second scenario: could be, yes, like "blind blogging, surfing etc.", as I mentioned in the post: "Forum pages". You interact with shared island and get callback just with html information on the same device, but knowing, that your real Croquet world is growing etc. And, to get full experience, you need to see both, or just Croquet full one.

So, these Seaside/Comet applications for Croquet could be seemed like multi-user shared remote controllers for manipulating the Croquet island content.

Suslov Nikolay said...

"Are they supposed to be running the Croquet image at the same time? But you said they may not have any OpenGL?"

Meaning, that it's like:

I allow somebody to control my OpenGL Croquet application from his phone remotely, and for that he needs just a web browser pointed to my Seaside application, running inside Croquet image on my side.

Suslov Nikolay said...

And in addition, to clarify things:

Several opened web browsers connected to one Croquet image/one harness are not equal to several "Avatars" in Croquet (where each should be presented by own harness). So, they are equal more to one controller which is shared between multi-users or like multi-touch interface over http.
In general you could enhance with such "controller" every connected island replica living in Croquet p2p net.

Andy Burnett said...

I think this looks like a fascinating project. Being able to interact with a croquet space simply via the browser is a great idea. Well done, I will definitely follow this project.

cheers
Andy

brasspen said...

I'm finding looking at this code to be very rewarding. This is the first time I've looked at something about Croquet and not felt it was alien technology.

You're getting data from the croquetHarness and croquetText instance variables. OK.
What's gained from there gets pushed by CTPusher.

CTPusher>>javascript: says you used the SUScript class in the comment. That doesn't exist in 2.9, I don't think. The actual code is JSScript.

I dwell on that because I'm not sure how Comet does what it does. Is this a function of a library like JQuery or Prototype. Or is the Smalltalk doing the pushing?

I'm fascinated by how Lukas Renggli's Scriptaculous parses and builds JavaScript strings. Your app seems to be opening up new possibilities for me to explore on how that's done. Not least of which, it's time for me to switch to 2.9.

One thing, where are my variable, hierarchy, etc. buttons? What have you done to my buttons! :o Is this a Pharo image or something?

I hope you don't mind, but I'll likely have more questions tomorrow, as well.

Suslov Nikolay said...

About image and code inside:

This is the CroquetSDK.1.0.25 image (v.3.8 Squeak based) with some cleanup.
Seaside 2.9 packages and its additions like Comet, JavaScript, JQuery are loaded into this image without any manual modifications, except of http server infrastructure and required/missed methods for 3.8 Squeak version (as Seaside is now developed in Pharo, which is 3.9+ derived).
So, DynamicBindings, KomServices, KomHttpServer packages are a bit corrected by me to work in Croquet image and Croquet-Seaside package contains missed methods from 3.9/Pharo. They could be founded here (http://www.krestianstvo.org:9090/Croquet-Seaside/) and are used in automatic loading script also.

CTPusher is the class from Comet-Core package, and is maintained by Seaside dev-team, the same for other Seaside stuff.
And yes, Comet is not a function of a library, here is the quote from Philippe Marschall "Comet is a hack into the HTTP protocol. To make it do something is was not designed to do".
Comet and so CTPusher is used for updating the state of web content in all (not just one) connected web browsers at the same time. Here in SmotriniWorldControl example we set in future/get the value of space color on #onSlide event, and only on #onStop event push it (in a form of position of slider's handle) to other browsers.

About development environment:

Buttons are missed, sorry.
To restore them in SystemBrowser just enable (Preferences enable: #optionalButtons).

brasspen said...

Thank you for answering my questions. I need to reflect a bit now. And I love the trick for getting the buttons back.

Anonymous said...

Curious. Are you alone or are there other people working on this with you. It's refreshing to see someone else working with the Croquet SDK. Are you planning on maintaing the smalltalk roots of the project?

jski said...

I downloaded the CroquetSDK-1.0.25-Seaside.2.9-Full image+vm. I ported my Seaside app over to it - mainly working thru issues with the newer Comet. The reason for this is to have more mature Jabber + Comet + Seaside(2.9) code. Currently I'm not certain how I might take advantage of Croquet but if needed it's there.

One question: how out of synch is this image from the latest-and-greatest Croquet/Cobalt image?

---John

Suslov Nikolay said...

Great to hear, it could extend the Jabber usability in Croquet/Cobalt, so that somebody could participate in conversation being held in 3D Croquet world, just from web browser (and vice versa).

This image is the latest public released version of Croquet SDK (2007/08 year), which is synced with Hedgehog sources. Cobalt SDK is based on it also.

jski said...

I recently tried to install my code from this modified Croquet image into the latest Pharo, which is still at Seasidse 2.8. I got a walkback with WAAdmin. I posted a question on this and was informed WAAdmin is in Seaside 3.0. Is 2.9 a development platform and 3.0 a release?

Nikolay, do you plan to keep this web site (including "Script for loading Seaside 2.9[?]") updated?

---jski

Anonymous said...

to buy [URL=http://jacket-dresses.net/]moncler sale[/URL] for gift tURyxPIw [URL=http://jacket-dresses.net/ ] http://jacket-dresses.net/ [/URL]

Anonymous said...

purchase VfjEFtGA [URL=http://www.top--designer-brands.net/]faux coach handbags[/URL] and check coupon code available TrvSbbto [URL=http://www.top--designer-brands.net/ ] http://www.top--designer-brands.net/ [/URL]

Anonymous said...

sell eYaMjXDz [URL=http://www.hermes-birkinprice.weebly.com/]hermes outlet online[/URL] , just clicks away wUVMwxUU [URL=http://www.hermes-birkinprice.weebly.com/ ] http://www.hermes-birkinprice.weebly.com/ [/URL]

Anonymous said...

michael kors bags jpzxvscv michael kors handbags iazjfnts michael kors outlet bittjebg michael kors purses ssyvvfwv michael kors sale zwuhzauj Michael Kors vwqhaszh

oakleyses said...

christian louboutin shoes, louis vuitton outlet, kate spade handbags, coach outlet, true religion, nike shoes, michael kors outlet store, tory burch outlet, oakley sunglasses, louis vuitton handbags, coach purses, louis vuitton outlet, michael kors outlet online, coach outlet store online, coach outlet, ray ban sunglasses, michael kors outlet online, burberry outlet online, louis vuitton, red bottom shoes, christian louboutin outlet, burberry outlet online, longchamp outlet, longchamp handbags, michael kors outlet online, true religion outlet, nike free, oakley vault, jordan shoes, longchamp outlet online, kate spade outlet online, ray ban outlet, chanel handbags, cheap oakley sunglasses, michael kors outlet, prada handbags, prada outlet, tiffany and co jewelry, louis vuitton outlet online, nike air max, tiffany jewelry, polo ralph lauren outlet, nike air max, christian louboutin, michael kors outlet online, gucci handbags, polo ralph lauren

oakleyses said...

timberland shoes, ugg, ralph lauren, supra shoes, wedding dress, parajumpers outlet, uggs canada, louboutin, converse, moncler, vans, canada goose, lancel, toms outlet, coach outlet, hollister canada, moncler, links of london uk, moncler outlet, swarovski jewelry, pandora uk, juicy couture outlet, karen millen, iphone 6 case, pandora charms, canada goose uk, hollister clothing, nike air max, ray ban, air max, gucci, montre femme, thomas sabo uk, canada goose, baseball bats, hollister, moncler, louis vuitton canada, pandora jewelry, canada goose pas cher, moncler, juicy couture outlet, moncler, replica watches, swarovski uk, oakley, moncler, converse shoes

Unknown said...

tiffany outlet
nike air max
longchamp outlet
cheap nba jerseys
nike air huarache
rolex uk
kate spade uk outlet
michael kors outlet online
fitflops clearance
michael kors handbags clearance
omega outlet
bottega veneta outlet
true religion jeans
louis vuitton bags
air jordan 13
ugg boots
rolex watches for sale
michael kors uk
rolex watches,rolex watches,swiss watches,watches for men,watches for women,omega watches,replica watches,rolex watches for sale,rolex replica,rolex watch,cartier watches,rolex submariner,fake rolex,rolex replica watches,replica rolex
mulberry handbags sale

oakleyses said...

oakley sunglasses wholesale, chanel handbags, burberry pas cher, tory burch outlet, nike free, nike air max, nike outlet, michael kors pas cher, longchamp outlet, ugg boots, jordan shoes, replica watches, louboutin pas cher, christian louboutin shoes, polo outlet, jordan pas cher, nike air max, ray ban sunglasses, polo ralph lauren outlet online, longchamp pas cher, replica watches, louis vuitton, kate spade outlet, ray ban sunglasses, air max, gucci handbags, louis vuitton outlet, christian louboutin uk, uggs on sale, prada handbags, cheap oakley sunglasses, ray ban sunglasses, oakley sunglasses, sac longchamp pas cher, louis vuitton outlet, louis vuitton, ugg boots, louis vuitton outlet, tiffany jewelry, nike free run, nike roshe, tiffany and co, oakley sunglasses, christian louboutin outlet, prada outlet, polo ralph lauren, longchamp outlet, oakley sunglasses

oakleyses said...

iphone 6s plus cases, nike trainers uk, mont blanc pens, herve leger, new balance shoes, chi flat iron, nike huaraches, bottega veneta, soccer jerseys, iphone 6 plus cases, p90x workout, oakley, wedding dresses, lululemon, timberland boots, mcm handbags, louboutin, vans outlet, instyler, ralph lauren, north face outlet, hollister clothing, abercrombie and fitch, asics running shoes, iphone 6s cases, iphone cases, mac cosmetics, babyliss, iphone 5s cases, valentino shoes, nfl jerseys, jimmy choo outlet, soccer shoes, north face outlet, longchamp uk, giuseppe zanotti outlet, hermes belt, iphone 6 cases, baseball bats, insanity workout, reebok outlet, s6 case, ipad cases, celine handbags, hollister, beats by dre, ghd hair, nike roshe run, ferragamo shoes, nike air max

Unknown said...

Coming Nike Air Max 2015 Shoes off a Super Bowl loss, the Carolina Panthers were about salary-cap discipline. General manager Dave Gettleman preached patience and measure. And when it came to making roster decisions – like letting All-Pro cornerback Josh Norman walk Nike Free Run away – everything was about the overall financial design. “You have to balance the needs of the team now with the needs of the team in cheap nfl jerseys a couple of years,” Gettleman told Yahoo Sports in June. “You have to plan. I’m very wholesale nfl jerseys methodical Nike Roshe Run and intentional about what I do [and] nfl jerseys store about the decisions we make. You have to be that NFL Jerseys way with the salary cap, because Nike Air Max 90 it’s going to cost you.”

Unknown said...

cheap oakley sunglasses
adidas yeezy
coach outlet
jerseys wholesale
rolex replica
houston texans jerseys
nike tn
nike blazer pas cher
christian louboutin shoes
ecco shoes outlet

Farhan Tanvir said...

Image masking, image manipulation, clipping path, shadow creation, photo editing, and color adjustments are only some of the services that we provide. automotive photo editing

Quân Đào said...

dịch vụ làm báo cáo tài chính tại huyện Phú Xuyên
dịch vụ làm báo cáo tài chính tại huyện Phúc Thọ
dịch vụ làm báo cáo tài chính tại huyện Sóc Sơn
dịch vụ làm báo cáo tài chính tại huyện Hoài Đức
dịch vụ làm báo cáo tài chính tại huyện Thạch Thất
dịch vụ làm báo cáo tài chính tại huyện Quốc Oai
dịch vụ làm báo cáo tài chính tại huyện Đan Phượng
dịch vụ làm báo cáo tài chính tại huyện Thanh Oai
dịch vụ làm báo cáo tài chính tại huyện Chương Mỹ
dịch vụ làm báo cáo tài chính tại huyện Thường Tín
dịch vụ làm báo cáo tài chính tại Biên Hòa Đồng Nai
dịch vụ làm báo cáo tài chính tại tỉnh Bình Dương
dịch vụ làm báo cáo tài chính tại Huyện Nhà Bè
dịch vụ làm báo cáo tài chính tại Huyện Cần Giờ
dịch vụ làm báo cáo tài chính tại Huyện Hóc Môn
==
dịch vụ làm báo cáo tài chính tại Huyện Củ Chi
dịch vụ làm báo cáo tài chính tại Huyện Bình Chánh
dịch vụ làm báo cáo tài chính tại Quận Bình Thạnh
dịch vụ làm báo cáo tài chính tại Quận Bình Tân
dịch vụ làm báo cáo tài chính tại Quận Tân Bình
dịch vụ làm báo cáo tài chính tại Quận Gò Vấp