Microservices for building an IDE – The innards of JetBrains Rider - TechDays Finland

Maarten Balliauw
Maarten BalliauwDeveloper Advocate
Microservices for building an IDE
The innards of JetBrains Rider
Maarten Balliauw
@maartenballiauw
JetBrains Rider
demo
Rider
Cross-platform, full-stack .NET IDE
C#, VB.NET, F#, JavaScript, TypeScript, HTML, TypeScript, …
.NET full framework, .NET Core, Mono
Lightweight, fast & yet a complete IDE!
ReSharper built-in
Helps you be more productive
Editor, code assistance, navigation, refactoring
Built in tools, e.g. NuGet, unit testing, DB tools, source control, REST client, …
Tons of plugins!
Free trial! www.jetbrains.com/rider
History
JetBrains
Founded 2000 in Prague (Czech Republic)
2000 IntelliJ Renamer
2001 IntelliJ
2004 ReSharper
2019 20+ IDE’s and other developer tools
Microservices for building an IDE – The innards of JetBrains Rider - TechDays Finland
ReSharper IDE
Project halted (but not gone to waste)
Several concepts and architecture remained
Keep functionality separate from the actual IDE
Same core, IDE interoperability layer on top
Visual Studio 2010, 2013, 2015 and 2017
ReSharper command line tools (CLI)
“When will JetBrains come
with its own .NET IDE?”
Why build a .NET IDE?
Many reasons!
“When will JetBrains come with its own .NET IDE?”
ReSharper constrained by Visual Studio environment
32 bit process resource constraints
Changes in VS impact ReSharper
.NET Core
No good cross-platform IDE existed at the time
Hurdles...
Cross-platform means a cross-platform UI toolkit is needed
ReSharper UI elements in WinForms and WPF
Existing UI would need converting, new UI to be built
WinForms? (Mono sort of has it)
GTKSharp?
Qt?
IntelliJ Platform
Foundation of all of our IDE’s
Provides base infrastructure
Project view, code completion, UI toolkit
+ Platform plugins such as version control, terminal, ...
+ JetBrains <product name> IDE plugins
Open source (build your own IDE)
https://github.com/JetBrains/intellij-community
Windows, Linux, Mac – cross-platform thanks to JVM
IntelliJ Platform + R# ?
IntelliJ Platform
Great foundation to build on
Windows, Linux, Mac
JVM
ReSharper (R#)
All of those .NET inspections, refactorings, ...
.NET
Options!
Rewrite R# in Java?
14 years of implementation and knowledge, what could go wrong!
2 R# implementations... Automatic conversion?
Run R# as a command-line process
Already possible (thanks, 2004!)
“Just need our own UI on top” – thin IntelliJ Platform UI process
IntelliJ Platform + R# !
Headless R# as a language server
Cross-platform
No constraints
It is ReSharper! 2 products, 1 code base
IntelliJ as a thin UI
Control the R# process
We’re not there yet...
Is IntelliJ really a thin UI?
Three cases...
Features where IJ handles everything
Features where R# handles almost everything
Features where both IDE’s make an awesomer IDE
Both sides are an IDE!
1 + 1 = 3
demo
How to make them talk?
Inter-process communication
Example: Context actions (Alt+Enter)
1. IntelliJ provides text editor, caret(s) and lets us Alt+Enter
2. Ask current document’s language for items to display in Alt+Enter menu
For C#, this language is a facade to the R# process
3. IntelliJ renders list of items, may add its own entries
List of completion items can be a tree of names and icons.
1. IntelliJ provides text editor and plumbing to display squiggles
2. IntelliJ notifies R# that a document was opened (or modified)
3. R# does its thing (analyze, inspect, summarize that data)
4. R# publishes this to IntelliJ
5. IntelliJ displays this info
List of inspections can be a set of name, icon, severity, tooltip, text range
Not RPC-style! Analysis can take any amount of time, so IJ should not wait for it.
~~~~~~
Example: Inspections and highlighting
1. Bi-directional
User can be typing
A refactoring or completion may be injecting code at the same time
2. Can be implemented with delta’s
IntelliJ pushes delta to R#
R# pushes delta to IntelliJ
One or both win (concurrency)
Data is a delta (from line + column, to line + column, text to insert)
Example: Writing code
Types of data
Context actions
A tree of names and icons
Inspections
A set of name, icon, severity, tooltip, text range
Writing code
Delta with from line + column, to line + column, text to insert
Fairly simple messages! Can we make this generic enough?
Make one inspection work  make them all work
Which protocol do we use?
Re-use Language Server Protocol (LSP)?
Great in itself – IDE concepts like window, editor, language, diagnostics, ...
We would need customizations for R# feature set
Or build a custom REST-like protocol?
Experimented with JSON, ProtoBuf, request/response style
Request-action-response
LSP and custom protocol are request/response mostly
Conflict resolution...
What if both human and a refactoring make a change to code?
How to keep things synchronized and in a healthy state?
Realization: Why a “request-action-response” flow? Why RPC?
Both IDE’s share a similar model and architecture
Messages are simple, but for RPC they would need context
(which solution, which file, state info, ...) – overhead!
Model-View-ViewModel (MVVM)
“facilitates separation of development of the user interface (view) from development
of the back-end (model) using a view model as a value converter”
IntelliJ is our view, ReSharper provides the model
Model IDE into a shared view model!
Protocol could serve as the view model that shares lightweight data
Project.Files.Add("Foo.cs")
Project.Files["Foo.cs"].Inspections.Add(
"Possible null reference", "Warning", 20, 30, 20, 42);
Both processes can react to such change (observable + observer)
Conflict resolution (again)...
Changes to our shared model can come from IJ and R#
Can still cause conflicts due to features or timing/GC issues
IntelliJ: “Deleted file foo.cs”
R#: “I just refactored foo.cs”
Solutions!
Locking? (freezes, how to handle deadlocks?)
Conventions!
Protocol conflict conventions
View + Model (or client: IntelliJ + server: ReSharper)
Each value stored in the view model has a version
Updates by the view/client increment the version
Updates by the model/server do not
Only accept changes if version is the same or newer
If not: the change is discarded
Rider protocol
Obligatory diagram
Ideally, our developers do not have
to know the details of this.
Just create view models.
Rider protocol
“Reactive Distributed communication framework for .net, kotlin, js”
Open source - https://github.com/jetbrains/rd
1. Include protocol libraries
and build tools on all sides
2. Write view model in special DSL
3. Generate code
4. Work with generated model
.NET/Kotlin/JS/... code generator
Model definition DSL
Primitives
Conflict resolution, serialization, ...
Sockets, batching, binary wire protocol
Rider protocol
Only need to know about a few primitives
Conflict resolution, wire protocol, timeouts, ... handled by protocol
Code generated based on the defined view model
Bonus points: no reflection/introspection needed on every run
Hierarchical + lifetimes
Hierarchical + lifetimes
Solution
NuGet host
Project
Document
Inspections
PSI (Program Structure Interface)
Class
Field
Method
Document
Inspections
...
Project
Local history
NuGet tool window
Project
Editor tab
Inspections
Language
Editor tab
Inspections
Language
viewmodel(Riderprotocol)
Hierarchical + lifetimes
Cleanup and resource management
Objects attach to lifetime
Lifetime destroys attached objects
Parent lifetime destroys children
public class Lifetime : IDisposable {
private Stack<Action> resources = new Stack<Action>();
public void Attach(Action resource) {
resources.Push(resource);
}
public void Attach(IDisposable disposable) {
resources.Push(disposable.Dispose);
}
public void Dispose() {
while (resources.Count > 0) {
var resource = resources.Pop();
resource();
}
}
}
Signal (event)
Producers/subscribers
Observable/observer
Using lifetime to manage subscription
// Produce event
interface ISource<T> {
void Fire(T value);
}
// Subscribe to event
interface ISink<T> {
void Advise(Lifetime l, Action<T> handler);
}
// Event
interface ISignal<T> : ISource<T>, ISink<T> { }
Property
Signal implementation
Using lifetime to manage subscription
To changes to propery in general
To changes to specific value
// Observable property
interface IProperty<T> : ISink<T> {
T Value { get; set; }
void Advise(Lifetime l, Action<T> handler);
void View(Lifetime l, Action<Lifetime, T> handler);
}
Primitives
Primitive Description
Signal Event that is fired when something happens
Property Observable value
List/set/map Observable collections
Field Immutable value
Call/callback RPC-style call, needed from time to time
byte, short, int, long, float,
double, char, boolean, string,
securestring, void, enum, ...
Primitives and special types
Aggregatedef/classdef/structdef A node in the viewmodel
Rider protocol
demo
Rider protocol
Very extensible through Kotlin-based DSL
Easy to work with for our developers
Update view model, generate code, work with generated code
No need to think about things being multiple processes, state, conflict
resolution, ...
Having the Kotlin-based DSL means Find Usages, Navigation, ... work
Cross-language, cross-platform
Plugin model for Rider is more complex (IJ and R# parts may be needed)
https://github.com/JetBrains/fsharp-support
https://github.com/JetBrains/resharper-unity
Microservices
Two processes!
Isolation!
Each has their own 64 bit memory space
Also their own separate GC
Multi-core machines
Start/stop independently
Debugging? Four processes.
Rider (IntelliJ + ReSharper)
Debugger worker process
Your application
Multiple processes...
What if certain features were
running in their own process?
Isolation
Own memory constraints
Start/stop independently
Crash independently
Shared view model
Pass around a shared view model
to interested parties
Example: Roslyn analyzers/inspections
Pass around “reference” of
[
{ name, icon, severity,
tooltip, text range }
]
Multiple machines
Socket-based wire protocol
Sockets can be on multiple machines
Example:
Docker debugging
Remote debugging
Unity game engine
www.unity3d.com
Extension to view model
Rider plugin
Unity editor plugin
https://github.com/JetBrains/resharper-unity
https://twitter.com/kskrygan/status/1064950644094705664
https://twitter.com/kskrygan/status/1064950644094705664
Future
Model the view as well
public CSharpInteractiveOptionsPage(Lifetime lifetime, ...)
: base(lifetime, ...) {
AddHeader("Tool settings");
AddToolPathFileChooserOption(lifetime, commonFileDialogs);
AddEmptyLine();
AddStringOption((CSIOptions s) => s.ToolArguments,
"Tool arguments:", "Additional tool arguments");
AddHeader("Tool window behavior");
AddBoolOption((CSIOptions s) => s.FocusOnOpenToolWindow,
"Focus tool window on open");
AddBoolOption((CSIOptions s) => s.FocusOnSendLineText,
"Focus tool window on Send Line");
AddBoolOption((CSIOptions s) => s.MoveCaretOnSendLineText,
"Move caret down on Send Line");
// ...
FinishPage();
}
Every IDE as both a client and server
Front-end and back-end: different garbage collection
Whatever happens in the backend, the frontend can process the user's typing
Every IDE as both a client and server (“contributor to the model”)
Bring this technology to other IDE’s?
Reuse WebStorm's HTML/CSS/JS functionality in ReSharper
(e.g. Visual Studio + R# using WebStorm in back-end mode)
Conclusion
Conclusion
Rider is an IDE built on
two IDE’s
two technology stacks
Rich and easy programming model was needed to bridge: Rider protocol
Protocol gave rise to
more than two processes
more than one machine
micro UI
Free trial! www.jetbrains.com/rider
Thank you!
https://blog.maartenballiauw.be
@maartenballiauw
1 of 52

Recommended

NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain... by
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
326 views53 slides
Enforcing API Design Rules for High Quality Code Generation by
Enforcing API Design Rules for High Quality Code GenerationEnforcing API Design Rules for High Quality Code Generation
Enforcing API Design Rules for High Quality Code GenerationTim Burks
1.6K views40 slides
Java vs .net by
Java vs .netJava vs .net
Java vs .netTech_MX
7K views63 slides
Net serialization by
Net serializationNet serialization
Net serializationGreg Sohl
407 views20 slides
EclipseCon 2011: Deciphering the CDT debugger alphabet soup by
EclipseCon 2011: Deciphering the CDT debugger alphabet soupEclipseCon 2011: Deciphering the CDT debugger alphabet soup
EclipseCon 2011: Deciphering the CDT debugger alphabet soupBruce Griffith
2.6K views20 slides
Build Great Networked APIs with Swift, OpenAPI, and gRPC by
Build Great Networked APIs with Swift, OpenAPI, and gRPCBuild Great Networked APIs with Swift, OpenAPI, and gRPC
Build Great Networked APIs with Swift, OpenAPI, and gRPCTim Burks
1.4K views47 slides

More Related Content

What's hot

Intro dotnet by
Intro dotnetIntro dotnet
Intro dotnetOpenSource Technologies Pvt. Ltd.
969 views17 slides
Language Engineering in the Cloud by
Language Engineering in the CloudLanguage Engineering in the Cloud
Language Engineering in the Cloudlennartkats
833 views60 slides
The Spoofax Language Workbench (SPLASH 2010) by
The Spoofax Language Workbench (SPLASH 2010)The Spoofax Language Workbench (SPLASH 2010)
The Spoofax Language Workbench (SPLASH 2010)lennartkats
2.3K views47 slides
Java notes by
Java notesJava notes
Java notesChaitanya Rajkumar Limmala
2.8K views69 slides
Programming in Java by
Programming in JavaProgramming in Java
Programming in JavaAbhilash Nair
1.1K views18 slides
Java vs .net (beginners) by
Java vs .net (beginners)Java vs .net (beginners)
Java vs .net (beginners)Ravi Vishwakarma
3.2K views9 slides

What's hot(20)

Language Engineering in the Cloud by lennartkats
Language Engineering in the CloudLanguage Engineering in the Cloud
Language Engineering in the Cloud
lennartkats833 views
The Spoofax Language Workbench (SPLASH 2010) by lennartkats
The Spoofax Language Workbench (SPLASH 2010)The Spoofax Language Workbench (SPLASH 2010)
The Spoofax Language Workbench (SPLASH 2010)
lennartkats2.3K views
Integrated Language Definition Testing: Enabling Test-Driven Language Develop... by lennartkats
Integrated Language Definition Testing: Enabling Test-Driven Language Develop...Integrated Language Definition Testing: Enabling Test-Driven Language Develop...
Integrated Language Definition Testing: Enabling Test-Driven Language Develop...
lennartkats2.5K views
Smoothing Your Java with DSLs by intelliyole
Smoothing Your Java with DSLsSmoothing Your Java with DSLs
Smoothing Your Java with DSLs
intelliyole1.1K views
Using Aspects for Language Portability (SCAM 2010) by lennartkats
Using Aspects for Language Portability (SCAM 2010)Using Aspects for Language Portability (SCAM 2010)
Using Aspects for Language Portability (SCAM 2010)
lennartkats542 views
Runtime Environment Of .Net Divya Rathore by Esha Yadav
Runtime Environment Of .Net Divya RathoreRuntime Environment Of .Net Divya Rathore
Runtime Environment Of .Net Divya Rathore
Esha Yadav488 views
Introduction to c_sharp by HEM Sothon
Introduction to c_sharpIntroduction to c_sharp
Introduction to c_sharp
HEM Sothon407 views
Os Worthington by oscon2007
Os WorthingtonOs Worthington
Os Worthington
oscon2007572 views
Remix Your Language Tooling (JSConf.eu 2012) by lennartkats
Remix Your Language Tooling (JSConf.eu 2012)Remix Your Language Tooling (JSConf.eu 2012)
Remix Your Language Tooling (JSConf.eu 2012)
lennartkats1.2K views
Networked APIs with swift by Tim Burks
Networked APIs with swiftNetworked APIs with swift
Networked APIs with swift
Tim Burks669 views
Web programming UNIT II by Bhavsingh Maloth by Bhavsingh Maloth
Web programming UNIT II by Bhavsingh MalothWeb programming UNIT II by Bhavsingh Maloth
Web programming UNIT II by Bhavsingh Maloth
Bhavsingh Maloth789 views
.NET Overview by Greg Sohl
.NET Overview.NET Overview
.NET Overview
Greg Sohl546 views
Microsoft .NET Platform by Peter R. Egli
Microsoft .NET PlatformMicrosoft .NET Platform
Microsoft .NET Platform
Peter R. Egli9.4K views
Introduction to directshow II by Yoss Cohen
Introduction to directshow IIIntroduction to directshow II
Introduction to directshow II
Yoss Cohen484 views
Protocol oriented programming_talk_ppt by Jayant Jaiswal
Protocol oriented programming_talk_pptProtocol oriented programming_talk_ppt
Protocol oriented programming_talk_ppt
Jayant Jaiswal105 views

Similar to Microservices for building an IDE – The innards of JetBrains Rider - TechDays Finland

ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain... by
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...Maarten Balliauw
1.2K views49 slides
Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo... by
Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...
Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...Maarten Balliauw
404 views52 slides
Rider - Taking ReSharper out of Process by
Rider - Taking ReSharper out of ProcessRider - Taking ReSharper out of Process
Rider - Taking ReSharper out of Processcitizenmatt
447 views40 slides
Building scalable and language-independent Java services using Apache Thrift ... by
Building scalable and language-independent Java services using Apache Thrift ...Building scalable and language-independent Java services using Apache Thrift ...
Building scalable and language-independent Java services using Apache Thrift ...IndicThreads
772 views35 slides
.NET 4 Demystified - Sandeep Joshi by
.NET 4 Demystified - Sandeep Joshi.NET 4 Demystified - Sandeep Joshi
.NET 4 Demystified - Sandeep JoshiSpiffy
651 views28 slides
Visual Studio .NET2010 by
Visual Studio .NET2010Visual Studio .NET2010
Visual Studio .NET2010Satish Verma
1.8K views42 slides

Similar to Microservices for building an IDE – The innards of JetBrains Rider - TechDays Finland(20)

ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain... by Maarten Balliauw
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...
Maarten Balliauw1.2K views
Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo... by Maarten Balliauw
Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...
Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...
Maarten Balliauw404 views
Rider - Taking ReSharper out of Process by citizenmatt
Rider - Taking ReSharper out of ProcessRider - Taking ReSharper out of Process
Rider - Taking ReSharper out of Process
citizenmatt447 views
Building scalable and language-independent Java services using Apache Thrift ... by IndicThreads
Building scalable and language-independent Java services using Apache Thrift ...Building scalable and language-independent Java services using Apache Thrift ...
Building scalable and language-independent Java services using Apache Thrift ...
IndicThreads772 views
.NET 4 Demystified - Sandeep Joshi by Spiffy
.NET 4 Demystified - Sandeep Joshi.NET 4 Demystified - Sandeep Joshi
.NET 4 Demystified - Sandeep Joshi
Spiffy651 views
Visual Studio .NET2010 by Satish Verma
Visual Studio .NET2010Visual Studio .NET2010
Visual Studio .NET2010
Satish Verma1.8K views
What's coming to c# (Tel-Aviv, 2018) by Moaid Hathot
What's coming to c# (Tel-Aviv, 2018)What's coming to c# (Tel-Aviv, 2018)
What's coming to c# (Tel-Aviv, 2018)
Moaid Hathot105 views
Code Analysis and Refactoring with CDT by dschaefer
Code Analysis and Refactoring with CDTCode Analysis and Refactoring with CDT
Code Analysis and Refactoring with CDT
dschaefer2.9K views
Unmanaged Parallelization via P/Invoke by Dmitri Nesteruk
Unmanaged Parallelization via P/InvokeUnmanaged Parallelization via P/Invoke
Unmanaged Parallelization via P/Invoke
Dmitri Nesteruk2.4K views
Net framework by jhsri
Net frameworkNet framework
Net framework
jhsri1.1K views
.NET Core, ASP.NET Core Course, Session 3 by aminmesbahi
.NET Core, ASP.NET Core Course, Session 3.NET Core, ASP.NET Core Course, Session 3
.NET Core, ASP.NET Core Course, Session 3
aminmesbahi218 views
The Design, Evolution and Use of KernelF by Markus Voelter
The Design, Evolution and Use of KernelFThe Design, Evolution and Use of KernelF
The Design, Evolution and Use of KernelF
Markus Voelter55 views
Framework engineering JCO 2011 by YoungSu Son
Framework engineering JCO 2011Framework engineering JCO 2011
Framework engineering JCO 2011
YoungSu Son1.6K views
CocoaConf: The Language of Mobile Software is APIs by Tim Burks
CocoaConf: The Language of Mobile Software is APIsCocoaConf: The Language of Mobile Software is APIs
CocoaConf: The Language of Mobile Software is APIs
Tim Burks473 views

More from Maarten Balliauw

Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s... by
Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...
Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...Maarten Balliauw
360 views64 slides
Building a friendly .NET SDK to connect to Space by
Building a friendly .NET SDK to connect to SpaceBuilding a friendly .NET SDK to connect to Space
Building a friendly .NET SDK to connect to SpaceMaarten Balliauw
182 views47 slides
Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday... by
Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday...Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday...
Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday...Maarten Balliauw
180 views32 slides
JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m... by
JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m...JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m...
JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m...Maarten Balliauw
279 views42 slides
.NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se... by
.NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se....NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se...
.NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se...Maarten Balliauw
290 views28 slides
CloudBurst 2019 - Indexing and searching NuGet.org with Azure Functions and S... by
CloudBurst 2019 - Indexing and searching NuGet.org with Azure Functions and S...CloudBurst 2019 - Indexing and searching NuGet.org with Azure Functions and S...
CloudBurst 2019 - Indexing and searching NuGet.org with Azure Functions and S...Maarten Balliauw
564 views43 slides

More from Maarten Balliauw(20)

Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s... by Maarten Balliauw
Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...
Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...
Maarten Balliauw360 views
Building a friendly .NET SDK to connect to Space by Maarten Balliauw
Building a friendly .NET SDK to connect to SpaceBuilding a friendly .NET SDK to connect to Space
Building a friendly .NET SDK to connect to Space
Maarten Balliauw182 views
Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday... by Maarten Balliauw
Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday...Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday...
Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday...
Maarten Balliauw180 views
JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m... by Maarten Balliauw
JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m...JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m...
JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m...
Maarten Balliauw279 views
.NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se... by Maarten Balliauw
.NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se....NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se...
.NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se...
Maarten Balliauw290 views
CloudBurst 2019 - Indexing and searching NuGet.org with Azure Functions and S... by Maarten Balliauw
CloudBurst 2019 - Indexing and searching NuGet.org with Azure Functions and S...CloudBurst 2019 - Indexing and searching NuGet.org with Azure Functions and S...
CloudBurst 2019 - Indexing and searching NuGet.org with Azure Functions and S...
Maarten Balliauw564 views
NDC Oslo 2019 - Indexing and searching NuGet.org with Azure Functions and Search by Maarten Balliauw
NDC Oslo 2019 - Indexing and searching NuGet.org with Azure Functions and SearchNDC Oslo 2019 - Indexing and searching NuGet.org with Azure Functions and Search
NDC Oslo 2019 - Indexing and searching NuGet.org with Azure Functions and Search
Maarten Balliauw957 views
Approaches for application request throttling - Cloud Developer Days Poland by Maarten Balliauw
Approaches for application request throttling - Cloud Developer Days PolandApproaches for application request throttling - Cloud Developer Days Poland
Approaches for application request throttling - Cloud Developer Days Poland
Maarten Balliauw1.1K views
Indexing and searching NuGet.org with Azure Functions and Search - Cloud Deve... by Maarten Balliauw
Indexing and searching NuGet.org with Azure Functions and Search - Cloud Deve...Indexing and searching NuGet.org with Azure Functions and Search - Cloud Deve...
Indexing and searching NuGet.org with Azure Functions and Search - Cloud Deve...
Maarten Balliauw1.1K views
Approaches for application request throttling - dotNetCologne by Maarten Balliauw
Approaches for application request throttling - dotNetCologneApproaches for application request throttling - dotNetCologne
Approaches for application request throttling - dotNetCologne
Maarten Balliauw246 views
CodeStock - Exploring .NET memory management - a trip down memory lane by Maarten Balliauw
CodeStock - Exploring .NET memory management - a trip down memory laneCodeStock - Exploring .NET memory management - a trip down memory lane
CodeStock - Exploring .NET memory management - a trip down memory lane
Maarten Balliauw1.9K views
ConFoo Montreal - Approaches for application request throttling by Maarten Balliauw
ConFoo Montreal - Approaches for application request throttlingConFoo Montreal - Approaches for application request throttling
ConFoo Montreal - Approaches for application request throttling
Maarten Balliauw1.2K views
JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory... by Maarten Balliauw
JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...
JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...
Maarten Balliauw1.1K views
DotNetFest - Let’s refresh our memory! Memory management in .NET by Maarten Balliauw
DotNetFest - Let’s refresh our memory! Memory management in .NETDotNetFest - Let’s refresh our memory! Memory management in .NET
DotNetFest - Let’s refresh our memory! Memory management in .NET
Maarten Balliauw480 views
VISUG - Approaches for application request throttling by Maarten Balliauw
VISUG - Approaches for application request throttlingVISUG - Approaches for application request throttling
VISUG - Approaches for application request throttling
Maarten Balliauw817 views
What is going on - Application diagnostics on Azure - TechDays Finland by Maarten Balliauw
What is going on - Application diagnostics on Azure - TechDays FinlandWhat is going on - Application diagnostics on Azure - TechDays Finland
What is going on - Application diagnostics on Azure - TechDays Finland
Maarten Balliauw746 views
ConFoo - Exploring .NET’s memory management – a trip down memory lane by Maarten Balliauw
ConFoo - Exploring .NET’s memory management – a trip down memory laneConFoo - Exploring .NET’s memory management – a trip down memory lane
ConFoo - Exploring .NET’s memory management – a trip down memory lane
Maarten Balliauw523 views
Approaches to application request throttling by Maarten Balliauw
Approaches to application request throttlingApproaches to application request throttling
Approaches to application request throttling
Maarten Balliauw1.6K views
NuGet beyond Hello World - DotNext Piter 2017 by Maarten Balliauw
NuGet beyond Hello World - DotNext Piter 2017NuGet beyond Hello World - DotNext Piter 2017
NuGet beyond Hello World - DotNext Piter 2017
Maarten Balliauw702 views

Recently uploaded

Top 10 Strategic Technologies in 2024: AI and Automation by
Top 10 Strategic Technologies in 2024: AI and AutomationTop 10 Strategic Technologies in 2024: AI and Automation
Top 10 Strategic Technologies in 2024: AI and AutomationAutomationEdge Technologies
14 views14 slides
Java Platform Approach 1.0 - Picnic Meetup by
Java Platform Approach 1.0 - Picnic MeetupJava Platform Approach 1.0 - Picnic Meetup
Java Platform Approach 1.0 - Picnic MeetupRick Ossendrijver
25 views39 slides
Throughput by
ThroughputThroughput
ThroughputMoisés Armani Ramírez
36 views11 slides
Roadmap to Become Experts.pptx by
Roadmap to Become Experts.pptxRoadmap to Become Experts.pptx
Roadmap to Become Experts.pptxdscwidyatamanew
11 views45 slides
Understanding GenAI/LLM and What is Google Offering - Felix Goh by
Understanding GenAI/LLM and What is Google Offering - Felix GohUnderstanding GenAI/LLM and What is Google Offering - Felix Goh
Understanding GenAI/LLM and What is Google Offering - Felix GohNUS-ISS
41 views33 slides
Attacking IoT Devices from a Web Perspective - Linux Day by
Attacking IoT Devices from a Web Perspective - Linux Day Attacking IoT Devices from a Web Perspective - Linux Day
Attacking IoT Devices from a Web Perspective - Linux Day Simone Onofri
15 views68 slides

Recently uploaded(20)

Understanding GenAI/LLM and What is Google Offering - Felix Goh by NUS-ISS
Understanding GenAI/LLM and What is Google Offering - Felix GohUnderstanding GenAI/LLM and What is Google Offering - Felix Goh
Understanding GenAI/LLM and What is Google Offering - Felix Goh
NUS-ISS41 views
Attacking IoT Devices from a Web Perspective - Linux Day by Simone Onofri
Attacking IoT Devices from a Web Perspective - Linux Day Attacking IoT Devices from a Web Perspective - Linux Day
Attacking IoT Devices from a Web Perspective - Linux Day
Simone Onofri15 views
[2023] Putting the R! in R&D.pdf by Eleanor McHugh
[2023] Putting the R! in R&D.pdf[2023] Putting the R! in R&D.pdf
[2023] Putting the R! in R&D.pdf
Eleanor McHugh38 views
Black and White Modern Science Presentation.pptx by maryamkhalid2916
Black and White Modern Science Presentation.pptxBlack and White Modern Science Presentation.pptx
Black and White Modern Science Presentation.pptx
maryamkhalid291614 views
Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen... by NUS-ISS
Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen...Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen...
Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen...
NUS-ISS28 views
How to reduce cold starts for Java Serverless applications in AWS at JCON Wor... by Vadym Kazulkin
How to reduce cold starts for Java Serverless applications in AWS at JCON Wor...How to reduce cold starts for Java Serverless applications in AWS at JCON Wor...
How to reduce cold starts for Java Serverless applications in AWS at JCON Wor...
Vadym Kazulkin75 views
AMAZON PRODUCT RESEARCH.pdf by JerikkLaureta
AMAZON PRODUCT RESEARCH.pdfAMAZON PRODUCT RESEARCH.pdf
AMAZON PRODUCT RESEARCH.pdf
JerikkLaureta15 views
Perth MeetUp November 2023 by Michael Price
Perth MeetUp November 2023 Perth MeetUp November 2023
Perth MeetUp November 2023
Michael Price15 views
DALI Basics Course 2023 by Ivory Egg
DALI Basics Course  2023DALI Basics Course  2023
DALI Basics Course 2023
Ivory Egg14 views
Web Dev - 1 PPT.pdf by gdsczhcet
Web Dev - 1 PPT.pdfWeb Dev - 1 PPT.pdf
Web Dev - 1 PPT.pdf
gdsczhcet55 views
How the World's Leading Independent Automotive Distributor is Reinventing Its... by NUS-ISS
How the World's Leading Independent Automotive Distributor is Reinventing Its...How the World's Leading Independent Automotive Distributor is Reinventing Its...
How the World's Leading Independent Automotive Distributor is Reinventing Its...
NUS-ISS15 views
Emerging & Future Technology - How to Prepare for the Next 10 Years of Radica... by NUS-ISS
Emerging & Future Technology - How to Prepare for the Next 10 Years of Radica...Emerging & Future Technology - How to Prepare for the Next 10 Years of Radica...
Emerging & Future Technology - How to Prepare for the Next 10 Years of Radica...
NUS-ISS16 views
.conf Go 2023 - Data analysis as a routine by Splunk
.conf Go 2023 - Data analysis as a routine.conf Go 2023 - Data analysis as a routine
.conf Go 2023 - Data analysis as a routine
Splunk93 views
The details of description: Techniques, tips, and tangents on alternative tex... by BookNet Canada
The details of description: Techniques, tips, and tangents on alternative tex...The details of description: Techniques, tips, and tangents on alternative tex...
The details of description: Techniques, tips, and tangents on alternative tex...
BookNet Canada121 views

Microservices for building an IDE – The innards of JetBrains Rider - TechDays Finland

  • 1. Microservices for building an IDE The innards of JetBrains Rider Maarten Balliauw @maartenballiauw
  • 3. Rider Cross-platform, full-stack .NET IDE C#, VB.NET, F#, JavaScript, TypeScript, HTML, TypeScript, … .NET full framework, .NET Core, Mono Lightweight, fast & yet a complete IDE! ReSharper built-in Helps you be more productive Editor, code assistance, navigation, refactoring Built in tools, e.g. NuGet, unit testing, DB tools, source control, REST client, … Tons of plugins! Free trial! www.jetbrains.com/rider
  • 5. JetBrains Founded 2000 in Prague (Czech Republic) 2000 IntelliJ Renamer 2001 IntelliJ 2004 ReSharper 2019 20+ IDE’s and other developer tools
  • 7. ReSharper IDE Project halted (but not gone to waste) Several concepts and architecture remained Keep functionality separate from the actual IDE Same core, IDE interoperability layer on top Visual Studio 2010, 2013, 2015 and 2017 ReSharper command line tools (CLI)
  • 8. “When will JetBrains come with its own .NET IDE?”
  • 9. Why build a .NET IDE? Many reasons! “When will JetBrains come with its own .NET IDE?” ReSharper constrained by Visual Studio environment 32 bit process resource constraints Changes in VS impact ReSharper .NET Core No good cross-platform IDE existed at the time
  • 10. Hurdles... Cross-platform means a cross-platform UI toolkit is needed ReSharper UI elements in WinForms and WPF Existing UI would need converting, new UI to be built WinForms? (Mono sort of has it) GTKSharp? Qt?
  • 11. IntelliJ Platform Foundation of all of our IDE’s Provides base infrastructure Project view, code completion, UI toolkit + Platform plugins such as version control, terminal, ... + JetBrains <product name> IDE plugins Open source (build your own IDE) https://github.com/JetBrains/intellij-community Windows, Linux, Mac – cross-platform thanks to JVM
  • 12. IntelliJ Platform + R# ? IntelliJ Platform Great foundation to build on Windows, Linux, Mac JVM ReSharper (R#) All of those .NET inspections, refactorings, ... .NET
  • 13. Options! Rewrite R# in Java? 14 years of implementation and knowledge, what could go wrong! 2 R# implementations... Automatic conversion? Run R# as a command-line process Already possible (thanks, 2004!) “Just need our own UI on top” – thin IntelliJ Platform UI process
  • 14. IntelliJ Platform + R# ! Headless R# as a language server Cross-platform No constraints It is ReSharper! 2 products, 1 code base IntelliJ as a thin UI Control the R# process
  • 15. We’re not there yet... Is IntelliJ really a thin UI? Three cases... Features where IJ handles everything Features where R# handles almost everything Features where both IDE’s make an awesomer IDE Both sides are an IDE!
  • 16. 1 + 1 = 3 demo
  • 17. How to make them talk? Inter-process communication
  • 18. Example: Context actions (Alt+Enter) 1. IntelliJ provides text editor, caret(s) and lets us Alt+Enter 2. Ask current document’s language for items to display in Alt+Enter menu For C#, this language is a facade to the R# process 3. IntelliJ renders list of items, may add its own entries List of completion items can be a tree of names and icons.
  • 19. 1. IntelliJ provides text editor and plumbing to display squiggles 2. IntelliJ notifies R# that a document was opened (or modified) 3. R# does its thing (analyze, inspect, summarize that data) 4. R# publishes this to IntelliJ 5. IntelliJ displays this info List of inspections can be a set of name, icon, severity, tooltip, text range Not RPC-style! Analysis can take any amount of time, so IJ should not wait for it. ~~~~~~ Example: Inspections and highlighting
  • 20. 1. Bi-directional User can be typing A refactoring or completion may be injecting code at the same time 2. Can be implemented with delta’s IntelliJ pushes delta to R# R# pushes delta to IntelliJ One or both win (concurrency) Data is a delta (from line + column, to line + column, text to insert) Example: Writing code
  • 21. Types of data Context actions A tree of names and icons Inspections A set of name, icon, severity, tooltip, text range Writing code Delta with from line + column, to line + column, text to insert Fairly simple messages! Can we make this generic enough? Make one inspection work  make them all work
  • 22. Which protocol do we use? Re-use Language Server Protocol (LSP)? Great in itself – IDE concepts like window, editor, language, diagnostics, ... We would need customizations for R# feature set Or build a custom REST-like protocol? Experimented with JSON, ProtoBuf, request/response style
  • 23. Request-action-response LSP and custom protocol are request/response mostly Conflict resolution... What if both human and a refactoring make a change to code? How to keep things synchronized and in a healthy state? Realization: Why a “request-action-response” flow? Why RPC? Both IDE’s share a similar model and architecture Messages are simple, but for RPC they would need context (which solution, which file, state info, ...) – overhead!
  • 24. Model-View-ViewModel (MVVM) “facilitates separation of development of the user interface (view) from development of the back-end (model) using a view model as a value converter” IntelliJ is our view, ReSharper provides the model
  • 25. Model IDE into a shared view model! Protocol could serve as the view model that shares lightweight data Project.Files.Add("Foo.cs") Project.Files["Foo.cs"].Inspections.Add( "Possible null reference", "Warning", 20, 30, 20, 42); Both processes can react to such change (observable + observer)
  • 26. Conflict resolution (again)... Changes to our shared model can come from IJ and R# Can still cause conflicts due to features or timing/GC issues IntelliJ: “Deleted file foo.cs” R#: “I just refactored foo.cs” Solutions! Locking? (freezes, how to handle deadlocks?) Conventions!
  • 27. Protocol conflict conventions View + Model (or client: IntelliJ + server: ReSharper) Each value stored in the view model has a version Updates by the view/client increment the version Updates by the model/server do not Only accept changes if version is the same or newer If not: the change is discarded
  • 29. Obligatory diagram Ideally, our developers do not have to know the details of this. Just create view models.
  • 30. Rider protocol “Reactive Distributed communication framework for .net, kotlin, js” Open source - https://github.com/jetbrains/rd 1. Include protocol libraries and build tools on all sides 2. Write view model in special DSL 3. Generate code 4. Work with generated model .NET/Kotlin/JS/... code generator Model definition DSL Primitives Conflict resolution, serialization, ... Sockets, batching, binary wire protocol
  • 31. Rider protocol Only need to know about a few primitives Conflict resolution, wire protocol, timeouts, ... handled by protocol Code generated based on the defined view model Bonus points: no reflection/introspection needed on every run Hierarchical + lifetimes
  • 32. Hierarchical + lifetimes Solution NuGet host Project Document Inspections PSI (Program Structure Interface) Class Field Method Document Inspections ... Project Local history NuGet tool window Project Editor tab Inspections Language Editor tab Inspections Language viewmodel(Riderprotocol)
  • 33. Hierarchical + lifetimes Cleanup and resource management Objects attach to lifetime Lifetime destroys attached objects Parent lifetime destroys children public class Lifetime : IDisposable { private Stack<Action> resources = new Stack<Action>(); public void Attach(Action resource) { resources.Push(resource); } public void Attach(IDisposable disposable) { resources.Push(disposable.Dispose); } public void Dispose() { while (resources.Count > 0) { var resource = resources.Pop(); resource(); } } }
  • 34. Signal (event) Producers/subscribers Observable/observer Using lifetime to manage subscription // Produce event interface ISource<T> { void Fire(T value); } // Subscribe to event interface ISink<T> { void Advise(Lifetime l, Action<T> handler); } // Event interface ISignal<T> : ISource<T>, ISink<T> { }
  • 35. Property Signal implementation Using lifetime to manage subscription To changes to propery in general To changes to specific value // Observable property interface IProperty<T> : ISink<T> { T Value { get; set; } void Advise(Lifetime l, Action<T> handler); void View(Lifetime l, Action<Lifetime, T> handler); }
  • 36. Primitives Primitive Description Signal Event that is fired when something happens Property Observable value List/set/map Observable collections Field Immutable value Call/callback RPC-style call, needed from time to time byte, short, int, long, float, double, char, boolean, string, securestring, void, enum, ... Primitives and special types Aggregatedef/classdef/structdef A node in the viewmodel
  • 38. Rider protocol Very extensible through Kotlin-based DSL Easy to work with for our developers Update view model, generate code, work with generated code No need to think about things being multiple processes, state, conflict resolution, ... Having the Kotlin-based DSL means Find Usages, Navigation, ... work Cross-language, cross-platform Plugin model for Rider is more complex (IJ and R# parts may be needed) https://github.com/JetBrains/fsharp-support https://github.com/JetBrains/resharper-unity
  • 40. Two processes! Isolation! Each has their own 64 bit memory space Also their own separate GC Multi-core machines Start/stop independently
  • 41. Debugging? Four processes. Rider (IntelliJ + ReSharper) Debugger worker process Your application
  • 42. Multiple processes... What if certain features were running in their own process? Isolation Own memory constraints Start/stop independently Crash independently
  • 43. Shared view model Pass around a shared view model to interested parties Example: Roslyn analyzers/inspections Pass around “reference” of [ { name, icon, severity, tooltip, text range } ]
  • 44. Multiple machines Socket-based wire protocol Sockets can be on multiple machines Example: Docker debugging Remote debugging
  • 45. Unity game engine www.unity3d.com Extension to view model Rider plugin Unity editor plugin https://github.com/JetBrains/resharper-unity https://twitter.com/kskrygan/status/1064950644094705664
  • 48. Model the view as well public CSharpInteractiveOptionsPage(Lifetime lifetime, ...) : base(lifetime, ...) { AddHeader("Tool settings"); AddToolPathFileChooserOption(lifetime, commonFileDialogs); AddEmptyLine(); AddStringOption((CSIOptions s) => s.ToolArguments, "Tool arguments:", "Additional tool arguments"); AddHeader("Tool window behavior"); AddBoolOption((CSIOptions s) => s.FocusOnOpenToolWindow, "Focus tool window on open"); AddBoolOption((CSIOptions s) => s.FocusOnSendLineText, "Focus tool window on Send Line"); AddBoolOption((CSIOptions s) => s.MoveCaretOnSendLineText, "Move caret down on Send Line"); // ... FinishPage(); }
  • 49. Every IDE as both a client and server Front-end and back-end: different garbage collection Whatever happens in the backend, the frontend can process the user's typing Every IDE as both a client and server (“contributor to the model”) Bring this technology to other IDE’s? Reuse WebStorm's HTML/CSS/JS functionality in ReSharper (e.g. Visual Studio + R# using WebStorm in back-end mode)
  • 51. Conclusion Rider is an IDE built on two IDE’s two technology stacks Rich and easy programming model was needed to bridge: Rider protocol Protocol gave rise to more than two processes more than one machine micro UI Free trial! www.jetbrains.com/rider

Editor's Notes

  1. This talk is about: How Rider came to be How protocol allowed us to gain additional knowledge and ideas of separating parts of our IDEs and building TOWARDS microservices This talk is also about building a new product based on many years of previous investments
  2. Open ContosoUniversity in Rider Show solution explorer Show editor where you can type, show inspections, navigation, refactoring Mention debugging Mention tools like database Mention cross platform
  3. Obligatory marketing sldie
  4. Now that we have seen a bit of the IDE, let’s look at some history first.
  5. Talk about history of JetBrains a bit, mention Eclipse in 2002, need for a new product. Mention ReSharper plugin to VS..
  6. ReSharper 1.0 -> 2.0 – let’s do a full IDE Rely on being a plugin to VS? Or build a full .NET IDE? It was never released, but a fully functional prototype. Provided a solution explorer, an editor, find usages, code completion and refactorings. Built on .NET WinForms and Windows Presentation Foundation (WPF) wasn’t around. Project halted – VS plugin seemed best way to go
  7. Project halted (but not gone to waste) Concepts and architecture remained Action system Text control implementation Several tool windows and toolbar controls Unit test runner ReSharper command line tools (CLI) Keep functionality separate from the actual IDE Helped future versions of ReSharper: Visual Studio 2010, 2013, 2015 and 2017 Same core, IDE interoperability layer on top
  8. Headless R# as a language server Cross-platform (.NET on Windows, Mono on Linux and macOS) No constraints (64 bit process, and its own memory space) It is ReSharper! 2 products, 1 code base IntelliJ as a thin UI Control the R# process Client/server or IPC communication
  9. Is IntelliJ really a thin UI? Full IDE for its own languages, no need for R# there Combined languages (e.g. JS/TS/HTML in IJ and R#) Change tracking, VCS, REST client, tool windows, ... Three cases... Features where IJ handles everything Features where R# handles almost everything Features where both IDE’s make an awesome IDE Both sides are an IDE! Same concepts, but not the same knowledge about the project
  10. Open ContosoUniversity in Rider Navigate to *.html – Navigation already includes all flows! Files in IJ, symbols in IJ, symbols in R# HTML editor is purely IntelliJ Navigate to *.cshtml – Again both IDE’s at work CSHTML is both C# and HTML – now what? Both IDE’s! Navigate to HomeController C# is al ReSharper. Or is it? Show database tools + language injection with database query. Mention local history – tracked by IJ but R# needs to know about this too, e.g. in a big refactoring
  11. If we are going to make them talk, let’s look at how we could model the data that goes over the wire.
  12. Re-use Language Server Protocol (LSP)? Great in itself – IDE concepts like window, editor, language, diagnostics, ... Built for/with VS Code and the ideas in that IDE. Not bad! PoSh plugin uses this, and works fine! But feature set is a bit more limited than what we have in R#. We would need customizations... LSP is lowest common denominator – some R# refactorings can not be done Mixed languages? e.g. CSHTML which can be HTML + CSS + JS + C#/VB.NET Build a custom REST-like protocol? Experimented with JSON, ProtoBuf, request/response style Slow, hard to customize, hard to develop with when all is in motion
  13. Objects bind to other objects, instead of parent keeping track of just direct children
  14. Open empty project in Rider, install a NuGet package, show log tab Open Rider in IntelliJ IDEA NuGetModel.kt – explain it Extends the solution node in the model Has a bunch of inner classes, and properties Interesting is sink(“log”) Generated version: RdNuGetHost – Kotlin implementation of our view model In RiderNuGetLogPanel – init -> facade.host.log.advise(facade.lifetime) Open ReSharperHost.Generated.sln in Rider Generated version: RdNuGetHost – C# implementation of our model In NuGetNativeLogger, public override void Log(ILogMessage message) => myHost.Log.Fire( new NuGetLogMessage(message.Time, NuGetLogContext.NuGet, Convert(message.Level), message.Message)); Open Rider in IntelliJ IDEA NuGetModel.kt – find property("configFiles", immutableList(classdef("RdNuGetConfigFile") { RiderNuGetSourcesPanel – init - facade.host.configManager.configFiles.advise(facade.lifetime) { newFiles -> Similar construct to subscribe to sources being added to the view model Open ReSharperHost.Generated.sln in Rider In NuGetCredentialProviderHost, show lifetime example – when solution closes the lifetime closes, so this thing cleans up as well
  15. Thought experiments: WPF/XAML renderer
  16. Rider and Unity Editor can be started independently, but this does not prevent us from both processes to look for each other’s Rider Protocol connection. When both are launched and the connection is allowed, Rider can share its view model with Unity Editor and vice-versa. This lets Rider control play/pause/and stop buttons in Unity, and also provides the ability to debug code in Rider, even though it is running in the Unity Editor.
  17. Rider and Unity Editor can be started independently, but this does not prevent us from both processes to look for each other’s Rider Protocol connection. When both are launched and the connection is allowed, Rider can share its view model with Unity Editor and vice-versa. This lets Rider control play/pause/and stop buttons in Unity, and also provides the ability to debug code in Rider, even though it is running in the Unity Editor.