Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not give activities telepathy Tubes - they are deprecated #270

Closed

Conversation

samdroid-apps
Copy link
Contributor

Replaces #260 - does exactly the same thing, just removes more code

Tubes API has been deprecated since 0.17.25 [1], which was probably
around 2009. This has since been removed from telepathy, breaking
collaberation.

Activities are still given a text channel. They can also make their
own channels by using the telepathy connection and calling
CreateChannel on the requests interface.

[1] http://telepathy.freedesktop.org/spec/Channel_Type_Tubes.html

Also, we use RequestChannel rather than the new and not deprecated CreateChannel. I'll make a patch for that too 😄

Tubes API has been deprecated since 0.17.25 [1], which was probably
around 2009.  This has since been removed from telepathy, breaking
collaberation.

Activities are still given a text channel.  They can also make their
own channels by using the telepathy connection and calling
CreateChannel on the requests interface.

[1]  http://telepathy.freedesktop.org/spec/Channel_Type_Tubes.html
@samdroid-apps
Copy link
Contributor Author

I got the EnsureChannel (not CreateChannel, EnsureChannel is more appropriate for this) api working. See the new commit:

commit 4f32695
Author: Sam Parkinson sam@sam.today
Date: Wed Nov 18 07:03:17 2015 +1100

Use EnsureChannel to create chans, not deprecated RequestChannel

RequestChannel is a flawed api and has been deprecated for a long
time [1].

[1] http://telepathy.freedesktop.org/doc/book/sect.channel.requesting.html#sect.channel.requesting.requestchannel

Telepathy tubes have been long deprecated, and since removed
upstream.  The api has been split into DBus tubes and steam tubes,
meaning there is not replacement that could be added for the tubes.
@samdroid-apps
Copy link
Contributor Author

Right, I promise that this won't become a massive working branch of everything I've ever wanted to do, but I got to add 1 more commit. Just a small obvious one.

commit 35951e9af409c839b22797e5476a2ecfafbd2123
Author: Sam Parkinson <sam@sam.today>
Date:   Wed Nov 18 07:20:57 2015 +1100

    Deprecate telepathy tubes wrappers

    Telepathy tubes have been long deprecated, and since removed
    upstream.  The api has been split into DBus tubes and steam tubes,
    meaning there is not replacement that could be added for the tubes.

@quozl
Copy link
Contributor

quozl commented Nov 17, 2015

35951e9 is fine for merging as is, since it is only a documentation change.

What systematic testing has been done between this branch and systems using the older API? Is there a test plan on the Wiki? Has the test covered both gabble and salut?

If you need a quick VM to spin up, the Ubuntu page on the Wiki has an installer, which still uses the older API and telepathy.

@samdroid-apps
Copy link
Contributor Author

I'll write up a feature page. But basically:

  • CreateChannel/EnsureChannel is already used by the file transfer code -
    its not some new api that was released yesterday
  • This breaks compatibility with activities that use tubes - which is fine
    because it is so easy to port. Maybe we can still give activities tubes if
    they are on ancient telepathy - but that could confuse users who don't know
    about the change and can we please try to have a standard api instead of
    lots of random stuff
  • you can still have collab between old telepathy and 'new' telepathy
    platforms - the activity will just transfer data using the text channel
    which both platforms use

On Wed, Nov 18, 2015, 10:36 AM James Cameron notifications@github.com
wrote:

35951e9
35951e9
is fine for merging as is, since it is only a documentation change.

What systematic testing has been done between this branch and systems
using the older API? Is there a test plan on the Wiki? Has the test covered
both gabble and salut?

If you need a quick VM to spin up, the Ubuntu page on the Wiki has an
installer, which still uses the older API and telepathy.


Reply to this email directly or view it on GitHub
#270 (comment)
.

@samdroid-apps
Copy link
Contributor Author

Actually there seems to be a property that tells you the RequestableChannelProperties - so maybe that will allow sugar to detect Tubes support. If so, we could give the tube to the activity depending on if the platform supports it. That would only break old activities on new systems. I'll test it out.

@walterbender
Copy link
Member

As far as I can tell, most of the old activities using Tubes are using them
as text channels (all of the ones I wrote, which is the large majority of
activities that share). So updating them to use Text channels is not going
to hurt anything, especially if they are released as for Sugar 108+.

On Wed, Nov 18, 2015 at 4:26 AM, Sam notifications@github.com wrote:

Actually there seems to be a property that tells you the
RequestableChannelProperties - so maybe that will allow sugar to detect
Tubes support. If so, we could give the tube to the activity depending on
if the platform supports it. That would only break old activities on new
systems. I'll test it out.


Reply to this email directly or view it on GitHub
#270 (comment)
.

Walter Bender
Sugar Labs
http://www.sugarlabs.org

