question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Architecture Board] Clean up SPI to provide implementations

See original GitHub issue

Many MP specs provide an SPI for implementations to provide implementations of some API interfaces. Usually, the following pattern is used:

  • CoreInterface interface in the root API package
  • a CoreInterfaceResolver abstract class in an SPI package
  • a static resolver method which provides a default CoreInterface instance
  • the resolver method uses the service loader mechanism to load a CoreInterfaceResolver implementation which provides an instance of CoreInterface
  • alternatively, CoreInterfaceResolver implementation can also be set globally with a static setInstance method (to simplify providing an implementation in an OSGi environment)

Several issues have been raised to remove the setInstance method from the API artifact, claiming that separating it into an SPI package within the same artifact isn’t enough to prevent API consumers using it: https://github.com/eclipse/microprofile-rest-client/issues/103, https://github.com/eclipse/microprofile-open-api/issues/224, https://github.com/eclipse/microprofile-config/issues/364

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:21 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
strubergcommented, Jul 19, 2018

No @rmannibucau the link @starksm64 posted is the setInstance method. Afaiu this merhod is not needed anymore, nowhere. Not even in mp-config. It is purely for ancient OSGi containers and not needed anymore with more modern OSGi service discovery. We should clarify this with a few OSGi experts and have them provide feedback.

The point you likely mean is that mp-config is probably a rare example which cannot be CDI-first as it is needed during container startup already. This is actually a separated topic and we should split those 2 up in 2 tickets.

0reactions
kenfinnigancommented, Dec 7, 2018

In today’s architecture meeting there was agreement that this issue can now be closed

Read more comments on GitHub >

github_iconTop Results From Across the Web

Hardware SPI: Issues i discovered and potential solutions (API ...
I have spent endless nightly hours with the ESP and Logic analyser to figure out how the HW SPI bus is working and...
Read more >
Introduction to SPI Interface - Analog Devices
This article provides a brief description of the SPI interface followed by an introduction to Analog Devices' SPI enabled switches and muxes, ...
Read more >
A Design Methodology for Implementation of Serial Peripheral ...
The SPI is a full-duplex, synchronous, serial data link that enables communication between a host processor and peripherals. The Serial ...
Read more >
Serial Peripheral Interface (SPI) - The Linux Kernel Archives
SPI is the “Serial Peripheral Interface”, widely used with embedded systems because it is a simple and efficient interface: basically a multiplexed shift ......
Read more >
How to build a SPI Flash Controller for an FPGA - ZipCPU
First, flash memory is non-volatile, so anything that reads from it can do so immediately upon power up. Second, most FPGA's need a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found