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

Extract federation code into a gem and integrate it in diaspora #5114

Closed
Flaburgan opened this issue Aug 12, 2014 · 22 comments
Closed

Extract federation code into a gem and integrate it in diaspora #5114

Flaburgan opened this issue Aug 12, 2014 · 22 comments

Comments

@Flaburgan
Copy link
Member

@Flaburgan Flaburgan commented Aug 12, 2014

@Raven24 did an awesome work rewritting all the federation code of diaspora* in a gem available on his repo:

The next step is to integrate it inside the diaspora* code and then remove all the code which does not use this gem. Once done, it will be way more easier to debug, test and improve the federation, and we will be sure that the gem doesn't have bugs, so we can promote it to the world.

  • dig out the testbed project, verify it still runs (optional)
  • document how to run it + extend to more test cases, eventually covering all federation events (optional)
  • use the gem for generating user discovery documents (hostmeta, webfinger, hcard) - this should be relatively easy
  • use the gem for parsing user discovery documents - this could mean some bigger changes to the core code. we may need some additional test coverage in this area.
  • use the gem for generating federation messags (salmon envelopes w/o encryption, payloads) - this will touch some of the oldest code in this project. creating a pull request as early as possible is strongly recommended. this part requires regression testing with an unmodified d* server.
  • use the gem for parsing federation messsages - same as above
  • publish the gem as 0.0.1(?) and move the repo to the d* organization on GitHub

@DeadSuperHero
Copy link
Member

@DeadSuperHero DeadSuperHero commented Aug 12, 2014

I would definitely love to see work on this. It'd be extremely useful for figuring out improvements to federation going forward.

@ghost
Copy link

@ghost ghost commented Aug 13, 2014

So, as I understand, D* is not currently runing this gem at all ? Neither on dev env nor on prod ?

@jhass
Copy link
Member

@jhass jhass commented Aug 13, 2014

No, not at all.

@Flaburgan
Copy link
Member Author

@Flaburgan Flaburgan commented Aug 19, 2014

Could @jhass or @Raven24 please edit my issue to add a "roadmap" / todo on which tasks need to be done and in which order?

@Raven24
Copy link
Member

@Raven24 Raven24 commented Aug 20, 2014

I added some todos

@goobertron
Copy link

@goobertron goobertron commented Aug 20, 2014

Thanks, guys.

@Raven24
Copy link
Member

@Raven24 Raven24 commented Aug 23, 2014

@dimaursu
Copy link
Contributor

@dimaursu dimaursu commented Jan 22, 2015

Some of the specs do not belong in the main repository (and so do the same libraries):
https://github.com/diaspora/diaspora/blob/develop/spec/lib/hcard_spec.rb, for example. Or maybe I should leave them in place, as integration tests. I'll think about it.

I started some work, but unfortunately there aren't that many tests for the federation itself - it's hard to tell if I broke it or it's still working. I'll work on the tests the following days.

@jaywink
Copy link
Contributor

@jaywink jaywink commented Jul 1, 2015

@Raven24 and others: @SuperTux88 is working on a diaspora_federation gem also. Unless the plan has "changed" and raven24's gem isn't going to be used and supertux's gem will be used (between you guys), I'm worried there could be lots of effort lost from someone, so just calling out here for possibility for some work-together in this area?

Also, there is a $185 bounty to the person who integrates raven24's gem. I'm going to throw in the assumption that we can rename the issue to "implement diaspora federation through a gem" etc.

@Raven24
Copy link
Member

@Raven24 Raven24 commented Jul 1, 2015

we're on it: SuperTux88/diaspora_federation#1
;)

@Flaburgan
Copy link
Member Author

@Flaburgan Flaburgan commented Jul 13, 2015

First step, #6151 is merged! I didn't follow closely what have been done so I let someone else edit the task list.

@SuperTux88
Copy link
Member

@SuperTux88 SuperTux88 commented Jul 13, 2015

this is done: "use the gem for generating user discovery documents (hostmeta, webfinger, hcard) - this should be relatively easy" but I have no permissions to edit it.

@jaywink
Copy link
Contributor

@jaywink jaywink commented Jul 13, 2015

Mind if I rewrite the issue or can you @Flaburgan do it? To a more generic "move stuff to federation gem" :) I'm also not sure the testbed needs to be a "requirement".

@Flaburgan Flaburgan changed the title Refactor federation code to use Raven24's gem Extract federation code into a gem and integrate it in diaspora Jul 13, 2015
@SuperTux88
Copy link
Member

@SuperTux88 SuperTux88 commented Aug 21, 2015

