Upgrade to Pro — share decks privately, control downloads, hide ads and more …

JCON2025: Doctor and Patient in the Fediverse o...

JCON2025: Doctor and Patient in the Fediverse of Madness

After the Social Network formerly known as Twitter was opened to science deniers, antivaxxers and conspiracy theorists by its new owner, it became increasingly hard for scientists and healthcare professionals to use it as a platform without being intimidated or bullied.

In the past two years over 50 percent of scientists left X/Twitter for Mastodon. Others went to Meta's Threads or BlueSky, both also compatible with the Fediverse now. The Fediverse is a connected social platform ecosystem based on open protocols like ActivityPub, OStatus, Diaspora or Matrix, which allows you to port your content, data and follower graph between networks.

Among other government agencies (including France, Luxembourg or Försäkringskassan in Sweden), the German national e-health agency (gematik) selected Matrix for its instant messaging standard, the TI-Messenger.

This session provides an overview of popular Fediverse protocols and services as well as how to use them with healthcare standards like HL7, DICOM, FHIR, CCD or ICD. Followed by a hands-on demo of accessing the Mastodon timeline and a Matrix messaging service for the JVM using Java and Kotlin.

Avatar for Werner Keil

Werner Keil

May 16, 2025
Tweet

More Decks by Werner Keil

Other Decks in Technology

