the path to pair programming in che with atom teletype · the path to pair programming in che with...

Post on 22-May-2020

6 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Paris 2018 - @sunsengdavidtan #OracleCodeParis

The Path to Pair Programming in Che with Atom Teletype

Sun Tan - Red Hat

@sunsengdavidtan

Paris 2018 - @sunsengdavidtan #OracleCodeParis

Agenda● Eclipse Che● Atom Teletype● Atom Teletype in Che ● What’s next● Q&A and open demo

2

Paris 2018 - @sunsengdavidtan #OracleCodeParis

Eclipse Che

3

An introduction to Eclipse Che

Paris 2018 - @sunsengdavidtan #OracleCodeParis 4

Paris 2018 - @sunsengdavidtan #OracleCodeParis

Anyone, anytime can contribute to a project without installing software.

Paris 2018 - @sunsengdavidtan #OracleCodeParis

Is Che just an Eclipse IDE with a Web UI ?

6

Paris 2018 - @sunsengdavidtan #OracleCodeParis

Is Che just an Eclipse IDE with a Web UI?● Yes and No: Che is composed of several pieces:

○ Frontend UI in Javascript (browser)○ Workspace containers based on Docker

■ Containers may run Language Servers■ language Server for Java: Eclipse JDT

7

Paris 2018 - @sunsengdavidtan #OracleCodeParis

Does Eclipse Che only support Javascript?

8

Paris 2018 - @sunsengdavidtan #OracleCodeParis

Does Che only support Javascript?No ;) not only We support languages that has a LSP implementation

● LSP introduced by Microsoft with VSCode○ Exchange JSON RPC○ IDE clients○ Language servers

● Servers expose○ Code completion○ Markers○ Source code

● Demo: VSCode + java --- Che + php

9

Paris 2018 - @sunsengdavidtan #OracleCodeParis 10

Language ServerTool

Language Server Protocol (JSON RPC)

textDocument/publishDiagnostics

textDocument/didOpen

LANGUAGE SERVER PROTOCOL

User opens document

User edits document

Tool displays errors

Server initializes tools

Server calculates diagnostics

textDocument/didChange

Paris 2018 - @sunsengdavidtan #OracleCodeParis

JDT.ls● Eclipse LSP4J● Eclipse JDT● Eclipse M2E for Maven● Eclipse Buildship for Gradle

11

Paris 2018 - @sunsengdavidtan #OracleCodeParis

Does Eclipse Che only work on Cloud?

12

Paris 2018 - @sunsengdavidtan #OracleCodeParis

Does Che only work on Cloud?● Easy to install locally:

○ Docker○ Minishift addon

● Demo: local workspace

13

Paris 2018 - @sunsengdavidtan #OracleCodeParis

Are project setup easier with Eclipse Che?

14

Paris 2018 - @sunsengdavidtan #OracleCodeParis

Are project setup easier with Che?● Workspace definition

○ Container based○ tooling

● Factory URL○ Regenerate a workspace on demand○ Projects to clone○ Post loading events

● Open a file at a line● Run a command (build and run)

○ Pull request panel

15

Paris 2018 - @sunsengdavidtan #OracleCodeParis

How easy would it be to switch context/branch/task with Che?

16

Paris 2018 - @sunsengdavidtan #OracleCodeParis

How easy would it be to switch context/branch/task with Che?● Factory URL

○ Project template:■ Docker image

● Available tools■ Projects to clone■ Supported language

● Generate a workspace for each task● Multiple git repos simpler to manage

17

Paris 2018 - @sunsengdavidtan #OracleCodeParis

Is it possible to use my own command line tools with Che?

18

Paris 2018 - @sunsengdavidtan #OracleCodeParis

Is it possible to use my own command line tools with Che?● YEAH: set up your own docker image with all the tools you use

○ My dev workspace sunix/che-dev https://hub.docker.com/r/sunix/chedev/~/dockerfile/ :■ Tig git■ Screen■ Npm, yarn■ Gulp■ Maven, JDK

19

Paris 2018 - @sunsengdavidtan #OracleCodeParis

Can I have a development environment as closed to my production environment?

