We deploy applications to clients who cannot go offline without taking a hit on revenue. They process thousands of calls per second. Right now, they have to do the updates in their maintenance window to take in new fixes or updates. If we can deliver fixes and enhancements as a hot deploy, it will be of a great benefit.
But of course there is a risk factor and extra testing efforts with simulated traffic test before we can do it. OSGi is not just for dynamic updates, it is good for things like versioning to assure that the right version is being picked in a complex environment. We're using it in a big telecom. We have it in production for 2 years and we're continuing adding bundles now we have about bundles. Operation guys are delighted for the fine control this give to them: they can start stop single functionalities and monitoring them.
Theoretically we could also hotdeploy a new version in production, but in the reality we use that feature only when doing test and preprod. Our main problem is always try to use standard java framework within osgi. We're using maven plugin. All in all we're happy with this choice but you need to consider 2 things: 1.
Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Has anyone found OSGi to be useful in corporate applications? Asked 11 years ago. Active 9 years, 3 months ago. Viewed 2k times. Improve this question. When the project was created from the template, Java source for a class named org. Example was generated. Open this file and make it implement Billing :.
This means that instances of the class will be automatically created and registered with the OSGi service registry. We can and should write a test case to ensure the implementation class works as expected.
In the test folder, a test case class already exists named org. Write a test method as follows:. As in the previous bundle, it is automatically built based on the content of bnd. In the current project however, we want to build two separate bundles. Right-click on the project org. In the resulting dialog, type the name provider and click Finish.
Some settings will be moved from bnd. You should now find a bundle in generated named org. In the resulting dialog, enter run as the file name and click Next. The next page of the dialog asks us to select a template: choose Apache Felix 4 with Gogo Shell and click Finish.
In the editor for the new run. Type the lb command to view the list of bundles. Now we want to include the org. This can be done as follows:. Check Auto-resolve on save and then save the file.
Returning to the Console view, type lb again:. We can now look at the services published by our provider bundle using the command inspect capability service 6 :.
OSGi is powerful. It can be a pain in the neck when used on scenarios where a simple Spring application could solve your problem, since its containers are still a litle bureaucratic and its containers still suffer from a lack of convention over configuration mindset when compared to some modern technologies.
Despite of that, it provides us a very mature modular architecture that allows us to create adaptable and dynamic tools. I strongly suggest you to go on and try some technologies built on top of OSGi to see how smooth can be modularity. Bringing back OSGi. Please enable JavaScript to view the comments powered by Disqus.
Disclaimer: I work at Liferay. I'm not aware of any other kind of database apart from VCSes! Liferay, Adobe, Jahia etc We could tag them by province, line of business, whatever, and then query it quickly. Jackrabbit is a fantastic piece of software. HillRat on June 8, root parent next [—]. The caller This particular quote is just describing modularity and encapsulation, something that Parnas could have told them in the '70s.
To a lesser extent, they're about scaling different parts of the system independently on stacks that don't natively support that with a sane concurrency model. That's really just it. Everything else is hype and buzzwords. Why can't you decouple teams form each other with modularity and encapsulation? I never worked in a team, but I could imagine that teams just have some agreements about interfaces and then work independently on a single code base but in a different classes and packages.
Because modules in the same codebase have an unfortunate tendency to cross each others' boundaries. It's just too easy for them to reach into each others' implementation classes and couple together strongly. But if they're different codebases, there's a stronger wall between them. Micro services and separate codebases are orthogonal. You can have multiple separate components libraries implemented in different codebases and linked as a single executable which is actually really common. You can have micro services deployed from as single huge codebase - just take a look at all so-called monorepos.
I had real world experience with OSGi 10 years ago and it was terrible. Bring on the traffic to your broken stuff. I'm in a OSGi platform today and have to say it's still a broken mess beyond the fact that the world moved from big irons 25 years ago making this whole exercise in in-jvm-microservices pointless, messing with the classloader breaks most of the good things of the Java platform classloader deadlocks?
However, organizations that reach the maturity level to use it will never let it go. In all honesty I tried to understand OSGi about ten years ago and failed to understand how to get started and how my current project could benefit from this. So we kept using maven and eventually gradle. It isn't really a competitor to maven or Gradle. Maven and Gradle don't run anything in a dedicated JVM. They're just tools to accomplish various goals based on your dependencies: compile, package, test, maybe deploy.
Not even remotely similar to runtime module management like you get in OSGi. Moter8 on June 8, prev next [—]. We had to use OSGi in a student project for a distributed systems module. It was a nightmare. We were basically forced to use Eclipse instead of IntelliJ which everybody was accustomed to. Eclipse alone was a nightmare to use slow, imports not founds, etc.
On the OSGi side: There is no package manager. One team tried to set up maven but they failed. We just loaded jars. The manifest files were a mess. Eclipse launch configurations were a mess had to be re-imported after any change. A small project which only required a backend was needlessly split into 5 parts. Over-engineering at its finest. MarkMc on June 8, prev next [—]. OSGi is what killed Eclipse. Instead of focusing on producing a fast, modern IDE, Eclipse became a design-by-committee monster that had to support just about any use case on the client.
Now I come more across Apache Felix in my work. I can imagine people not liking it, because it can be hard to learn. I used it mostly because of dependency hell and for encapsulation of reusable components. Controlling which parts of the component is exposed, is a very powerful concept. About reliability, I can only say that it is very reliable. It has to be, since it was developed to continue running, even if one of the loaded plugins crashes.
Imagine running plugins for the ABS, entertainment and navigation system and the navigation system crashes.
0コメント