Re: [sugar] Activity names vs. types (was: synapse/cerebro)

2008-07-25 Thread Sjoerd Simons
On Fri, Jul 25, 2008 at 12:12:20AM -0400, Polychronis Ypodimatopoulos wrote:
 A valid argument. I remember discussing the idea behind this in the past  
 with Michael, but I'm not sure if Sugar landed a decision on this. The  
 activity type is supposed group different activities into a single type  
 based on their capabilities and represent this group with a two-byte  
 field. For example, I wrote an activity that does chat, file sharing and  
 a bidding game. I _believe_ the activity should advertise its  
 capabilities as 'xx' for chat, '\x00\x01' for file-sharing and '99' for  
 the bidding game. The bytes chosen are clearly random, but the idea is  
 that my activity would be able to engage in a chat session with a  
 regular chat activity under the same activity type, or with previous  
 version of itself lacking the file-sharing capability. Maybe this is  
 simply an overkill.

There are various issues here. First is that the activity name as currently
defined doesn't say what actual capabilities an activity has. It refers to a
specific application. This was done because the assumption is/was that the
environment is homogenous and if you missing an activity you will be able to
download it from your friends and/or the server.

I am not sure splitting it up in capabilities makes sense. The bit of
information sugar is interested is in currently, is what application is this
used for a certain activity on the network so it can startup the same activity.
What you don't want is to startup Chat to participate in a drawing session,
because even though the drawing session might have a chat associated with it,
the point is drawing and talking about the drawing, not free-form chatting :)

The other issue with just using two bytes is that there is no central registry,
like we have with port numbers. The idea about using reverse domain names say
like org.my.school.Myname.MyActivity instead of say 42 is that it's a lot
easier to guarantee global uniqueness. If the hitchhickers guide becomes
popular in a school you don't want newly created activities to get all confused
because suddenly everyone is using 42 for their type ;)

 At any rate, I will add (I filed a ticket) a sufficiently large (255  
 chars?) name field for activities, although I would much prefer  
 designing this mechanism properly (any suggestions by Sugar(ed)  
 developers?).

The point of Synapse currently is to have a mostly drop-in connection manager
on top of Cerebro that Sugar can use with minimal changes. So we can judge how
well it works for Sugar.

While the current OLPC telepathy API are definately not perfect (they were
designed when there was still a lot of uncertainty about what sugar was gonna
look like), we do want to keep using them for now. I think nobody is against
refactoring them at some point in the future, but that would be a much bigger
and sugar-wide effort.

  Sjoerd
-- 
I hope you're not pretending to be evil while secretly being good.
That would be dishonest.
___
Sugar mailing list
Sugar@lists.laptop.org
http://lists.laptop.org/listinfo/sugar


Re: [sugar] Activity names vs. types

2008-07-24 Thread Benjamin M. Schwartz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Polychronis Ypodimatopoulos wrote:
| At any rate, I will add (I filed a ticket) a sufficiently large (255
| chars?) name field for activities, although I would much prefer
| designing this mechanism properly (any suggestions by Sugar(ed)
| developers?).

I last discussed this issue with you at
http://wiki.laptop.org/go/On_Presence_updates/User_Profiles/Collaboration.
~ I didn't understand your perspective then, and I still don't understand
it now.  I don't know what you intend to achieve with Activity Type IDs,
why they're so short, or how they will be exposed through Telepathy.
However, I can ask a question:

Why does the name field have to be some fixed size?  Would it not be more
efficient and flexible to use delimiters and let the size float?

- --Ben
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkiJWckACgkQUJT6e6HFtqT6nwCfcSAHTKkrFOoSlBnX4wwTJsfY
h1gAn0l19BcTCuLqKhjs2R6VYHqHiKUD
=k+PK
-END PGP SIGNATURE-
___
Sugar mailing list
Sugar@lists.laptop.org
http://lists.laptop.org/listinfo/sugar


Re: [sugar] Activity names vs. types

2008-07-24 Thread Polychronis Ypodimatopoulos
Hi Ben,

Benjamin M. Schwartz wrote:
 I last discussed this issue with you at
 http://wiki.laptop.org/go/On_Presence_updates/User_Profiles/Collaboration. 

 ~ I didn't understand your perspective then, and I still don't understand
 it now.

Please be more specific on what part of the activity type you don't 
understand. I thought of it similarly to port numbers, some of which are 
well known and some are not. Different web servers may be used on port 
80, but they all use the HTTP protocol. I understand that you may not 
agree with the port numbering system altogether and I don't really 
insist on activity types either. Just an idea.

 Why does the name field have to be some fixed size?  Would it not be more
 efficient and flexible to use delimiters and let the size float?

I was being plainly lazy. I still think there should be a proper design, 
potentially from scratch, of the activity sharing mechanism, as I am not 
satisfied neither with cerebro's implementation, nor with telepathy's.

Pol


-- 
Polychronis Ypodimatopoulos
Graduate student
Viral Communications
MIT Media Lab
Tel: +1 (617) 459-6058
http://www.mit.edu/~ypod/

___
Sugar mailing list
Sugar@lists.laptop.org
http://lists.laptop.org/listinfo/sugar