Transcript

  1. © 2023-2025 Werner Keil. All rights reserved. #JCON2025 #Fediverse #Health

    #Science jvm.social/@enterprisebook Agenda 1. Introduction 2. Problems and Challenges 3. The Fediverse 4. Protocols and Standards 5. Use Case: TI-Messenger 6. Demos 7. Links & Resources
  2. © 2023-2025 Werner Keil. All rights reserved. #JCON2025 #Fediverse #Health

    #Science jvm.social/@enterprisebook Who am I? Werner Keil • Consultant – Coach • Open-Source Activist • Software Architect • Husband, Father • Author, Speaker • Maintenance Lead – JSR 354, 385 • Jakarta EE Specification Committee Member [www.linkedin.com/in/catmedia]
  3. © 2023-2025 Werner Keil. All rights reserved. #JCON2025 #Fediverse #Health

    #Science jvm.social/@enterprisebook What are the Problems? Brain Worm • Measles Outbreak • Bird Flu Outbreak • Antivaxxer • Recommend Vitamin A pills instead • Takes grandkids to swim in a sewage infested river Photo Illustration by Luis G. Rendon/The Daily Beast/Reuters/Everett Collection
  4. © 2023-2025 Werner Keil. All rights reserved. #JCON2025 #Fediverse #Health

    #Science jvm.social/@enterprisebook What are the Problems? American Future X • Antivaxxer • Conspiracy Theorist • Supports racist and right-wing parties • Anti-Science • Censors or removes content he does not like Illustration by Ja Zmaj
  5. © 2023-2025 Werner Keil. All rights reserved. #JCON2025 #Fediverse #Health

    #Science jvm.social/@enterprisebook What are the Problems? In a global study of more than 2,000 scientists across six areas of science, two-fifths (41%) of respondents had, as a result of their work, been harassed or intimidated at least once. Intimidation efforts included online abuse, physical threats, and threats to budgets or employment. Harassment, while personal, could be meted out by superiors, colleagues or outsiders. Some scientists felt their leaders had thrown them under the bus to protect the institution’s reputation. Harassment and Intimidation of Scientists
  6. © 2023-2025 Werner Keil. All rights reserved. #JCON2025 #Fediverse #Health

    #Science jvm.social/@enterprisebook What are the Problems? Many German and European universities have recently discontinued their activities on the social media platform X (formerly Twitter). The decision to leave X is due to concerns about the platform's current direction, which is seen as incompatible with the institutions' values of open-mindedness, scientific integrity, transparency, and democratic discourse. Examples of Universities Leaving X: • Rhine-Main Universities: • A large group of universities in the Rhine-Main region of Germany, including the Goethe University Frankfurt, have withdrawn from X. • RWTH Aachen University: • This prominent German university also discontinued its activities on X in November 2024. • German Sport University Cologne Academic “Xodus”
  7. © 2023-2025 Werner Keil. All rights reserved. #JCON2025 #Fediverse #Health

    #Science jvm.social/@enterprisebook What are the Problems? More examples of Universities Leaving X: • University of Leeds: • This is the first Russell Group university in the UK to leave X. • Other German Universities: • Numerous other German universities, including Freie Universität Berlin, Humboldt University, and Heinrich Heine University, have also left X. • UK Universities: • Several UK universities, including Falmouth University, Plymouth Marjon University, and the University of East Anglia, have also stopped using X. • Their departure follows that of other major European research organisations, including the Dutch Research Council and Paris-Saclay University. Academic “Xodus”
  8. © 2023-2025 Werner Keil. All rights reserved. #JCON2025 #Fediverse #Health

    #Science jvm.social/@enterprisebook What are the Problems? • Changes in Platform Policies: Universities cite changes in X's algorithms and policies, such as the algorithmic amplification of right-wing populist content and restrictions on organic reach, as reasons for leaving. • Decline in Communication Ethos: X's current environment is often seen as polarized and lacking constructive dialogue, a stark contrast to the ethos of universities. • Spread of Misinformation: Concerns have been raised about the platform's role in spreading misinformation and eroding trust in information shared online. • Inclusivity Concerns: X's policies and moderation practices have been criticized for fostering a less inclusive and potentially discriminatory environment. • Shift to Alternative Platforms: Many universities are shifting their focus to alternative social media platforms like Mastodon or Bluesky, which are perceived as more aligned with their values and requirements for science communication. Reasons for Leaving X
  9. © 2023-2025 Werner Keil. All rights reserved. #JCON2025 #Fediverse #Health

    #Science jvm.social/@enterprisebook What are the Problems? Alternatives to X There are several social media platforms as alternatives to X (formerly Twitter). Bluesky, Mastodon, Threads or Hive Social are among the most notable options. • Bluesky A decentralized social network developed by Twitter's co-founder, Jack Dorsey, Bluesky offers a platform similar to X but with more user control and algorithmic transparency. • Mastodon Open-source, federated microblogging platform allows users to create their own servers and connect with others through a decentralized network.
  10. © 2023-2025 Werner Keil. All rights reserved. #JCON2025 #Fediverse #Health

    #Science jvm.social/@enterprisebook What are the Problems? Alternatives to X • Hive Social Aims to blend the best aspects of X, Instagram, and Tumblr, offering a more customizable and personalized social media experience. • Threads Short messaging service by Meta extending Instagram, offering many aspects of X and a large user base thanks to Instagram integration. • LinkedIn While the features are closer to a “Facebook for professionals”, many scientific and other institutions have a presence on LinkedIn already and publish more there after leaving X.
  11. © 2023-2025 Werner Keil. All rights reserved. #JCON2025 #Fediverse #Health

    #Science jvm.social/@enterprisebook Alternatives to X Mastodon Mastodon is driven by users, giving them more control over the policies of a particular server and their presence on this medium. Users are not dependent on large companies. For example, in the Netherlands, SURF has set up a Mastodon server for educational and research institutions, their staff and students. This server is not managed by a company, but entirely by SURF and thus indirectly by the Dutch academic community.
  12. © 2023-2025 Werner Keil. All rights reserved. #JCON2025 #Fediverse #Health

    #Science jvm.social/@enterprisebook Alternatives to X Mastodon Pros • Emphasis on community-building: Mastodon is for the community, by the community; users build their own communities around the same topics. This makes it easy to connect with peers from all over the world. As a result, there is a lot of interaction on Mastodon. • Customizable: Each server has its own layout, rules and moderation. Therefore, you can choose what suits you well. You can also switch servers if you find the rules no longer suit you. • Privacy: On Mastodon there are extensive privacy options. For example, you can control who can follow an account and make certain posts visible only to your followers..
  13. © 2023-2025 Werner Keil. All rights reserved. #JCON2025 #Fediverse #Health

    #Science jvm.social/@enterprisebook Alternatives to X Mastodon Pros • Long-term sustainability: Because Mastodon is non-commercial and community-owned, it offers more long-term stability and independence. This prevents re-dependence on a commercial platform where terms and moderation policies can be changed unilaterally.
  14. © 2023-2025 Werner Keil. All rights reserved. #JCON2025 #Fediverse #Health

    #Science jvm.social/@enterprisebook Alternatives to X Mastodon Cons • Ease of use: Mastodon is sometimes perceived as too technical. Because of the different servers, users sometimes experience it as difficult to build a community. Fortunately, there is a list of academically relevant accounts and servers to consult. In addition, the University Library of the UG has published a quick guide Mastodon for researchers. • Lower network effect: Many influential users, policy makers and journalists joined Bluesky and took their audience with them. Mastodon has fewer users overall than Bluesky and therefore the maximum number of people you can reach there is lower.
  15. © 2023-2025 Werner Keil. All rights reserved. #JCON2025 #Fediverse #Health

    #Science jvm.social/@enterprisebook Alternatives to X Bluesky Bluesky is a, currently still centralized social media platform. Users on Bluesky have control over what they get to see and from whom, without an algorithm determining it for them. Bluesky is reminiscent of the “old” Twitter. Started by Twitter founder Jack Dorsey, meant to be the next generation Twitter. As a user, you can follow, post, share and respond to all kinds of accounts. While users have significantly more influence over their individual experience on Bluesky compared to traditional platforms, they do not collectively create the fundamental policy framework for the entire platform as with Mastodon. Indeed, there is content moderation from the top down. About the ways of moderation, Bluesky is transparent
  16. © 2023-2025 Werner Keil. All rights reserved. #JCON2025 #Fediverse #Health

    #Science jvm.social/@enterprisebook Alternatives to X Bluesky Pros • Potentially greater reach: posts on Bluesky may have a greater reach. In fact, there are more users on Bluesky: around 32 million (Feb. 25, 2025). Mastodon has around 9.3 million users (Feb. 25, 2025). • Reaching policy makers and journalists: unlike Mastodon, policy makers and journalists are increasingly on Bluesky. If you want to reach these specific groups, Bluesky may be a better option. • Easy to use: are you used to the old Twitter? Then Bluesky is familiar. • Science feed: Bluesky has dedicated feeds for topics like science. • Localization: Bluesky allows to post in multiple languages, making it easier to filter the content for your language of choice.
  17. © 2023-2025 Werner Keil. All rights reserved. #JCON2025 #Fediverse #Health

    #Science jvm.social/@enterprisebook Alternatives to X Bluesky Cons • Less flexible to customize to your liking: Bluesky does not work with decentralized servers. There is centralized moderation. As a result, like Mastodon, you cannot choose a server that suits you well. • Decentralized, but not federated: Bluesky may not be run by a giant corporation, but users have less control over the platform than with Mastodon. There is a group of investors who build out and financially support the platform and thus have potential influence. While servers on Mastodon follow the laws of the country where they are located, Bluesky is subject to U.S. law and the policies of the current U.S. government. • Fewer responses: compared to Mastodon, interaction in the form of responses to posts is lower at Bluesky. Bluesky, like the old Twitter, is more focused on broadcasting in the form of news items.
  18. © 2023-2025 Werner Keil. All rights reserved. #JCON2025 #Fediverse #Health

    #Science jvm.social/@enterprisebook Alternatives to X Bluesky Cons • Fewer responses: compared to Mastodon, interaction in the form of responses to posts is lower at Bluesky. Bluesky, like the old Twitter, is more focused on broadcasting in the form of news items. • Privacy: although users can set visibility options on Bluesky's web interface, all underlying data is public to all and accessible with certain tools, even without an account. This includes all posts, likes and which accounts one has blocked. Such actions should be considered permanently public.
  19. © 2023-2025 Werner Keil. All rights reserved. #JCON2025 #Fediverse #Health

    #Science jvm.social/@enterprisebook Fediverse Overview The Fediverse (composed of "federation" and "universe") is a “global social network”, allowing users of one service to communicate with users of other services using open protocols like ActivityPub. • A set of servers exchanging activity information with protocols like ActivityPub, OStatus, etc. • Well known implementations: Mastodon, Diaspora, Pleroma, GNU Social, PeerTube
  20. © 2023-2025 Werner Keil. All rights reserved. #JCON2025 #Fediverse #Health

    #Science jvm.social/@enterprisebook Fediverse Protocols The-Federation.info currently lists 10 protocols used in the Fediverse: • Diaspora • Zot • OStatus • ActivityPub • DFRN • WebMention • SMTP • XMPP • Matrix • NeoDB • BlueSky (AtProto)
  21. © 2023-2025 Werner Keil. All rights reserved. #JCON2025 #Fediverse #Health

    #Science jvm.social/@enterprisebook Protocols OStatus OStatus is an open standard for federated microblogging, allowing users to receive status updates by users of another site. The standard combines a series of open protocols like: • Atom • Activity Streams • WebSub • Salmon • WebFinger
  22. © 2023-2025 Werner Keil. All rights reserved. #JCON2025 #Fediverse #Health

    #Science jvm.social/@enterprisebook Protocols It started in 2013 with StatusNet, which later became GNU social. OStatus was at the time adopted by a number of microblogging sites, but frustration with the underlying technology turned most of them to use ActivityPub, including Mastodon, Pleroma or postActiv. The only open-source social network still using OStatus is Friendica, a very early open-source approach that started in 2010 and is also written in PHP, like GNU social, hence there seem more synergies between the two projects than for others. OStatus
  23. © 2023-2025 Werner Keil. All rights reserved. #JCON2025 #Fediverse #Health

    #Science jvm.social/@enterprisebook Protocols ActivityPub is a decentralized social networking protocol based on the ActivityStreams 2.0 data format and JSON-LD. It provides a client-to-server API for creating, updating and deleting content, and a federated server-to-server API to deliver notifications and subscribe to content. ActivityPub
  24. © 2023-2025 Werner Keil. All rights reserved. #JCON2025 #Fediverse #Health

    #Science jvm.social/@enterprisebook Protocols ActivityPub In ActivityPub users are called actors. Every actor has: • An inbox: To get messages by others • An outbox: To send messages to others After Mastodon already supported ActivityPub soon after it was finalized, several others followed, including Reddit, Goodreads, YouTube or Tumblr, Flickr considers adding support as well. And Twitter/X rival Threads reportedly uses it or plans to add support.
  25. © 2023-2025 Werner Keil. All rights reserved. #JCON2025 #Fediverse #Health

    #Science jvm.social/@enterprisebook Protocols Matrix Matrix was initially developed as a protocol for secure, decentralized instant messaging at Amdocs, provider of CRM and Telecom solutions like OSS or BSS. Use cases include Voice over IP, video chat or secure IoT. The features of Matrix include: • Creation and management of fully distributed chat rooms with no single points of control or failure • Eventually-consistent cryptographically secure synchronization of room state across a global open network of federated servers
  26. © 2023-2025 Werner Keil. All rights reserved. #JCON2025 #Fediverse #Health

    #Science jvm.social/@enterprisebook Protocols Matrix • Sending and receiving extensible messages in a room with optional end-to-end encryption • User management • Room state management • User profile management (avatars, display names,...) • Managing user accounts (registration, login, logout) • Use of 3rd Party IDs like email address, phone number or other Social IDs to authenticate, identify and discover users on Matrix • Identity Federation
  27. © 2023-2025 Werner Keil. All rights reserved. #JCON2025 #Fediverse #Health

    #Science jvm.social/@enterprisebook Protocols Matrix
  28. © 2023-2025 Werner Keil. All rights reserved. #JCON2025 #Fediverse #Health

    #Science jvm.social/@enterprisebook OAuth OAuth is a protocol to delegate rights for an application to act on behalf of a user who granted its rights without giving away their login / password Developed by Twitter, Magnolia and Google, it was made standard by IETF in April 2010 under RFC 5849 Version 2.0, simpler to use but often criticized by its too many implementations was standardized in October 2012 under RFC 6749 and 6750. It’s already used by many actors (Social Networks like Facebook, Google, Microsoft as well as most API providers ) History
  29. © 2023-2025 Werner Keil. All rights reserved. #JCON2025 #Fediverse #Health

    #Science jvm.social/@enterprisebook OAuth Overview • An Authorization/Delegation Framework • Standardized by RFC6749 ̶ RFC 6750 using bearer tokens ̶ RFC 6819 Security considerations • On a foundation of Token standards ̶ JSON Object Signing Encryption (JOSE) ̶ JWT (RFC7519), JWS (RFC7515), JWE (RFC7516), JWA (RFC7518), JWK (RFC7517)
  30. © 2023-2025 Werner Keil. All rights reserved. #JCON2025 #Fediverse #Health

    #Science jvm.social/@enterprisebook OAuth Concepts • Actors ̶ Resource Owner ̶ Client ̶ Resource, Resource server ̶ Authorization Server • Authorizations represented as ‘scopes’
  31. © 2023-2025 Werner Keil. All rights reserved. #JCON2025 #Fediverse #Health

    #Science jvm.social/@enterprisebook OAuth Dance Creating an application in the OAuth service Initialization: the right granting phase also called the OAuth Dance. At the end of the dance we obtain an access token (formed by a public and secret part) for the next step Signature: each request is signed with access token and token identifying the OAuth application that was granted the rights OAuth has 3 steps
  32. © 2023-2025 Werner Keil. All rights reserved. #JCON2025 #Fediverse #Health

    #Science jvm.social/@enterprisebook OpenID Connect (OIDC) Overview • Authentication Protocol built on OAuth2 • Session Management – Single Sign on, Out • An additional Token Type – ID Token • UserInfo, Discovery, Client Self-registration Endpoints • Specs : OpenID core, Discovery, Client Registration
  33. © 2023-2025 Werner Keil. All rights reserved. #JCON2025 #Fediverse #Health

    #Science jvm.social/@enterprisebook TI-Messenger What is the TI-Messenger? • A secure, privacy-compliant messaging platform for healthcare. • Developed by German healthcare informatics department gematik. • Built on Matrix Key Features: • Data Security • Cross-Sector Communication • Interoperability
  34. © 2023-2025 Werner Keil. All rights reserved. #JCON2025 #Fediverse #Health

    #Science jvm.social/@enterprisebook TI-Messenger Benefits • Enhances communication efficiency in healthcare • Reduces paperwork and Fax usage • Increased security in communication
  35. © 2023-2025 Werner Keil. All rights reserved. #JCON2025 #Fediverse #Health

    #Science jvm.social/@enterprisebook TI-Messenger Target Audience • Doctors, nursing staff, therapists, and other healthcare providers. • Institutions like hospitals, clinics, and pharmacies. • Insured individuals.
  36. © 2023-2025 Werner Keil. All rights reserved. #JCON2025 #Fediverse #Health

    #Science jvm.social/@enterprisebook TI-Messenger Features • Exchange text messages, voice messages, photos and documents in (secure) PDF • Creation of case-related chat groups for exchange between several HCPs • Locating all institutions that use the TI-Messenger in a national address book • Archiving of case-related communication in the local Electronic Health Record (ePA) • Issuing individual authorisations, e.g. for doctors and nurses
  37. © 2023-2025 Werner Keil. All rights reserved. #JCON2025 #Fediverse #Health

    #Science jvm.social/@enterprisebook TI-Messenger Variants • TI-Messenger Pro Service providers and payers can communicate securely within organizations, bilaterally, and across sectors. • TI-Messenger ePA Insured individuals can communicate with healthcare professionals through the messenger in the electronic patient record App (ePA) • TI-Messenger Connect Integration of messengers into third-party products and platforms.
  38. © 2023-2025 Werner Keil. All rights reserved. #JCON2025 #Fediverse #Health

    #Science jvm.social/@enterprisebook Demo Time @ivar_grimstad @wernerkeil
  39. © 2023-2025 Werner Keil. All rights reserved. #JCON2025 #Fediverse #Health

    #Science jvm.social/@enterprisebook Java Enterprise Social Book I wrote a book “Enterprise Social for the Java Platform” (Apress, 2024) link.springer.com/book/10.1007/978-1-4842-9571-7 Examples on GitHub: github.com/Apress/enterprise-social-java-platform Mastodon Account: @[email protected]
  40. © 2023-2025 Werner Keil. All rights reserved. #JCON2025 #Fediverse #Health

    #Science jvm.social/@enterprisebook Resources • github.com/Apress/enterprise-social-java-platform • The-Federation.info • matrix.org • Github: gematik CODE