20

Paris 2018 - @sunsengdavidtan #OracleCodeParis

Can I have a development environment as closed to my production environment?Openshift based runtime stack + tools containers

Next slide ...

21

Paris 2018 - @sunsengdavidtan #OracleCodeParis

“Dev Mode” for your Application Stack

App

Application stack-

Dockerfile, kubernetes.yaml, openshift.yaml, helm chart

Application stack / “Dev Mode”IDE Tooling as microservices in sidecars

Language

IDE

DebuggerTest

App

Paris 2018 - @sunsengdavidtan #OracleCodeParis

What about co-editing “a la Google Docs”?

23

Paris 2018 - @sunsengdavidtan #OracleCodeParis 24

● Quick collaboration

○ Mentoring session

○ Code reviews

○ Co-editing

● No need to setup or install anything - just share a link

● Better than screensharing...

Pair Programming ?

Paris 2018 - @sunsengdavidtan #OracleCodeParis

Agenda● Eclipse Che● Atom Teletype● Atom Teletype in Che ● What’s next● Q&A and open demo

25

Paris 2018 - @sunsengdavidtan #OracleCodeParis

Atom Teletype

26

Presentation and demo

Paris 2018 - @sunsengdavidtan #OracleCodeParis

Atom Teletype● Extension for the Atom editor● Pair programming/Live concurrent editing● FOSS libraries for other editors

○ teletype-client○ teletype-server○ teletype-crdt

● Communication○ Conflict-free Replicated Data Type: CRDT ○ WebRTC

27

Paris 2018 - @sunsengdavidtan #OracleCodeParis

Atom Teletype

28

Demo

Paris 2018 - @sunsengdavidtan #OracleCodeParis

Atom Teletype

Host

Guest

Guest

Guest

Paris 2018 - @sunsengdavidtan #OracleCodeParis

Atom Teletype

Host

Guest

Guest

Guest

TeletypeServer

register/discover

register/discover

https://api.teletype.atom.io/

Paris 2018 - @sunsengdavidtan #OracleCodeParis

Atom Teletype

Host

Guest

Guest

Guest

Peer-to-peerCRDT

synchronisation

Paris 2018 - @sunsengdavidtan #OracleCodeParis

Teletype Portals● Portal <=> workspace● 1 host portal● 1..n guest portals● A shared pair programming session● Active files of the host portal● Editors and buffers

32

Paris 2018 - @sunsengdavidtan #OracleCodeParis

Atom Teletype in Che

33

A status of Atom Teletype in Che

Paris 2018 - @sunsengdavidtan #OracleCodeParis

Why Atom Teletype ?● Looking for alternative to Eclipse Flux

○ Solve conflict issues○ FOSS○ Browser friendly

● Mainly two alternatives:○ ot.js (operational transform)○ Atom Teletype

● No available demos for ot.js

34

Paris 2018 - @sunsengdavidtan #OracleCodeParis

Steps to Atom Teletype in Che● Reusing previous demo

○ Cursors○ Editor content synchronization

● teletype-client embedded into the Che IDE○ Adapt a NodeJS (Electron) library to the browser○ GWT overlays

● Default teletype-server (Github Atom)● First iteration: as a Teletype guest portal

35

Paris 2018 - @sunsengdavidtan #OracleCodeParis

Atom Teletype in Che

36

Demo

Paris 2018 - @sunsengdavidtan #OracleCodeParis

Agenda● Eclipse Che● Atom Teletype● Atom Teletype in Che● What’s Next● Q&A and open demo

37

Paris 2018 - @sunsengdavidtan #OracleCodeParis

What’s Next

38

How to bring the same experience we have in Google Docs for the IDE?

Paris 2018 - @sunsengdavidtan #OracleCodeParis

Pair.Programming.Next

App

Teletype Guest portals

HeadlessTeletype Host

portal

TeletypeServer

Tools

Che workspaces with sidecars

Guest

Guest

Guest

GuestGuest

Paris 2018 - @sunsengdavidtan #OracleCodeParis

Thank you

@sunsengdavidtan & @stevanLM

Q&A and Open Demo

top related