4 ms·
I love OSGi, used mostly Eclipse Equinox a lot in my previous job. Now I come more across Apache Felix in my work. I can imagine people not liking it, because i
by ragerino 7y ago
I love OSGi, used mostly Eclipse Equinox a lot in my previous job. 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. With OSGi the navigation system can be restarted without impacting other more crucial components.
I hear sometimes people saying, Java modules are a replacement for OSGi. This sounds to me a lot like saying that Blockchain can be used as distributed storage system.
- yawaramin 7y ago> Imagine running plugins for the ABS, entertainment and navigation system and the navigation system crashes. With OSGi the navigation system can be restarted without impacting other more crucial components. This is exactly the Erlang 'let it crash' philosophy. Supervisor 'processes' (message-passing green threads) run concurrently and monitor and restart each other as necessary. The only difference is that this is not at the plugin level but at the process level, a core lightweight concurrency primitive provided by the Erlang runtime.
- namdnay 7y agoInterestingly enough, this is exactly how a car actually works. All systems have to send a heartbeat over the CAN bus, if not they are restarted.