Aug 30th 2001.

Camp Smalltalk Essen ESUG 2001


Note on Oct 24th 2001 this paged was moved to a Wiki so you can edit it there. Please read it over there, this copy is here for historical reasons. http://wiki.cs.uiuc.edu/CampSmalltalk/ESSEN+ESUG+Day+3

ESUG Day 3.

Back to Day 2

Day 3 looms on the sunrise, way too little sleep. PS an Eliot puzzle lurks at the bottom of the note, so read on.

However this morning I was reviewing my presentation and setting up some software for it, so I was unable to take the usual series of notes on the first tutorials and sessions. I did attend a bit of the talk on typed Smalltalk, I think if you see the presentation slides you will find that they contain sufficient detail.

During the coffee break there was numerous questions about my talk this afternoon. However I was very interested in the upcoming talk so some notes will follow. Niall Ross (nfr@bigwig.net) of ESUG is also taking notes but I believe they will not be available until next week as part of the official ESUG post conference posting. In future it would be great if we could get others in the community to devote some time to attend camp or conferences and have the responsibility for recording the happenings. When there are multiple tracks it becomes difficult for one or two to actually document everything that is happening. Hint having real technical writers would be a good thing…

VisualWorks 5.i4 on Macintosh OS-X
ralf@heeg.de and roland@heeg.de

Hint, OS-X is a variant of BSD. But has it's own graphics layer.

Ah, so that iBook last night really belonged to Ralf or Roland. I believe a version of VisualWorks was first ported that used the X-Windows interface. This was an easy thing to do, but not really what macintosh users expect, so the additional effort was taken to port VisualWorks to Aqua.

