Porting Diaspora to another programming language

50 views
Skip to first unread message

Michael

unread,
Nov 6, 2011, 11:07:45 AM11/6/11
to diaspora-dev
Hi,

I am new to Diaspora, and I think it is a very interesting idea.

I was wondering if anyone ever created a port of Diaspora in another
language? Or is it still too early to consider doing this?

I normally build web-applications in Erlang, and I would be very
interested in building an implementation of Diaspora in Erlang so that
I could embed an social network in any site I build.

I have found these: https://github.com/diaspora/diaspora/wiki/Diaspora's-federation-protocol,
https://github.com/diaspora/diaspora/wiki/Diaspora%27s-message-semantics

Is this everything I would need to get started? Are these documents up
to date?

Regards,

Michael

Amirouche Boubekki

unread,
Nov 6, 2011, 2:18:13 PM11/6/11
to diaspo...@googlegroups.com
I'm also interested in this informations.

2011/11/6 Michael <conn...@gmail.com>

Michael

--
You received this message because you are subscribed to the Google Groups "diaspora-dev" group.
To post to this group, send email to diaspo...@googlegroups.com.
To unsubscribe from this group, send email to diaspora-dev...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/diaspora-dev?hl=en.


Sarah Mei

unread,
Nov 6, 2011, 2:25:01 PM11/6/11
to diaspo...@googlegroups.com
On Sun, Nov 6, 2011 at 8:07 AM, Michael <conn...@gmail.com> wrote:
> I was wondering if anyone ever created a port of Diaspora in another
> language? Or is it still too early to consider doing this?

A few people expressed interest in doing this before, but to my
knowledge no one has actually done it. You'll be a pioneer!

I think this is about the right time. We're still working out changes
and additions to our protocol, though, so it's not completely stable,
but we'd love to work with you to see what another implementation
looks like.

> I have found these: https://github.com/diaspora/diaspora/wiki/Diaspora's-federation-protocol,
> https://github.com/diaspora/diaspora/wiki/Diaspora%27s-message-semantics
>
> Is this everything I would need to get started? Are these documents up
> to date?

They are up to date. I am not sure that's everything you need, though.
The best thing you could do is get started, and let us know if there
is other information you'd find useful. You can do that here, or in
the #diaspora-dev irc channel on freenode.

Mike Macgirvin

unread,
Nov 6, 2011, 3:26:20 PM11/6/11
to diaspo...@googlegroups.com
On 7/11/2011 6:25 AM, Sarah Mei wrote:
> A few people expressed interest in doing this before, but to my
> knowledge no one has actually done it. You'll be a pioneer!

What language? We've ported the core communications to PHP for use in
Friendica. That's currently working well, though there are still a few
undocumented pieces we have to reverse engineer.

Pistos

unread,
Nov 6, 2011, 3:59:32 PM11/6/11
to diaspora-dev
Making code use the Diaspora protocol or API is one thing -- it's
quite another to recreate the entire codebase (full stack, including
frontend) in another language. That's not something I think would be
a good use of time and energy. I think it would fragment the project
unnecessarily. Imagine one codebase or the other gets some cool
feature -- then it would have to be written again in the other
language. It might end up not looking the same or not behaving the
same. Or bugs could exist in one implementation, but not the other.
The codebases have significant risk of diverging. That's not a
positive looking future, in my opinion.

Agreed, this is the realm of Open Source, but really, the core
codebase could use all the help it can get. (Am I being too negative
here? :) )



Pistos

Sarah Mei

unread,
Nov 6, 2011, 4:05:31 PM11/6/11
to diaspo...@googlegroups.com
Awesome. It would be great to have a pointer to that code within
friendica to put on the wiki, and also to know what the undocumented
parts are. So we can document them. :)

As far as specifics, I vaguely recall someone early on (a year ago?)
asking about re-implementation in PHP. There was a github project and
everything but I don't think it went anywhere.

Michael Connors

unread,
Nov 6, 2011, 5:03:45 PM11/6/11
to diaspo...@googlegroups.com
On 6 November 2011 22:05, Sarah Mei <sa...@joindiaspora.com> wrote:
Awesome. It would be great to have a pointer to that code within
friendica to put on the wiki, and also to know what the undocumented
parts are. So we can document them. :)


I would be interested in seeing the PHP version as well if it is open, and I would be interested in hearing what was missing in the documentation. 

I might have a go at the discovery part first, as this looks rather clear. 

Thanks for the feedback. 

Michael

Jarkko Moilanen

unread,
Nov 6, 2011, 4:28:43 PM11/6/11
to diaspo...@googlegroups.com