@godiard
Copy link
Contributor

godiard commented Nov 18, 2015

Some activities use tubes to transfer files over http (Record, ImageViewer), Write use some magic to channel abiword collab, and Memorize use a dbus tube.
Other activities using tubes are:

[gonzalo@localhost honey]$ grep -r TUBE_TYPE * --include=*.py
browse/browse-activity/webactivity.py:        if (type == telepathy.TUBE_TYPE_DBUS and
calculate/sugarlabs-calculate/shareable_activity.py:        if (type == telepathy.TUBE_TYPE_DBUS and service == IFACE):
calculate/mainline/shareable_activity.py:        if (type == telepathy.TUBE_TYPE_DBUS and service == IFACE):
distance/distance/activity.py:        if (type == telepathy.TUBE_TYPE_STREAM and
distance/distance-activity/activity.py:        if (type == telepathy.TUBE_TYPE_STREAM and
memorize/memorize-activity/activity.py:        if (tube_type == telepathy.TUBE_TYPE_DBUS and
physics/mainline/activity.py:        if (type == telepathy.TUBE_TYPE_DBUS and service == SERVICE):
pippy/mainline/groupthink/sugar_tools.py:        if (type == telepathy.TUBE_TYPE_DBUS and
poll/poll-activity/poll.py:        if (type == telepathy.TUBE_TYPE_DBUS and service == SERVICE):
portfolio/portfolio/PortfolioActivity.py:        if (type == telepathy.TUBE_TYPE_DBUS and service == SERVICE):
record/record-activity/collab.py:        if type != telepathy.TUBE_TYPE_DBUS or service != constants.DBUS_SERVICE:
speak/mainline/toolkit/activity.py:        if (type == telepathy.TUBE_TYPE_DBUS and
stopwatch/stopwatch/activity.py:        if (type == telepathy.TUBE_TYPE_DBUS and
story/story/StoryActivity.py:        if (type == telepathy.TUBE_TYPE_DBUS and service == SERVICE):
turtleart/mainline/TurtleArt/tacollaboration.py:        if (type == telepathy.TUBE_TYPE_DBUS and service == SERVICE):
watchme/mainline/watchme.py:        if ((tube_type == telepathy.TUBE_TYPE_STREAM) and

I don't know how they are affected by this change.

@walterbender
Copy link
Member

Most of the activities you listed should be modified to use text channels
(this is a series of GCI tasks). The few that use Tubes for binary data
will still not work after this change. But there should be no regressions.

On Wed, Nov 18, 2015 at 8:19 AM, Gonzalo Odiard notifications@github.com
wrote:

Some activities use tubes to transfer files over http (Record,
ImageViewer), Write use some magic to channel abiword collab, and Memorize
use a dbus tube.

Other activities using tubes are:

[gonzalo@localhost honey]$ grep -r TUBE_TYPE * --include=*.py
browse/browse-activity/webactivity.py: if (type == telepathy.TUBE_TYPE_DBUS and
calculate/sugarlabs-calculate/shareable_activity.py: if (type == telepathy.TUBE_TYPE_DBUS and service == IFACE):
calculate/mainline/shareable_activity.py: if (type == telepathy.TUBE_TYPE_DBUS and service == IFACE):
distance/distance/activity.py: if (type == telepathy.TUBE_TYPE_STREAM and
distance/distance-activity/activity.py: if (type == telepathy.TUBE_TYPE_STREAM and
memorize/memorize-activity/activity.py: if (tube_type == telepathy.TUBE_TYPE_DBUS and
physics/mainline/activity.py: if (type == telepathy.TUBE_TYPE_DBUS and service == SERVICE):
pippy/mainline/groupthink/sugar_tools.py: if (type == telepathy.TUBE_TYPE_DBUS and
poll/poll-activity/poll.py: if (type == telepathy.TUBE_TYPE_DBUS and service == SERVICE):
portfolio/portfolio/PortfolioActivity.py: if (type == telepathy.TUBE_TYPE_DBUS and service == SERVICE):
record/record-activity/collab.py: if type != telepathy.TUBE_TYPE_DBUS or service != constants.DBUS_SERVICE:
speak/mainline/toolkit/activity.py: if (type == telepathy.TUBE_TYPE_DBUS and
stopwatch/stopwatch/activity.py: if (type == telepathy.TUBE_TYPE_DBUS and
story/story/StoryActivity.py: if (type == telepathy.TUBE_TYPE_DBUS and service == SERVICE):
turtleart/mainline/TurtleArt/tacollaboration.py: if (type == telepathy.TUBE_TYPE_DBUS and service == SERVICE):
watchme/mainline/watchme.py: if ((tube_type == telepathy.TUBE_TYPE_STREAM) and

I don't know how they are affected by this change.


Reply to this email directly or view it on GitHub
#270 (comment)
.

Walter Bender
Sugar Labs
http://www.sugarlabs.org

@samdroid-apps
Copy link
Contributor Author

On Thu, Nov 19, 2015, 00:19 Gonzalo Odiard notifications@github.com wrote:

Some activities use tubes to transfer files over http (Record,
ImageViewer), Write use some magic to channel abiword collab, and Memorize
use a dbus tube.

Other activities using tubes are:

[gonzalo@localhost honey]$ grep -r TUBE_TYPE * --include=*.py
browse/browse-activity/webactivity.py: if (type == telepathy.TUBE_TYPE_DBUS
and calculate/sugarlabs-calculate/shareable_activity.py: if (type ==
telepathy.TUBE_TYPE_DBUS and service == IFACE):
calculate/mainline/shareable_activity.py: if (type ==
telepathy.TUBE_TYPE_DBUS and service == IFACE):
distance/distance/activity.py: if (type == telepathy.TUBE_TYPE_STREAM and
distance/distance-activity/activity.py: if (type ==
telepathy.TUBE_TYPE_STREAM and memorize/memorize-activity/activity.py: if
(tube_type == telepathy.TUBE_TYPE_DBUS and physics/mainline/activity.py: if
(type == telepathy.TUBE_TYPE_DBUS and service == SERVICE):
pippy/mainline/groupthink/sugar_tools.py: if (type ==
telepathy.TUBE_TYPE_DBUS and poll/poll-activity/poll.py: if (type ==
telepathy.TUBE_TYPE_DBUS and service == SERVICE):
portfolio/portfolio/PortfolioActivity.py: if (type ==
telepathy.TUBE_TYPE_DBUS and service == SERVICE):
record/record-activity/collab.py: if type != telepathy.TUBE_TYPE_DBUS or
service != constants.DBUS_SERVICE: speak/mainline/toolkit/activity.py: if
(type == telepathy.TUBE_TYPE_DBUS and stopwatch/stopwatch/activity.py: if
(type == telepathy.TUBE_TYPE_DBUS and story/story/StoryActivity.py: if
(type == telepathy.TUBE_TYPE_DBUS and service == SERVICE):
turtleart/mainline/TurtleArt/tacollaboration.py: if (type ==
telepathy.TUBE_TYPE_DBUS and service == SERVICE):
watchme/mainline/watchme.py: if ((tube_type == telepathy.TUBE_TYPE_STREAM)
and

I don't know how they are affected by this change.

I've got a patch set on my computer that adds file transfer channel support
to the collaboration wrapper. I'll debug and document it before I share it
:)


Reply to this email directly or view it on
#270 (comment)
GitHub
#270 (comment).

@samdroid-apps
Copy link
Contributor Author

Oh, my email reply didn't work @godiard. I'll try again:

Write -- I'll replace it with a DBusTube
HTTP Over Tubes -- I've got a file transfer tubes working with the collab wrapper. That removes a lot of code 😄. I'll update this once that is debuged and documented.
Memorize -- There is now a DBusTube. But is porting that eaiser than using collab wrapper? IDK, I haven't looked.

@samdroid-apps
Copy link
Contributor Author

Also, gtk2 actiities (calculate, turtle art, etc.) will need to be treated differently. They use a different toolkit and need different patches to the toolkit.

@godiard
Copy link
Contributor

godiard commented Nov 18, 2015

@samdroid-apps, re: gtk2 activities: good point. Is a good incentive to continue migration to gtk3. Sadly, some activities were more difficult than others, in particular when we need make them work on F18. By example Record was not ported because the plugins needed to use the hardware acceleration in arm devices required a particular Gst version. I think Walter was blocked in some audio issue too.

@walterbender
Copy link
Member

Maybe it is time to port Turtle w/o the GST code.

On Wed, Nov 18, 2015 at 4:11 PM, Gonzalo Odiard notifications@github.com
wrote:

@samdroid-apps https://github.com/samdroid-apps, re: gtk2 activities:
good point. Is a good incentive to continue migration to gtk3. Sadly, some
activities were more difficult than others, in particular when we need make
them work on F18. By example Record was not ported because the plugins
needed to use the hardware acceleration in arm devices required a
particular Gst version. I think Walter was blocked in some audio issue too.


Reply to this email directly or view it on GitHub
#270 (comment)
.

Walter Bender
Sugar Labs
http://www.sugarlabs.org

@samdroid-apps
Copy link
Contributor Author

Unrelated, but here is the patch for write: sugarlabs/write-activity#5

If you want to continue using dbus in your activities, you can do something like this. But for most other activities, it is probably eaiser to use something else.

@samdroid-apps
Copy link
Contributor Author

Will add a conditional setting to enable this on old hardware, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants