You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by Thilo Goetz <tw...@gmx.de> on 2007/01/06 12:40:35 UTC
CAS/CasView design, another summary
As I see it, we're not going to reach consensus on this issue. I guess
this is at least in part due to the fact that we disagree on the basic
premises underlying this redesign. I am -1 to the current proposal, and
I'll give my reasons below. However, I think we've mostly discussed
most of what I have to say, and if everybody else thinks the current
proposal is a good idea, I will not stand in its way. Anyway, here goes.
The current view redesign proposal IM not so HO doesn't help in making
views any clearer. We are perpetuating the current view implementation,
albeit with a handful of additional interfaces that are 90% identical to
the CAS interface. That shows that there's something seriously wrong
with this design. If this is all we want to do, there's a much simpler
way: no separate view API, just a setCurrentSofa(Sofa) on the CAS. With
a default Sofa, that gives us 100% backward compatibility. I'm not
seriously proposing this, mind you, but it's preferable to the current
proposal (but see below).
The switch from single-artifact CASes to multi-Sofa CASes and views was
a fundamental change in the basic UIMA architecture. We are not doing
our users a favor by hiding this change from them. By sacrificing a
clean design to backward compatibility, we may keep some existing users
happy, but we're not going to gain any new ones. If even UIMA
developers find it that hard to get their heads wrapped around the
concepts and APIs, how much harder is it going to be for new users?
I question the need for backward compatibility for Sofa-unaware
annotators. Those days are over. This basic tenet robs us of the
ability to clean up the CAS APIs. For example, when I look at the CAS
APIs from a world where views are real, I naturally expect
CAS.getIndexRepository() to return all indexes in the CAS to me, not
just the ones for the default view.
The CommonCas interface adds to the confusion, because it isn't (a
common CAS API). It follows the methodology that everything that can be
abstracted, is abstracted. However, that's not how people think. We
like to think in API groups and what things logically belong together,
not what can and can not be grouped because of method return types. So
all it does is add to the confusion because you always have to look in
two places for APIs.
So here's what I would do:
- No view API in UIMA 2.x. Possibly change the view/sofa related APIs
in a manner indicated above (CAS getView(String viewName) -> void
setView(String viewName) etc). I would find that much more intuitive,
but I'm not hopeful that other people on this list will.
- Start discussing UIMA 3 now. Take a clean slate approach, consider
how we want to handle indexing in the future. Have a couple of beta
releases to get feedback from users.
- Support both UIMA 2 and 3 in parallel, for as long as necessary.
Consider interoperability, possibly in the same JVM.
I really think that the CAS/view redesign proposal as it currently
stands will make things even worse, and that it should be reconsidered.
--Thilo
Re: CAS/CasView design, another summary
Posted by Michael Baessler <mb...@michael-baessler.de>.
Thilo Goetz wrote:
> So here's what I would do:
>
> - No view API in UIMA 2.x. Possibly change the view/sofa related APIs
> in a manner indicated above (CAS getView(String viewName) -> void
> setView(String viewName) etc). I would find that much more intuitive,
> but I'm not hopeful that other people on this list will.
>
> - Start discussing UIMA 3 now. Take a clean slate approach, consider
> how we want to handle indexing in the future. Have a couple of beta
> releases to get feedback from users.
>
> - Support both UIMA 2 and 3 in parallel, for as long as necessary.
> Consider interoperability, possibly in the same JVM.
>
> I really think that the CAS/view redesign proposal as it currently
> stands will make things even worse, and that it should be reconsidered.
Till now I only read the posts to the CAS/CasView discussion and tried
to understand the details, sometimes without success :-) I think this
also depends on may current knowledge and I have to do my homeworks to
contribute to that discussion.
My current point of view, as far as I understand the discussion is that
we do not really have a consent on the CAS/CasView architecture. So I
like the suggestions to start this discussion again for UIMA 3 and do
things step by step. This would help me and maybe others (if we find
some contributors after the release) to contribute to the discussion.
This suggestions seems also more reasonably when thinking about the
first UIMA release with code freeze in about two weeks to get out a
stable version of UIMA.
Just my point of view.
-- Michael
Re: CAS/CasView design, another summary
Posted by Adam Lally <al...@alum.rpi.edu>.
On 1/6/07, Thilo Goetz <tw...@gmx.de> wrote:
> As I see it, we're not going to reach consensus on this issue. I guess
> this is at least in part due to the fact that we disagree on the basic
> premises underlying this redesign. I am -1 to the current proposal, and
> I'll give my reasons below. However, I think we've mostly discussed
> most of what I have to say, and if everybody else thinks the current
> proposal is a good idea, I will not stand in its way.
Yes, we have no consensus... And I don't think it's just you, Thilo.
Marshall is still proposing changes and asking questions, and Eddie
and Michael haven't had enough bandwith to devote much time to
understanding and considering all the implications.
And I must admit, I myself am having second thoughts about the
problems with getting JCas to work, and about all the deprecation
warnings we'd be causing in users' code.
I suppose then we ought not to rush these changes in. I still think
we missed an opportunity here, but it's not going to help anybody to
rush in some changes that haven't been fully thought out.
You're probably right that single-Sofa users will be happier if we
*don't* do this change, and multi-sofa users are I think still a
relatively small population and it may not be worth doing such a risky
change to try to make them happier. They are generally sophisticated
enough to adapt to whatever confusing API we present to them anyway.
:)
> I question the need for backward compatibility for Sofa-unaware
> annotators. Those days are over. This basic tenet robs us of the
> ability to clean up the CAS APIs.
I think we're as far apart as ever on this point. In fact I'm so
concerned with backward compatibility for Sofa-unaware annotators that
I started to have cold feet about even *deprecating* the methods they
use! Ironically, our diametrically opposed positions lead us to both
question the current proposal... however, it does not bode well for
agreeing on doing anything in UIMA 3.0 either. :(
> The CommonCas interface adds to the confusion, because it isn't (a
> common CAS API). It follows the methodology that everything that can be
> abstracted, is abstracted. However, that's not how people think. We
> like to think in API groups and what things logically belong together,
> not what can and can not be grouped because of method return types. So
> all it does is add to the confusion because you always have to look in
> two places for APIs.
>
I think I agree with this... but see the other thread.
> So here's what I would do:
>
> - Start discussing UIMA 3 now. Take a clean slate approach, consider
> how we want to handle indexing in the future. Have a couple of beta
> releases to get feedback from users.
>
> - Support both UIMA 2 and 3 in parallel, for as long as necessary.
> Consider interoperability, possibly in the same JVM.
>
I think interoperability in the same JVM is a requirement. Maybe
before doing a clean slate design we ought to have a strategy for
interoperability. I don't really see how we do this other than
keeping the current CAS interface and adding a completely new one
that's named something different (but what?). Or does anyone have a
better idea how to accomplish interoperability?
As for the actual clean slate design, I think maybe we ought to give
the OASIS TC a few months to see what transpires, and try to figure
out how this whole "implementation should conform to the
specification" thing is supposed to work.
In the mean time there should be plenty of work in getting UIMA 2.1
out and trying to cultivate a user community and attract some
developers. Having a user community may also help in any future
redesign. Thilo keeps saying he wants to hear the users'
complaints/suggestions for himself on uima-user, rather than filtered
through our personal interactions with the users. That's a good idea,
but it will take some community-building work to get there.
-Adam
Re: CAS/CasView design, another summary
Posted by Marshall Schor <ms...@schor.com>.
Thilo Goetz wrote:
>
>> <snip> I think it's useful to recognize there are sofa-aware
>> components, and sofa-unaware components. Most of the components so
>> far are sofa-unaware ones - although this may change somewhat over
>> time. I think it is useful to make writing sofa-unaware components
>> "easy" in the sense of not forcing these to deal with multiple
>> sofas/views concepts. This is what is driving some of the design
>> thinking, I believe, not just trying to be "backward compatible". I
>> also think this is useful for UIMA adoption - in helping new users
>> climb the learning curve - initially they would be able to ignore
>> multi-sofa/ multi-views.
>
> But that's not what the proposal suggests. In the current proposal,
> the view methods on the CAS are deprecated.
I'm suggesting we think about that... and maybe not deprecate them for
sofa-unaware components.
>>> <snip> I question the need for backward compatibility for
>>> Sofa-unaware annotators. Those days are over. This basic tenet
>>> robs us of the ability to clean up the CAS APIs. For example, when
>>> I look at the CAS APIs from a world where views are real, I
>>> naturally expect CAS.getIndexRepository() to return all indexes in
>>> the CAS to me, not just the ones for the default view.
>>
>> In the case where the world is one where "views are real" - that
>> naturally feels like the case of a sofa-aware component.
>> - For sofa-aware components, I would expect this call to be invalid
>> (as a User), because Index-sets "belong" to Views, and the CAS isn't
>> a view.
>> - For sofa-unaware components, I would expect this to work as before
>> - this is more like the case where "views aren't real".
>
>
> This contradicts the "everything is accessible from the CAS without
> views" axiom.
My assumption here was that we'd provide other capability for this -
such as a simple getAllFeatureStructures method (or whatever we were
calling it in previous email chains).
>> <snip> From a documentation point of view, I hope to have it both
>> ways - by describing the JCas and Cas APIs as including the CommonCas
>> API (which of course it does, as a super-interface). So the users
>> won't need to pay attention to this detail of abstraction; they can
>> ignore the CommonCas API as a separate entity. The current IDEs like
>> Eclipse support this, too (e.g., autocompletion shows the whole set).
>
> The JCas is a wrapper around the plain old CAS. If we position it
> that way, we don't need a common ancestor. Why doesn't the JCas just
> extend the CAS interface, if it inherits that many functions?
This was considered. One reason it wasn't done was because some methods
return different Java types in the two impls, and that isn't allowed in
the Java model. Also, it doesn't inherit (in the current design) *all*
the CAS methods. For instance, the methods for manipulating Feature
Structures that use the Type System "handles" are not implemented,
because the JCas is supposed to be an alternative to those.
Re: CAS/CasView design, another summary
Posted by Adam Lally <al...@alum.rpi.edu>.
On 1/7/07, Marshall Schor <ms...@schor.com> wrote:
> Perhaps a useful thing to explore is to consider merging *all* the
> "user-facing" CAS APIs (CAS, CASView, JCas, JCasView), thereby
> *eliminating* some APIs. I'm thinking we would still have the ability
> to have multiple views, each having a different "object" implementing
> the API; but there would be just one Interface API for this. In other
> words, the CAS getView(...) method would return a CAS.
>
> Also I'm thinking we would still support JCas and CAS, while getting rid
> of the JCas Interface. For instance, the "new MyAnnotation(....)"
> methods could take a CAS argument - it's trivial to get the
> corresponding JCas from a CAS Object.
>
> What does this "break" in the bigger picture?
> - It diminishes somewhat the multi-view notion, because there's only
> one API, not a separate one for the "View".
> What does this "enhance"?
> - Users learn only one interface, don't get confused about having
> multiple ones. I think users have "asked" for this kind of
> simplification before.
>
> There's probably something fundamentally wrong with this, so let's here
> what it is; I'll try not to get too embarrassed :-)
>
The part about CAS.getView() returning a CAS is what we do today! And
some users are certainly confused by this, although perhaps users will
be confused no matter what we do, since this is complex. I think part
of the confusion is that we have too FEW interfaces - fewer interfaces
doesn't mean less complexity if we use one interface to refer to two
quite different things. The "whole CAS" ("base CAS") is a different
animal than a view, and there are a lot of things you can't do on a
"whole CAS". Since we have only one interface, that means we have a
lot of methods that throw exceptions if you try to call them on the
"whole CAS". This is very confusing.
The part about merging CAS and JCas - I don't see that this is solving
any major problem. It's true I've heard a user or two ask for these
to be merged, but they didn't convince me. I think it's OK to have
different styles of interfaces to the CAS. Anyway I think we have
bigger fish to fry.
-Adam
Re: CAS/CasView design, another summary
Posted by Marshall Schor <ms...@schor.com>.
Thilo Goetz wrote:
>> <snip> I think the difficult UIMA developers find is not necessarily
>> an indication of the difficulty users would have. UIMA developers
>> are trying to keep multiple use cases of multiple kinds of users
>> (e.g. sofa-aware, sofa-unaware) in mind simultaneously, and come up
>> with a design which satisifies all of these somewhat conflicting
>> goals, simultaneously. (That's why we're having all these headaches
>> :-) )
>
> I don't think so. I've helped many a new user through their initial
> and growing UIMA pains (and so have you, I know). There's certainly a
> lot of confusion with the CAS/JCas interfaces we already have, and the
> current proposal doesn't make things easier (it eliminates virtually
> no APIs, but makes some deprecated and adds a whole bunch of new ones,
> without adding any functionality).
>
Perhaps a useful thing to explore is to consider merging *all* the
"user-facing" CAS APIs (CAS, CASView, JCas, JCasView), thereby
*eliminating* some APIs. I'm thinking we would still have the ability
to have multiple views, each having a different "object" implementing
the API; but there would be just one Interface API for this. In other
words, the CAS getView(...) method would return a CAS.
Also I'm thinking we would still support JCas and CAS, while getting rid
of the JCas Interface. For instance, the "new MyAnnotation(....)"
methods could take a CAS argument - it's trivial to get the
corresponding JCas from a CAS Object.
What does this "break" in the bigger picture?
- It diminishes somewhat the multi-view notion, because there's only
one API, not a separate one for the "View".
What does this "enhance"?
- Users learn only one interface, don't get confused about having
multiple ones. I think users have "asked" for this kind of
simplification before.
There's probably something fundamentally wrong with this, so let's here
what it is; I'll try not to get too embarrassed :-)
-Marshall
Re: CAS/CasView design, another summary
Posted by Thilo Goetz <tw...@gmx.de>.
Marshall Schor wrote:
> Thilo Goetz wrote:
>> As I see it, we're not going to reach consensus on this issue. I
>> guess this is at least in part due to the fact that we disagree on the
>> basic premises underlying this redesign. I am -1 to the current
>> proposal, and I'll give my reasons below. However, I think we've
>> mostly discussed most of what I have to say, and if everybody else
>> thinks the current proposal is a good idea, I will not stand in its
>> way. Anyway, here goes.
>
> Thanks for trying to clearly restate your thinking :-)
>> <snip>
>> The switch from single-artifact CASes to multi-Sofa CASes and views
>> was a fundamental change in the basic UIMA architecture. We are not
>> doing our users a favor by hiding this change from them.
>
> I think it's useful to recognize there are sofa-aware components, and
> sofa-unaware components. Most of the components so far are sofa-unaware
> ones - although this may change somewhat over time. I think it is
> useful to make writing sofa-unaware components "easy" in the sense of not
> forcing these to deal with multiple sofas/views concepts. This is what
> is driving some of the design thinking, I believe, not just trying to be
> "backward compatible". I also think this is useful for UIMA adoption -
> in helping new users climb the learning curve - initially they would be
> able to ignore multi-sofa/ multi-views.
But that's not what the proposal suggests. In the current proposal, the
view methods on the CAS are deprecated.
>
> For sofa-aware components, I agree it is not useful to hide this.
>> By sacrificing a clean design to backward compatibility, we may keep
>> some existing users happy, but we're not going to gain any new ones.
>> If even UIMA developers find it that hard to get their heads wrapped
>> around the concepts and APIs, how much harder is it going to be for
>> new users?
>
> Is the main sacrifice you see to "clean design" the inclusion of
> forwarding methods in the CasView to avoid users having to pay attention to
> casView.getCas(), and recognizing this distinction? If not, I may have
> missed it...
>
> If so, I've had more than one user tell me they don't like to have to
> remember how we organize our objects at this level, to follow chains to
> get to methods they want. They like the forwarding methods. Since
> these APIs are mainly for the users, I would say we should be willing to
> sacrifice some "cleanliness" for this.
I've never heard this before. Let those users come forward and discuss
that on the mailing list. I could simply claim that for each user who
wants forwarding functions there are two who don't, but who have never
said so because there is no need.
>
> I think the difficult UIMA developers find is not necessarily an
> indication of the difficulty users would have. UIMA developers are
> trying to keep multiple use cases of multiple kinds of users (e.g.
> sofa-aware, sofa-unaware) in mind simultaneously, and come up with a
> design which satisifies all of these somewhat conflicting goals,
> simultaneously. (That's why we're having all these headaches :-) )
I don't think so. I've helped many a new user through their initial and
growing UIMA pains (and so have you, I know). There's certainly a lot
of confusion with the CAS/JCas interfaces we already have, and the
current proposal doesn't make things easier (it eliminates virtually no
APIs, but makes some deprecated and adds a whole bunch of new ones,
without adding any functionality).
>
>>
>> I question the need for backward compatibility for Sofa-unaware
>> annotators. Those days are over. This basic tenet robs us of the
>> ability to clean up the CAS APIs. For example, when I look at the CAS
>> APIs from a world where views are real, I naturally expect
>> CAS.getIndexRepository() to return all indexes in the CAS to me, not
>> just the ones for the default view.
>
> In the case where the world is one where "views are real" - that
> naturally feels like the case of a sofa-aware component.
> - For sofa-aware components, I would expect this call to be invalid (as
> a User), because Index-sets "belong" to Views, and the CAS isn't a view.
> - For sofa-unaware components, I would expect this to work as before -
> this is more like the case where "views aren't real".
This contradicts the "everything is accessible from the CAS without
views" axiom.
>>
>>
>> The CommonCas interface adds to the confusion, because it isn't (a
>> common CAS API). It follows the methodology that everything that can
>> be abstracted, is abstracted. However, that's not how people think.
>> We like to think in API groups and what things logically belong
>> together, not what can and can not be grouped because of method return
>> types. So all it does is add to the confusion because you always have
>> to look in two places for APIs.
>
> Well, we can rename the CommonCas interface, if we can come up with a
> better name. But I find that abstraction is very useful for ongoing
> code maintenance, and understanding what is intended to be the same
> and/or different among things. It often shows up design oversights -
> something is done in one case and not "thought of" by the developer in
> another case.
It certainly shows that something is wrong with our design, I agree. I
just disagree on the way of fixing it. Let's come up with a definition
of what makes a CAS a CAS. Then have an interface that defines that.
Then we can implement it a couple or three or four times.
> From a documentation point of view, I hope to have it both ways - by
> describing the JCas and Cas APIs as including the CommonCas API (which
> of course it does, as a super-interface). So the users won't need to
> pay attention to this detail of abstraction; they can ignore the
> CommonCas API as a separate entity. The current IDEs like Eclipse
> support this, too (e.g., autocompletion shows the whole set).
The JCas is a wrapper around the plain old CAS. If we position it that
way, we don't need a common ancestor. Why doesn't the JCas just extend
the CAS interface, if it inherits that many functions?
Re: CAS/CasView design, another summary
Posted by Marshall Schor <ms...@schor.com>.
Thilo Goetz wrote:
> As I see it, we're not going to reach consensus on this issue. I
> guess this is at least in part due to the fact that we disagree on the
> basic premises underlying this redesign. I am -1 to the current
> proposal, and I'll give my reasons below. However, I think we've
> mostly discussed most of what I have to say, and if everybody else
> thinks the current proposal is a good idea, I will not stand in its
> way. Anyway, here goes.
Thanks for trying to clearly restate your thinking :-)
> <snip>
> The switch from single-artifact CASes to multi-Sofa CASes and views
> was a fundamental change in the basic UIMA architecture. We are not
> doing our users a favor by hiding this change from them.
I think it's useful to recognize there are sofa-aware components, and
sofa-unaware components. Most of the components so far are sofa-unaware
ones - although this may change somewhat over time. I think it is
useful to make writing sofa-unaware components "easy" in the sense of not
forcing these to deal with multiple sofas/views concepts. This is what
is driving some of the design thinking, I believe, not just trying to be
"backward compatible". I also think this is useful for UIMA adoption -
in helping new users climb the learning curve - initially they would be
able to ignore multi-sofa/ multi-views.
For sofa-aware components, I agree it is not useful to hide this.
> By sacrificing a clean design to backward compatibility, we may keep
> some existing users happy, but we're not going to gain any new ones.
> If even UIMA developers find it that hard to get their heads wrapped
> around the concepts and APIs, how much harder is it going to be for
> new users?
Is the main sacrifice you see to "clean design" the inclusion of
forwarding methods in the CasView to avoid users having to pay attention to
casView.getCas(), and recognizing this distinction? If not, I may have
missed it...
If so, I've had more than one user tell me they don't like to have to
remember how we organize our objects at this level, to follow chains to
get to methods they want. They like the forwarding methods. Since
these APIs are mainly for the users, I would say we should be willing to
sacrifice some "cleanliness" for this.
I think the difficult UIMA developers find is not necessarily an
indication of the difficulty users would have. UIMA developers are
trying to keep multiple use cases of multiple kinds of users (e.g.
sofa-aware, sofa-unaware) in mind simultaneously, and come up with a
design which satisifies all of these somewhat conflicting goals,
simultaneously. (That's why we're having all these headaches :-) )
>
> I question the need for backward compatibility for Sofa-unaware
> annotators. Those days are over. This basic tenet robs us of the
> ability to clean up the CAS APIs. For example, when I look at the CAS
> APIs from a world where views are real, I naturally expect
> CAS.getIndexRepository() to return all indexes in the CAS to me, not
> just the ones for the default view.
In the case where the world is one where "views are real" - that
naturally feels like the case of a sofa-aware component.
- For sofa-aware components, I would expect this call to be invalid
(as a User), because Index-sets "belong" to Views, and the CAS isn't a
view.
- For sofa-unaware components, I would expect this to work as before -
this is more like the case where "views aren't real".
>
>
> The CommonCas interface adds to the confusion, because it isn't (a
> common CAS API). It follows the methodology that everything that can
> be abstracted, is abstracted. However, that's not how people think.
> We like to think in API groups and what things logically belong
> together, not what can and can not be grouped because of method return
> types. So all it does is add to the confusion because you always have
> to look in two places for APIs.
Well, we can rename the CommonCas interface, if we can come up with a
better name. But I find that abstraction is very useful for ongoing
code maintenance, and understanding what is intended to be the same
and/or different among things. It often shows up design oversights -
something is done in one case and not "thought of" by the developer in
another case.
From a documentation point of view, I hope to have it both ways - by
describing the JCas and Cas APIs as including the CommonCas API (which
of course it does, as a super-interface). So the users won't need to
pay attention to this detail of abstraction; they can ignore the
CommonCas API as a separate entity. The current IDEs like Eclipse
support this, too (e.g., autocompletion shows the whole set).
-Marshall