SlideShare ist ein Scribd-Unternehmen logo
1 von 40
Downloaden Sie, um offline zu lesen
Taking ReSharper
out of process
Matt Ellis
@citizenmatt
Why build a .NET IDE now?
How do you build a .NET IDE?
How do you build a 

cross platform .NET IDE?
How do you build a 

cross platform IDE?
Hello IntelliJ
Hello IntelliJ IDEA
Hello IntelliJ Platform
https://github.com/JetBrains/intellij-community
Uh-oh. JVM
How do you build a .NET IDE in the JVM?
Options?
ReSharper out of process
• Language server
• Headless. Command line process. IntelliJ provides the UI

Client/server communication
• Cross platform

.NET Framework on Windows. Mono on MacOS and Linux
• Removes Visual Studio in-process constraints

Memory usage. 64 bit
• Continued investment in ReSharper
Thick Client? Thin Client?
• IntelliJ provides high level UI elements, functionality and infrastructure

Editors, Alt+Enter, completion, Find Usages, test runner, debugging…

Searchable tree views, popup dialogs, settings pages…
• No knowledge of syntax trees or semantic model

Parsing, resolving, syntax highlighting, folding, inspections, refactoring,
code completion, etc. all owned by ReSharper
• (Some standalone functionality)

Find in path, REST client, Databases, VCS
• Optimisations

Lexing for initial syntax highlighting
Alt+Enter
• IntelliJ provides editor, text caret, and tracks Alt+Enter keypress
• Asks current language for items
• Current language is an IntelliJ facade for ReSharper out-of-proc

Asks ReSharper for items at current location
• ReSharper returns list of display names, icons and submenus
• IntelliJ displays items in Alt+Enter menu
Inspection highlights
• IntelliJ provides infrastructure to display “squigglies”
• Opposite direction, pushed from ReSharper
• Source file is opened, or modified

IntelliJ noties ReSharper
• ReSharper analyses the file, runs inspections, gathers highlights
• ReSharper publishes list of range, severity and tooltip
• IntelliJ displays squiggles
Modifying source
• Bi-directional
• User typing

IntelliJ publishes changes as delta of typed characters at offset
• ReSharper rewriting code

Publishes delta as chunk of code

Renamed variable, new method, additional `using` statement, etc.
Observations
• Enabling functionality, rather than implementing it

Can show all Alt+Enter menus, run all inspections, rewrite code in
context actions and quick xes
• As long as there is no UI…
• The data is very lightweight
IPC - RPC?
• Boilerplate - define calls and messages for each required action
• Imperative
• Conflict resolution?

Who wins? How to reset/resync state?
• JSON? Protobuf?
Client

(IntelliJ)
Server

(ReSharper)
MVVM
• Only send data required for UI components
• Lightweight View Model data
View

(IntelliJ)
Model

(ReSharper)
View

Model
Hierarchical View Model
Shared View Model
• Single view of state of entire IDE

Shared between front end and back end

Keep in sync. Only need to update changed elds
• Becomes declarative

No more boilerplate messages, just update View Model
• Reactive/observable. Composable

Subscribe for changes
• Two way

Client and server can both contribute to View Model

E.g. button click/refactoring results
• Tightly coupled? 🤔
Conflict resolution
• The client is always right
• Each value has a version
• Version increments only when client changes value
• If server changes value, no version update
• Only accept change with same or newer version
“foo”/1
“foo”/1
“bar”/2
“bar”/2
“quux”/2
“quux”/2
“wibble”/3 “blah”/2
“wibble”/3
Client
(IntelliJ)
Server
(ReSharper)
Wire protocol
• Becomes trivial - no messages, just deltas

Don’t change the protocol, just extend model
• Supports batching
• Serialisation by code generation via DSL
• Binary wire protocol, with logging
• Sockets
Rider Framework
• Two libraries, C# and Kotlin

Provides primitives and handles communication
• Kotlin based DSL to describe View Model
• Generates real code - C# and Kotlin

Interfaces, implementation and serialisation
• Business logic subscribes to and manipulates “real model”

Magic happens
View Model building blocks
• Lifetime
• Signals (events)
• Properties (observable value)
• Maps (observable collections)
• Fields (immutable)
• Call (async RPC)
• string
• int
• enum
• classdef (node)
• structdef (data)
Lifetime
class Lifetime {
static Lifetime Eternal;
void Add(Action action);
}
class LifetimeDef {
ctor(Lifetime parent);
Lifetime Lifetime;
void Terminate();
}
Dual of IDisposable
Signal
// Produce event
interface ISource<T> {
void Fire(T value);
}
// Subscribe to event
interface ISink<T> {
void Advise(Lifetime l, Action<T> handler);
}
// Composable event
interface ISignal<T> : ISource<T>, ISink<T> {
}
Properties
// Subscribe to event
interface ISink<T> {
void Advise(Lifetime l, Action<T> handler);
}
// Observable property
interface IProperty<T> : ISink<T> {
T Value { get; set; }
void View(Lifetime l, Action<Lifetime, T> action);
}
Stateful signal
Maps
class MapEvent<K,V> {
enum Kind { Add, Remove }
Kind kind;
K key;
V value;
}
// Observable collection
interface IViewableMap<K,V>
: IDictionary<K,V>, ISink<MapEvent<K,V >> {
void View(Lifetime l, Action<Lifetime, K, V> action);
}
Kotlin DSL
fun classdef (
name : String,
init : ClassdefNode.() -> Unit
)
classdef (
“Foo”,
{
myClassdef.map(…)
	 }
)
classdef (
“Foo”,
{
map(…)
}
)
Kotlin DSL
fun classdef (
name : String,
init : ClassdefNode.() -> Unit
)
classdef (
“Foo”,
{ lambda_expression }
)
classdef (“Foo”) {
lambda_expression
}
object Solution {
init {
map(“editors”, string, classdef(“Editor”) {
list(“document”, char)
property(“caret”, int)
map(“highlighters”, Range, Highlighter)
property(“completion”, Completion.nullable)
})
voidSource(“build”)
}
val Range = classdef(“Range”) {
field(“start”, int)
field(“length”, int)
}
val Highlighter = classdef(“Highlighter”) {
…
}
}
Challenges
• Rider’s Project Model very different to IntelliJ

Replace Project view with Solution Explorer

IntelliJ uses “project” where we expect “solution”
• What about duplicate language implementations?

E.g. JavaScript - WebStorm or ReSharper?

C++ CLion or ReSharper?
• Plugins are more complex

Front end and back end
• ReSharper out of process with Visual Studio? 🙊
Thanks!
Matt Ellis
@citizenmatt
www.jetbrains.com/rider

Weitere ähnliche Inhalte

Ähnlich wie Rider - Taking ReSharper out of Process

NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...Maarten Balliauw
 
.Net overviewrajnish
.Net overviewrajnish.Net overviewrajnish
.Net overviewrajnishRajnish Kalla
 
E sampark with c#.net
E sampark with c#.netE sampark with c#.net
E sampark with c#.netAbhijeet Singh
 
Use C++ and IntelÂŽ Threading Building Blocks (IntelÂŽ TBB) for Hardware Progra...
Use C++ and IntelÂŽ Threading Building Blocks (IntelÂŽ TBB) for Hardware Progra...Use C++ and IntelÂŽ Threading Building Blocks (IntelÂŽ TBB) for Hardware Progra...
Use C++ and IntelÂŽ Threading Building Blocks (IntelÂŽ TBB) for Hardware Progra...IntelÂŽ Software
 
E yantra robot abstractions
E yantra robot abstractionsE yantra robot abstractions
E yantra robot abstractionsAkshar Desai
 
Summer training vhdl
Summer training vhdlSummer training vhdl
Summer training vhdlArshit Rai
 
Unmanaged Parallelization via P/Invoke
Unmanaged Parallelization via P/InvokeUnmanaged Parallelization via P/Invoke
Unmanaged Parallelization via P/InvokeDmitri Nesteruk
 