2011/11/6 Pistos <dev.diasp...@purepistos.net>


Agreed, this is the realm of Open Source, but really, the core
codebase could use all the help it can get.  (Am I being too negative
here? :)  )


I have to agree with Pistos. Creating yet-another-solutions-with-another-lang is not good for 'main' project, but as said it's an option for everyone to do. I think it in some cases depends whether the base can be used in some other project or not. If it can, there is no real reason to rewrite stuff. If not, that's another case. Our project is an offspring of D* and we chose to use D* code base 'as is' and extend more features to it (and push upstream if new features seem to fit there). I believe that is also known as incremental development and one of the corner stones of OSS. Don't get me wrong, I have no objections if someone needs/wants to rewrite functions to another language. I just wanted to express one view point, ours (eg http://open-coral.org)

/Jarkko
 
 


Pistos

Mike Macgirvin

unread,
Nov 6, 2011, 6:01:27 PM11/6/11
to diaspo...@googlegroups.com, Michael Connors
> I would be interested in seeing the PHP version as well if it is
> open, and I would be interested in hearing what was missing in the
> documentation.

The project is at http://github.com/friendica/friendica

You can find the bulk of the Diaspora communications in include/diaspora.php

with some extra needed bits in include/crypto.php and the conversion
to/from bbcode to markdown in include/bb2diaspora.php

As far as documentation, I'm not sure anything has changed since I
discovered all kinds of mistakes in the protocol layers and updated the
wiki with that information. Most (but not all) of these issues were
fixed on "Federation Friday" a couple of months ago, but I don't believe
the documentation was updated.

But the documentation left off after describing status posts, comments,
likes and friending. There are several other types of messages -

profile updates
"conversations" used in private mail
signed retractions
photos
"activity-streams" photos (a bit of a misnomer I believe)
reshares - this is a real b*tch as it requires you to provide xml
copies of all your messages in D* format.

We have most of these working except private mail - whilst trying to
figure out once again what exact data gets signed, and we implemented
photos but found it only works one way, so there is something
undocumented about how these are supposed to work.

It isn't clear if public hashtag messages are sent to all sites (which
wouldn't scale) or whether there is a subscription or registration
mechanism and/or a new message type to send these around.

Sarah Mei

unread,
Nov 7, 2011, 1:39:26 AM11/7/11
to diaspo...@googlegroups.com
On Sun, Nov 6, 2011 at 3:01 PM, Mike Macgirvin <mi...@macgirvin.com> wrote:
> The project is at http://github.com/friendica/friendica
>
> You can find the bulk of the Diaspora communications in include/diaspora.php
>
> with some extra needed bits in include/crypto.php and the conversion
> to/from bbcode to markdown in include/bb2diaspora.php

Cool, we need to add to this to the wiki. Volunteers?

> But the documentation left off after describing status posts, comments,
> likes and friending. There are several other types of messages -
>
> profile updates
> "conversations" used in private mail
> signed retractions
> photos
> "activity-streams" photos (a bit of a misnomer I believe)
> reshares - this is a real b*tch as it requires you to provide xml
>    copies of all your messages in D* format.
>
> We have most of these working except private mail - whilst trying to
> figure out once again what exact data gets signed, and we implemented
> photos but found it only works one way, so there is something
> undocumented about how these are supposed to work.

Good to know. Yeah, that documentation is definitely insufficient. I
will try to reorganize it a bit after I finish the blog post I'm
working on about federation.

> It isn't clear if public hashtag messages are sent to all sites (which
> wouldn't scale) or whether there is a subscription or registration
> mechanism and/or a new message type to send these around.

Neither. Right now a hashtag message is only federated if someone on
another pod is following the user who posts it. Once that happens, if
the message is public, all users on the remote pod see it in their tag
stream. But *somebody* over there has to be following the poster in
order for it to be copied over.

Michael Connors

unread,
Nov 7, 2011, 5:41:05 AM11/7/11
to Mike Macgirvin, diaspo...@googlegroups.com
Thanks Mike. I will have a look at that.

Michael Connors

unread,
Nov 7, 2011, 5:46:11 AM11/7/11
to diaspo...@googlegroups.com
Hi Pistos,

I only intend to provide an implementation of the protocol within a web framework, and it would be up to anyone who wanted to use it to provide a UI which matches their site. 

I don't think this fragments the project as I would only be using what is provided for the the protocol specification, and not adding anything new myself. Maybe I was misleading when I said "port of diaspora", as I do not intend to reproduce it exactly in another language.

Michael
Reply all
Reply to author
Forward
0 new messages