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.

A sketch for enhanced OSGi support in Flow

See original GitHub issue

Hi,

I’ve followed the ongoing effort of making Flow OSGi capable. Thank you for this great work by the way. However, this effort seems to aim at merely making the Flow framework run within an OSGi container, but not to enable OSGi developers to incorporate Flow in a pure OSGi application, e.g., making heavy use of Declarative Services (the DI of OSGi).

Therefore, I have tried to sketch a solution on how we might enhance the current version of Flow to enable OSGi developers to make @Route/@RouteAlias annotated classes also be OSGi components whose lifecycle is controlled by OSGi instead of Flow. Additionally, this solution would not need any invasive code changes in Flow core, as the current solution does with classes like OSGiAccess and others, but merely would be an additional bundle that can be deployed if running in an OSGi container but doesn’t have to if Flow is used in another context. This would also be more similar to the OSGi integration offered by Vaadin 8.

As said above, I already have tried to sketch a possible solution that requires as few changes as possible to existing code. This with additional explanations on how this might work can be found here: https://github.com/Sandared/flow-osgi

This sketch is not yet working. The places where additional work and input is needed are commented with TODOs I’m sure I didn’t cover all aspects of what is needed to make such an enhanced integration work, as I’m not very familiar with the inner workings of Flow. So any feedback is highly welcome. 😃

Kind regards, Thomas

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:26 (17 by maintainers)

github_iconTop GitHub Comments

1reaction
Legiothcommented, Feb 18, 2019

Rather than FQCN, I’d then recommend using HasElement as the service type. Alternatively, a separate marker interface could maybe be introduced for this purpose, e.g. RouteComponent.

1reaction
Sandaredcommented, Feb 7, 2019

@pleku / @mehdi-vaadin that’s good to hear. I just wanted to make sure that I’m not wasting your and my time with this issue 😉

I really would love to see this integration work out, so if you need anything regarding OSGi (tips/hints/design/explanations/implementations) I will gladly help you out whenever I can. Just write me.

BTW: From what I saw during digging through the framework code I think that the OSGi integration can even be done without (or just minimal) changes to other parts of the framework, so maybe we are able to free the core part of the framework from OSGi dependencies completely.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Vaadin OSGi Support | Integrations | Flow - Vaadin
To deploy Vaadin applications as OSGi bundles, static resources must be published using the appropriate APIs. The application is typically ...
Read more >
OSGi. What's That?. The Java specification that you… | - Medium
OSGi makes complex software look like a Python “Hello world” example. It offers a nice development flow which works towards a loosely-coupled, ...
Read more >
What is OSGi? - An Intro to The Open Service Gateway Initiative
OSGi stands for Open Service Gateway Initiative, which is a Java ... Improved coding, testing, and debugging due to a small number of ......
Read more >
OSGi Core
OSGi ™ is a trademark, registered trademark, or service mark of the OSGi Alliance in the ... vacy Enhancement for Internet Electronic Mail....
Read more >
Resolving Dependencies | bnd - Bndtools
This Application Note is about resolving in OSGi. The OSGi Framework has always used a resolver to wire a given set of bundles...
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