So we begin:
Actually the first thing we got to see was an application called Fractal Explorer, with the discussion that this version of VisualWorks is on the Cincom CD that was distributed at ESUG. {Ok so I've not explored the CD fully yet, and I missed seeing the OS-X version, sigh}

Roland: "We wanted to port VisualWorks right away to Cocoa, but it took til Dec to work out how etc. MacOS X is a new OS based on BSD Unix, it has a mach kernel, POSIX threads, BSD sockets, etc. The major pain is that it does not use X-Windows. It has Aqua. So what you first think would be a simple port becomes complex because you must port to a new GUI." Of course Visualworks is portable so you can do it.

So for the macintosh users
The window server uses Display PDF
The file system supports type and creators
Migration from OS-9 to OS-X is easy using the classic or carbon environment

So from the development point of view there are two ways.
Carbon which supports most of OS-9
Cocoa an Objective-C derived NextStep class library

But the VisualWorks engine had lots of stuff in it that Apple deemed unsupported because of the age of the original macintosh VW software. This was a major problem, so a decision was made to port VisualWorks to Cocoa. {Scribe note, the Squeak VM also had major problems and various hours were taken to fix that, mind an Objective-C port is also available}

Now we found Objective-C interesting. Why it looked like Smalltalk. Would this make the port easy? Well no! The VisualWorks VM is written in C. Sigh. Lots of the under pinning like Sockets is written in C. Ack. Now one of the problems is the interface to Quartz can be reached thru Cocoa or Carbon. When we looked at Cocoa we found that the window API had view, window, an MVC model kinda like Smalltalk. But hey the paradigm was different. Sigh. We had to learn and adapt to what Apple thought.

So the VisualWorks port is a Cocoa Application
The base is a standard Unix VM written in C
The display part is new
The VM can be used from a terminal window
But it is a real macintosh application when viewed from the Finder.

If you look at the CD you'll find in the beta folder a macosx folder

Now there is a problem, you can't run a current image with this VM. Several things are different in a image to support the macOS so you need to convert your image, this can be done under OS-9 using the OS-9 VM, but there are some problems with running an OS-9 version of the VM under classic.

Also there is a make file so you can compile dynamic primitives, please note callbacks don't work and DLL/C calls done work because of a bug related to parameter passing.

Note that visual.app is a package and contains a number pieces since in reality it is a folder {This is common knowledge to mac developers, but here is some background}. If you want to bundle an Image with the VM then it goes into visual.app/Contents/Resources as resource.im, also there is the herald.tiff and the icons. This is a bit different for Unix users, but it's a normal thing for OS-X applications. Note for embedding an image you need to look at the readme file, because there is more work to do to make it double clickable. Also for the l.proj we have the English uni-code strings for the VM.

So for example we created a FractalExplorer.app. This needed an image build by Runtime packager, then we change the icon files and the info plist.strings to indicate the new type and creator, then voila a double clickable OS-X application.

So the status of the port.
We've used it for a few weeks.
Performance of the VM is good
Performance of text display is poor. 2Ox slower than normal, this is being looked into.

Pics and Thapi has not been finished
Some primitives are not implemented. BSD signals are not recognized correctly, thus Sockets (especially UDP) is not working correctly. Our tests for the VM run mostly ok, but the socket doesn't get freed correctly. I haven't covered all the shortcomings, we'll leave some for you to find.

Note we do have an OS-X look for the widgets. We tried hard to implement all the widgets, we think we have done a good job. But there are issues the flashing default button variation it doesn't work like a true OS-X button, but it will look very similar.

So we fired up the fractal application and launching took awhile, and the first window took awhile to display. This wasn't really acceptable, this seems to be a mac OS-X problem.

Question: "Will it be fixed in OS-1O.1?" Good question we hope so.

Note for the Objective C class library, we are use to seeing all the code. Mmm if it's a primitive I can get the source code and see what's up if I talk to Cincom. {Scribe note, yes this is a new service, phone your Cincom rep and ask!} However most of the Objective C class library comes in binary form and you cannot see what it is doing. For example NSApplication has a method "run". But what does it do? This is very painful. Consider yourselves blessed with Smalltalk, it gives you access to everything.

Roland<?> "I have some goodies we wrote like a neat clock and a bubble game, we'll see about getting those on the ESUG site <link>.

That ends the presentation.


A presentation by "intelligent views" on K-Infinity
An introduction to the COAST frameworks, and how we used it to build K-infinity.
See http://www.opencoast.org

So the issue was we had this content, lots of feeds. But we wanted to display this in pretty web pages and we don't want to do this by hand.

So for example you want to find information on music conductors in Bayreuth. A full text search doesn't work really well. It only works on strings not on concepts, and it produces irrelevant hits.

K-infinity allows you to
Express knowledge in terms of an object oriented model.
Connect content to arbitrary entities of this model
Use the knowledge net for semantic search, and presenting related things next to each other. …reasoning about the information presented. This comes from AI research.


Concepts are building blocks. (Creature, person, role>
Individual - to names
Relationship between objects
Instance of things like a person
Extensions like a person can do many roles
User defined relationships

Ok an example a beta port to 5i.4 of our application

We use a graphics tool to build a relationship mapping. There is a textual tool to define the relationships. There was some questions about what are things, what are concepts.

In any case we end up with a networked topology of nodes. There was some really interesting dynamic layout of the tree you could do, i.e. grabbing a node and moving it about caused leaf node movements and visual node placement optimizations. {What was more interesting is this a group tool and the updates are visualized across multiple workstations in real time.

From here we added a conductor node and added a person to the relationship, then we added him to a music place. However we couldn't do that at first, because the person didn't have the right role or concept to do this. So we added the attribute that the person could lead. This allowed him the relationship of leading the New York philharmonic orchestra.

There of course is some work here in order to build your database of relationships for your specific domain.

The other things you can do is add a "competes with" relationship for example. Now if we remove an attribute, then it also will remove links based on relationships that are now invalid.

Question about "handling temporal information and relationships?"
Name changes, role changes over time. This is something we are looking into. Some very small steps towards that are being taken.

Question "do you handle spatial relationships?"
Only from the viewpoint of the display tool, this isn't something we support right now.

Ok some examples, Oops a demo error, then we needed to restart the browser to fix the issue. During the demo we have two people working on the database. As one person entered the relationship data it would appear on the large video display. Now we have entered the data and the relationships, we noted you can do collaborative processing between machines.

The other tools are the Knowledge Builder, a Markup tool to link documents to the net, and usage tools to look at what is happening. Some slides showing the relationships between the different VisualWorks images and Java VM we use to provide the service.

The Coast framework
To support the development of object oriented, synchronous, interactive and complex interactions. It's GroupWare.

How COAST applications are structured
View & controller
Application Model <-> Application user
Domain Model, but it must be shared.

We need the application user information because if one selects an object then we want to display that on other workstations.

Another nice three D model showing the structure of their application, which they admitted took days to render. "We are considering moving to OpenTalk because we originally did our own transport layer but we should migrate to something we don't need to support". The Domain object sharing is all done by COAST.

Shared objects are bundled in clusters. The COAST mediator distributes the same clusters to multiple COAST clients. We want to cluster information as the smallest unit of transportation. We don't want to transmit the entire world.

So what we found
COAST default behavior had bad results, we had to do a lot of tuning. Re-clustering is an open issue, hard to do when the system is running.

Persistency is achieved
Implicitly by inheritance (COAST standard)
Explicitly by a method call.

Shared objects are modified in transactions, this prevents inconsistencies, we can have optimistic or pessimistic ones We have local execution and commit, we sent the agenda to the mediator and do the global commit or reject, then broadcast changes to synchronize replica.

Experiences
Use optimistic transactions wherever possible
Very little concurrency conflicts. Users have separate responsibility this reduces overlap and leads to few conflicts, but they have instance visibility of what they are doing.

As compared to locking. which could lead to a more global lock and lock out other users. Then we got an example of updates without conflicts, then one with conflicts. In this example both presenters moved individual objects around, as it was reflect with two cursors etc on both screens. Then we tried to do a global change while the other person was working we got a concurrency conflict. So the global change was rolled back.

Shared objects are modeled as frames and slots
Slots are similar to instance variables
Slots properties are declared explicitly
Slots can hold multiple values
Daemons lurk to manage inverse relationships, type checking, constituent slots,and users.

An example of code was given.
Mm we noticed that KInteger had lots of super classes which added lots of attributes. Yet it was only a number (visually) Advantages, very flexible, but 1Ox slower than original Smalltalk SmallInteger, but we need the flexible!

Automatic view updating.
Computed attributes, cache computed results, compute on demand, automatic invalidation, dependencies between model and attributes are detected by the framework, views have computed attributes that result in redisplay.

So we do not have display inconsistencies without having to have explicit display update code. This is a good thing. Visualization is very complex at times. We will build custom parts in our design department. There is hard work where COAST and standard GUI meets.

Other things are shared workspace, user list, chat , awareness. These tools were surprise to clients, but they really like them.

K-Infinity is used as a GroupWare application
Distributed users
Demand for co-ordination
Clients are asking for workflow

In the future, we will do authorization job flow.
What did we improve over last year?
Performance in the replication layer
Scalability, more data 15x for TUKAN, 2OOx say O.5 million
More clients

Mediator has to run 24 by 7. This is a server application. {In later talking I found they have some interesting 300MB images I might look into. Again Smalltalk doing the hard stuff}

Question about "persistence or a file based database".
It's just files right now. We are doing a prototype of using a chunk file format. We did some Objectivity experiments and the system run 1OOx SLOWER, and we have a conflict issue: we have transaction in COAST, and now in a database. This is a problem.

Right now we have live and lazy objects and bring in the lazy objects from disk as needed. This improves the memory footprint.
Afternoon, well I gave my presentation. I think this went ok, people still sat with me at dinner on the Cincom lake Cruise. You can find a copy of the presentation here (with a link to the Smalltalk Solutions Site that contains a PDF document of a nearly new one)

We did hear an Eliot puzzle. So here it is. People can email me with the correct answer, or the wrong answer, I'll let you know. Oh, I'm sure some people are still working on this tonight. You are given a sequence of numbers, give me the numbers for X, and explain why

10, 11, 12, 13, 14, 15, 16, 17, 18, 21, 23, 25, X, 101, X, 10001

Bonus if you can give some Smalltalk code to reproduce it… PS I have an SUnit for testing, so beware...

Forward to Day 4