+wave-dev again

On 25 January 2011 02:30, Joseph Gentle <[email protected]> wrote:

> On Mon, Jan 24, 2011 at 3:52 PM, Alex North <[email protected]> wrote:
> > I assume from the below that you want this to be interoperable with wave
> at
> > least at the data model level?
>
> Yep.
>
> >> My plan is:
> >>
> >> Concrete data types:
> >> - Wave document snapshots are WaveletDataImpl objects
> >> - Ops are WaveletOperations
> >
> > There are two distinct domains that you're confusing: wavelets and
> > documents. The document domain is entirely self-contained and knows
> nothing
> > about wavelets. A document snapshot is simply an op applying to the empty
> > document. A wavelet snapshot is a bunch of metadata, and not easily
> > expressible as a single op, hence the WaveletData type. Document ops and
> > DocOps, wavelet ops are WaveletOps.
>
> Er, yes. I knew that. Thankyou. :)
>
> > The domain of OT is a wavelet. The word "document" above is possibly
> > confusing because a document is not the database object (but sounds like
> you
> > want it to be).
>
> I think it makes most sense to interoperate at a wavelet level. That
> way it should be possible to make undercurrent work, and it should be
> possible to import wave data.
>
> >> Invert should be trivial, but I can't find it.
> >
> > Wavelet ops are not invertible. Document ops are.
>
> Is that because of the metadata? If we accept the metadata being
> wrong, would invert operations be possible? I'm imagining undo working
> by applying new ops which cancel out old ops.
>

Yes. You're right you don't want undo ops to be complete inverses, metadata
should still update forwards (but even this is debatable). The document ops
are inverses thought.


>
> >> To make the ops in the first place, my understanding is that I want to
> >> create a document, apply nindo to it and get the doc ops out the other
> >> side. Which document class do I want to use? (There's about 20 to
> >> choose from.)
> >>
> >> Do I poll to get the DocOps out or should I make a custom sink class
> >> which gets sent the ops?
> >
> > Use a sink. Almost all the document classes are adaptors of some sort
> around
> > IndexedDocument. Which one you need depends on details of how you're
> using
> > it, but try starting with IndexedDocument.
>
> Hm, ok. Is that also true if I want to operate on a wavelet level? If
> I want to make some changes, and generate some ops to send to the
> server, is this right?
>
> - Make a client-side WaveletData object
> - Wrap the WaveletData in an OpBasedWavelet, and make a sink through
> which the ops are sent to the server
> - Make a WaveView, and add the wavelet to it.
> - Build a WaveBasedConversationView out of the wave view
>
> WaveletBasedConversation.makeWaveletConversational(wavelet);
> conversation = conversationView.getRoot();
> ConversationBlip blip = conversation.getRootThread().appendBlip();
> LineContainers.appendToLastLine(blip.getContent(),
> XmlStringBuilder.createText(text));
> ...
>
> Is there a way to make a conversation in a wavelet without the wave view?
> Hm.
>

That all sounds right. Currently no, you need the view.

A.

Reply via email to