"use the gem for parsing user discovery documents" is done with #6310.

@cmrd-senya
Copy link
Member

@cmrd-senya cmrd-senya commented Oct 22, 2015

I have updated the testbed so that it passes tests now: https://github.com/cmrd-senya/federation-testbed

@cmrd-senya
Copy link
Member

@cmrd-senya cmrd-senya commented Oct 22, 2015

I'll look into extending tests for it.

@cmrd-senya
Copy link
Member

@cmrd-senya cmrd-senya commented Oct 22, 2015

Am I right that the @Raven24's gem is not used anymore, and now all the job is concentrated around the @SuperTux88's gem?

But as far as I can see there are some parts of @Raven24's gem that are not in the @SuperTux88's gem.

Actually, the testbed is a cucumber test suit for the federation gem, so maybe just merge it within the gem's repository?

@cmrd-senya
Copy link
Member

@cmrd-senya cmrd-senya commented Oct 23, 2015

I think the "dig out the testbed project, verify it still runs" can be marked as done.

@SuperTux88
Copy link
Member

@SuperTux88 SuperTux88 commented Oct 23, 2015

sorry, had no time to respond yesterday and also had not much time in the last weeks to work on the gem ;) maybe this weekend ...

yes, I'm writing a new gem (based on the one from @Raven24), but I have only finished the whole discovery stuff (webfinger/hcard), and I'm now working on the salmon part (but not finished yet, as you may have noticed already).

you can create a pull-request to merge the testbed, but maybe it is better to wait a little until the salmon stuff is finished.

cmrd-senya added a commit to cmrd-senya/diaspora that referenced this issue Oct 28, 2015
This is a prototype made in purpose to try and implement an automated
way of testing federation. This patch contains a test for an outgoing
federation message.

The test case loads federation-testbed as a gem. It uses an embedded
Sinatra web application of the testbed and stubs outgoing federated
calls to it. The testbed application process queries as if it were real
Diaspora pod and will fail a test in case when the received message
is inconsistent.

This is an early version used to highlight difficulties and issues
of the approach and implementation. Development versions of the
involved gems are used.

refs diaspora#5114 diaspora#6479
cmrd-senya added a commit to cmrd-senya/diaspora that referenced this issue Oct 29, 2015
This is a prototype made in purpose to try and implement an automated
way of testing federation. This patch contains a test for an outgoing
federation message.

The test case loads federation-testbed as a gem. It uses an embedded
Sinatra web application of the testbed and stubs outgoing federated
calls to it. The testbed application process queries as if it were real
Diaspora pod and will fail a test in case when the received message
is inconsistent.

This is an early version used to highlight difficulties and issues
of the approach and implementation. Development versions of the
involved gems are used.

refs diaspora#5114 diaspora#6479
cmrd-senya added a commit to cmrd-senya/diaspora that referenced this issue Nov 2, 2015
This is a prototype made in purpose to try and implement an automated
way of testing federation. This patch contains a test for an outgoing
federation message.

The test case loads federation-testbed as a gem. It uses an embedded
Sinatra web application of the testbed and stubs outgoing federated
calls to it. The testbed application process queries as if it were real
Diaspora pod and will fail a test in case when the received message
is inconsistent.

This is an early version used to highlight difficulties and issues
of the approach and implementation. Development versions of the
involved gems are used.

refs diaspora#5114 diaspora#6479
cmrd-senya added a commit to cmrd-senya/diaspora that referenced this issue Nov 2, 2015
This is a prototype made in purpose to try and implement an automated
way of testing federation. This patch contains a test for an outgoing
federation message.

The test case loads federation-testbed as a gem. It uses an embedded
Sinatra web application of the testbed and stubs outgoing federated
calls to it. The testbed application process queries as if it were real
Diaspora pod and will fail a test in case when the received message
is inconsistent.

This is an early version used to highlight difficulties and issues
of the approach and implementation. Development versions of the
involved gems are used.

refs diaspora#5114 diaspora#6479
@Flaburgan
Copy link
Member Author

@Flaburgan Flaburgan commented Jun 27, 2016

Can... Can this be closed? ...

@denschub
Copy link
Member

@denschub denschub commented Jun 27, 2016

Yes, you are very right! Thanks.

@denschub denschub closed this Jun 27, 2016
@jhass jhass added this to the 0.6.0.0 milestone Jun 27, 2016
@ghost
Copy link

@ghost ghost commented Jun 27, 2016

YOLOOOOOOOOOOOOOO

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

Successfully merging a pull request may close this issue.

None yet
10 participants
You can’t perform that action at this time.