Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [lsp4j-dev] question about adding services

Hi Scott,

1) correct, currently LSP4J is designed to be set up with a fixed set of service classes and interfaces and then listen to an input stream until it is closed or interrupted.

2) You could also try relaunching LSP4J from scratch when the set of service classes or interfaces changes. If that is not feasible, you should implement your own launcher that is able to update the supported RPC methods dynamically.

Regards
  Miro


On 14. May 2018, at 20:26, Scott Lewis <slewis@xxxxxxxxxxxxx> wrote:

Howdy,

I'm looking at using lsp4j to implement an OSGi Remote Services distribution provider.   Remote Services is an OSGi specification for exposing local services to external processes with standardized endpoint meta-data [1, 1a].    ECF has support for pluggable distribution providers...that are responsible for object ser/deserialization and communications transport [2].  It should be reasonably simple to use lsp4j/json-rpc to implement a new distribution provider that exposes OSGi services to remotes using JSONRequests, json-rpc for serialization and transport etc.

I've only just started inspecting/trying to understand lsp4j and have a questions

1) OSGi services are dynamic...i.e. they can be added/removed from the service registry at any time.   It appears to me that the current use cases of lsp4j are based upon the notion of a static Launcher/Builder, where the set of services is statically setup by the builder and then exported/made available upon create() and startListening().   Is that correct or am I misunderstanding something about how lsp4j currently works?

2) It seems like it would be possible to create a new Launcher/Builder, and some additional set of services and impls that would support the dynamic registration and unregistration of LSP service interfaces.   Does that seem like the right way to go or would there be another way?

Thanksinadvance for comments or pointers.

Scott

[1] https://wiki.eclipse.org/Tutorial:_Building_your_first_OSGi_Remote_Service

[1a] https://osgi.org/specification/osgi.cmpn/7.0.0/service.remoteservices.html

[2] https://wiki.eclipse.org/Distribution_Providers

_______________________________________________
lsp4j-dev mailing list
lsp4j-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/lsp4j-dev

--
Dr. Miro Spönemann
Software engineer and consultant

TypeFox GmbH
Am Germaniahafen 1, 24143 Kiel

Tel.: +49 151 42679459

Sitz: Kiel, Registergericht: Amtsgericht Kiel, HRB 17385
Geschäftsführer: Sven Efftinge, Moritz Eysholdt, Dr. Jan Köhnlein


Back to the top