[Td 2015] what is new in visual c++ 2015 and future directions(ulzii luvsanba...
[Td 2015] what is new in visual c++ 2015 and future directions(ulzii luvsanba...[Td 2015] what is new in visual c++ 2015 and future directions(ulzii luvsanba...
[Td 2015] what is new in visual c++ 2015 and future directions(ulzii luvsanba...Sang Don Kim
 
Ice mini guide
Ice mini guideIce mini guide
Ice mini guideAdy Liu
 
El camino a las Cloud Native Apps - Introduction
El camino a las Cloud Native Apps - IntroductionEl camino a las Cloud Native Apps - Introduction
El camino a las Cloud Native Apps - IntroductionPlain Concepts
 
Summer training vhdl
Summer training vhdlSummer training vhdl
Summer training vhdlArshit Rai
 
02 direct3 d_pipeline
02 direct3 d_pipeline02 direct3 d_pipeline
02 direct3 d_pipelineGirish Ghate
 
Windows 8 fĂźr .net Entwickler
Windows 8 fĂźr .net EntwicklerWindows 8 fĂźr .net Entwickler
Windows 8 fĂźr .net EntwicklerPatric Boscolo
 
An Open Source Workbench for Prototyping Multimodal Interactions Based on Off...
An Open Source Workbench for Prototyping Multimodal Interactions Based on Off...An Open Source Workbench for Prototyping Multimodal Interactions Based on Off...
An Open Source Workbench for Prototyping Multimodal Interactions Based on Off...Jean Vanderdonckt
 
The Evolution of Async-Programming on .NET Platform (.Net China, C#)
The Evolution of Async-Programming on .NET Platform (.Net China, C#)The Evolution of Async-Programming on .NET Platform (.Net China, C#)
The Evolution of Async-Programming on .NET Platform (.Net China, C#)jeffz
 
dot net technology
dot net technologydot net technology
dot net technologyImran Khan
 
Using Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systemsUsing Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systemsSerge Stinckwich
 
Summer training vhdl
Summer training vhdlSummer training vhdl
Summer training vhdlArshit Rai
 
Summer training vhdl
Summer training vhdlSummer training vhdl
Summer training vhdlArshit Rai
 

Ähnlich wie Rider - Taking ReSharper out of Process (20)

NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
 
.Net overviewrajnish
.Net overviewrajnish.Net overviewrajnish
.Net overviewrajnish
 
Fluttering
FlutteringFluttering
Fluttering
 
E sampark with c#.net
E sampark with c#.netE sampark with c#.net
E sampark with c#.net
 
Use C++ and IntelÂŽ Threading Building Blocks (IntelÂŽ TBB) for Hardware Progra...
Use C++ and IntelÂŽ Threading Building Blocks (IntelÂŽ TBB) for Hardware Progra...Use C++ and IntelÂŽ Threading Building Blocks (IntelÂŽ TBB) for Hardware Progra...
Use C++ and IntelÂŽ Threading Building Blocks (IntelÂŽ TBB) for Hardware Progra...
 
E yantra robot abstractions
E yantra robot abstractionsE yantra robot abstractions
E yantra robot abstractions
 
Summer training vhdl
Summer training vhdlSummer training vhdl
Summer training vhdl
 
Unmanaged Parallelization via P/Invoke
Unmanaged Parallelization via P/InvokeUnmanaged Parallelization via P/Invoke
Unmanaged Parallelization via P/Invoke
 
[Td 2015] what is new in visual c++ 2015 and future directions(ulzii luvsanba...
[Td 2015] what is new in visual c++ 2015 and future directions(ulzii luvsanba...[Td 2015] what is new in visual c++ 2015 and future directions(ulzii luvsanba...
[Td 2015] what is new in visual c++ 2015 and future directions(ulzii luvsanba...
 
Ice mini guide
Ice mini guideIce mini guide
Ice mini guide
 
El camino a las Cloud Native Apps - Introduction
El camino a las Cloud Native Apps - IntroductionEl camino a las Cloud Native Apps - Introduction
El camino a las Cloud Native Apps - Introduction
 
Summer training vhdl
Summer training vhdlSummer training vhdl
Summer training vhdl
 
02 direct3 d_pipeline
02 direct3 d_pipeline02 direct3 d_pipeline
02 direct3 d_pipeline
 
Windows 8 fĂźr .net Entwickler
Windows 8 fĂźr .net EntwicklerWindows 8 fĂźr .net Entwickler
Windows 8 fĂźr .net Entwickler
 
An Open Source Workbench for Prototyping Multimodal Interactions Based on Off...
An Open Source Workbench for Prototyping Multimodal Interactions Based on Off...An Open Source Workbench for Prototyping Multimodal Interactions Based on Off...
An Open Source Workbench for Prototyping Multimodal Interactions Based on Off...
 
The Evolution of Async-Programming on .NET Platform (.Net China, C#)
The Evolution of Async-Programming on .NET Platform (.Net China, C#)The Evolution of Async-Programming on .NET Platform (.Net China, C#)
The Evolution of Async-Programming on .NET Platform (.Net China, C#)
 
dot net technology
dot net technologydot net technology
dot net technology
 
Using Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systemsUsing Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systems
 
Summer training vhdl
Summer training vhdlSummer training vhdl
Summer training vhdl
 
Summer training vhdl
Summer training vhdlSummer training vhdl
Summer training vhdl
 

Mehr von citizenmatt

How to Parse a File (NDC London 2018)
How to Parse a File (NDC London 2018)How to Parse a File (NDC London 2018)
How to Parse a File (NDC London 2018)citizenmatt
 
How to Parse a File (DDD North 2017)
How to Parse a File (DDD North 2017)How to Parse a File (DDD North 2017)
How to Parse a File (DDD North 2017)citizenmatt
 
The how-dare-you-call-me-an-idiot’s guide to the .NET Standard (NDC London 2017)
The how-dare-you-call-me-an-idiot’s guide to the .NET Standard (NDC London 2017)The how-dare-you-call-me-an-idiot’s guide to the .NET Standard (NDC London 2017)
The how-dare-you-call-me-an-idiot’s guide to the .NET Standard (NDC London 2017)citizenmatt
 
.NET Core Blimey! Windows Platform User Group, Manchester
.NET Core Blimey! Windows Platform User Group, Manchester.NET Core Blimey! Windows Platform User Group, Manchester
.NET Core Blimey! Windows Platform User Group, Manchestercitizenmatt
 
.NET Core Blimey! (Shropshire Devs Mar 2016)
.NET Core Blimey! (Shropshire Devs Mar 2016).NET Core Blimey! (Shropshire Devs Mar 2016)
.NET Core Blimey! (Shropshire Devs Mar 2016)citizenmatt
 
.NET Core Blimey! (dotnetsheff Jan 2016)
.NET Core Blimey! (dotnetsheff Jan 2016).NET Core Blimey! (dotnetsheff Jan 2016)
.NET Core Blimey! (dotnetsheff Jan 2016)citizenmatt
 
.net Core Blimey - Smart Devs UG
.net Core Blimey - Smart Devs UG.net Core Blimey - Smart Devs UG
.net Core Blimey - Smart Devs UGcitizenmatt
 
.Net Core Blimey! (16/07/2015)
.Net Core Blimey! (16/07/2015).Net Core Blimey! (16/07/2015)
.Net Core Blimey! (16/07/2015)citizenmatt
 
C# 6.0 - DotNetNotts
C# 6.0 - DotNetNottsC# 6.0 - DotNetNotts
C# 6.0 - DotNetNottscitizenmatt
 
What's New in ReSharper 9?
What's New in ReSharper 9?What's New in ReSharper 9?
What's New in ReSharper 9?citizenmatt
 

Mehr von citizenmatt (10)

How to Parse a File (NDC London 2018)
How to Parse a File (NDC London 2018)How to Parse a File (NDC London 2018)
How to Parse a File (NDC London 2018)
 
How to Parse a File (DDD North 2017)
How to Parse a File (DDD North 2017)How to Parse a File (DDD North 2017)
How to Parse a File (DDD North 2017)
 
The how-dare-you-call-me-an-idiot’s guide to the .NET Standard (NDC London 2017)
The how-dare-you-call-me-an-idiot’s guide to the .NET Standard (NDC London 2017)The how-dare-you-call-me-an-idiot’s guide to the .NET Standard (NDC London 2017)
The how-dare-you-call-me-an-idiot’s guide to the .NET Standard (NDC London 2017)
 
.NET Core Blimey! Windows Platform User Group, Manchester
.NET Core Blimey! Windows Platform User Group, Manchester.NET Core Blimey! Windows Platform User Group, Manchester
.NET Core Blimey! Windows Platform User Group, Manchester
 
.NET Core Blimey! (Shropshire Devs Mar 2016)
.NET Core Blimey! (Shropshire Devs Mar 2016).NET Core Blimey! (Shropshire Devs Mar 2016)
.NET Core Blimey! (Shropshire Devs Mar 2016)
 
.NET Core Blimey! (dotnetsheff Jan 2016)
.NET Core Blimey! (dotnetsheff Jan 2016).NET Core Blimey! (dotnetsheff Jan 2016)
.NET Core Blimey! (dotnetsheff Jan 2016)
 
.net Core Blimey - Smart Devs UG
.net Core Blimey - Smart Devs UG.net Core Blimey - Smart Devs UG
.net Core Blimey - Smart Devs UG
 
.Net Core Blimey! (16/07/2015)
.Net Core Blimey! (16/07/2015).Net Core Blimey! (16/07/2015)
.Net Core Blimey! (16/07/2015)
 
C# 6.0 - DotNetNotts
C# 6.0 - DotNetNottsC# 6.0 - DotNetNotts
C# 6.0 - DotNetNotts
 
What's New in ReSharper 9?
What's New in ReSharper 9?What's New in ReSharper 9?
What's New in ReSharper 9?
 

KĂźrzlich hochgeladen

Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 

KĂźrzlich hochgeladen (20)

Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 

Rider - Taking ReSharper out of Process

  • 1. Taking ReSharper out of process Matt Ellis @citizenmatt
  • 2.
  • 3. Why build a .NET IDE now?
  • 4. How do you build a .NET IDE?
  • 5. How do you build a 
 cross platform .NET IDE?
  • 6. How do you build a 
 cross platform IDE?
  • 7.
  • 13. How do you build a .NET IDE in the JVM?
  • 15.
  • 16. ReSharper out of process • Language server • Headless. Command line process. IntelliJ provides the UI
 Client/server communication • Cross platform
 .NET Framework on Windows. Mono on MacOS and Linux • Removes Visual Studio in-process constraints
 Memory usage. 64 bit • Continued investment in ReSharper
  • 17. Thick Client? Thin Client? • IntelliJ provides high level UI elements, functionality and infrastructure
 Editors, Alt+Enter, completion, Find Usages, test runner, debugging…
 Searchable tree views, popup dialogs, settings pages… • No knowledge of syntax trees or semantic model
 Parsing, resolving, syntax highlighting, folding, inspections, refactoring, code completion, etc. all owned by ReSharper • (Some standalone functionality)
 Find in path, REST client, Databases, VCS • Optimisations
 Lexing for initial syntax highlighting
  • 18.
  • 19. Alt+Enter • IntelliJ provides editor, text caret, and tracks Alt+Enter keypress • Asks current language for items • Current language is an IntelliJ facade for ReSharper out-of-proc
 Asks ReSharper for items at current location • ReSharper returns list of display names, icons and submenus • IntelliJ displays items in Alt+Enter menu
  • 20. Inspection highlights • IntelliJ provides infrastructure to display “squigglies” • Opposite direction, pushed from ReSharper • Source le is opened, or modied
 IntelliJ noties ReSharper • ReSharper analyses the le, runs inspections, gathers highlights • ReSharper publishes list of range, severity and tooltip • IntelliJ displays squiggles
  • 21. Modifying source • Bi-directional • User typing
 IntelliJ publishes changes as delta of typed characters at offset • ReSharper rewriting code
 Publishes delta as chunk of code
 Renamed variable, new method, additional `using` statement, etc.
  • 22. Observations • Enabling functionality, rather than implementing it
 Can show all Alt+Enter menus, run all inspections, rewrite code in context actions and quick xes • As long as there is no UI… • The data is very lightweight
  • 23. IPC - RPC? • Boilerplate - dene calls and messages for each required action • Imperative • Conflict resolution?
 Who wins? How to reset/resync state? • JSON? Protobuf? Client
 (IntelliJ) Server
 (ReSharper)
  • 24. MVVM • Only send data required for UI components • Lightweight View Model data View
 (IntelliJ) Model
 (ReSharper) View
 Model
  • 26. Shared View Model • Single view of state of entire IDE
 Shared between front end and back end
 Keep in sync. Only need to update changed elds • Becomes declarative
 No more boilerplate messages, just update View Model • Reactive/observable. Composable
 Subscribe for changes • Two way
 Client and server can both contribute to View Model
 E.g. button click/refactoring results • Tightly coupled? 🤔
  • 27. Conflict resolution • The client is always right • Each value has a version • Version increments only when client changes value • If server changes value, no version update • Only accept change with same or newer version
  • 29. Wire protocol • Becomes trivial - no messages, just deltas
 Don’t change the protocol, just extend model • Supports batching • Serialisation by code generation via DSL • Binary wire protocol, with logging • Sockets
  • 30. Rider Framework • Two libraries, C# and Kotlin
 Provides primitives and handles communication • Kotlin based DSL to describe View Model • Generates real code - C# and Kotlin
 Interfaces, implementation and serialisation • Business logic subscribes to and manipulates “real model”
 Magic happens
  • 31. View Model building blocks • Lifetime • Signals (events) • Properties (observable value) • Maps (observable collections) • Fields (immutable) • Call (async RPC) • string • int • enum • classdef (node) • structdef (data)
  • 32. Lifetime class Lifetime { static Lifetime Eternal; void Add(Action action); } class LifetimeDef { ctor(Lifetime parent); Lifetime Lifetime; void Terminate(); } Dual of IDisposable
  • 33. Signal // Produce event interface ISource<T> { void Fire(T value); } // Subscribe to event interface ISink<T> { void Advise(Lifetime l, Action<T> handler); } // Composable event interface ISignal<T> : ISource<T>, ISink<T> { }
  • 34. Properties // Subscribe to event interface ISink<T> { void Advise(Lifetime l, Action<T> handler); } // Observable property interface IProperty<T> : ISink<T> { T Value { get; set; } void View(Lifetime l, Action<Lifetime, T> action); } Stateful signal
  • 35. Maps class MapEvent<K,V> { enum Kind { Add, Remove } Kind kind; K key; V value; } // Observable collection interface IViewableMap<K,V> : IDictionary<K,V>, ISink<MapEvent<K,V >> { void View(Lifetime l, Action<Lifetime, K, V> action); }
  • 36. Kotlin DSL fun classdef ( name : String, init : ClassdefNode.() -> Unit ) classdef ( “Foo”, { myClassdef.map(…) } ) classdef ( “Foo”, { map(…) } )
  • 37. Kotlin DSL fun classdef ( name : String, init : ClassdefNode.() -> Unit ) classdef ( “Foo”, { lambda_expression } ) classdef (“Foo”) { lambda_expression }
  • 38. object Solution { init { map(“editors”, string, classdef(“Editor”) { list(“document”, char) property(“caret”, int) map(“highlighters”, Range, Highlighter) property(“completion”, Completion.nullable) }) voidSource(“build”) } val Range = classdef(“Range”) { field(“start”, int) field(“length”, int) } val Highlighter = classdef(“Highlighter”) { … } }
  • 39. Challenges • Rider’s Project Model very different to IntelliJ
 Replace Project view with Solution Explorer
 IntelliJ uses “project” where we expect “solution” • What about duplicate language implementations?
 E.g. JavaScript - WebStorm or ReSharper?
 C++ CLion or ReSharper? • Plugins are more complex
 Front end and back end • ReSharper out of process with Visual Studio? 🙊