1 / 17

aQute.se

Why Have The OSGi Specifications Been Based On Java™ Technology ? By Peter Kriens, CEO aQute OSGi Technology Officer. www.aQute.se. Content. Interpreted and Compiled languages Detailed look at Issues Comparison with .NET Conclusion. Interpreted. Compiled. Java. Source code.

edie
Download Presentation

aQute.se

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Why Have The OSGi Specifications Been Based On Java™ Technology?ByPeter Kriens, CEO aQuteOSGi Technology Officer www.aQute.se

  2. Content • Interpreted and Compiled languages • Detailed look at Issues • Comparison with .NET • Conclusion

  3. Interpreted Compiled Java Source code Source code Source code Compiler javac byte-codes Interpreter VM CPU CPU CPU Interpreted Languages • Interpreter/VM is between source code and CPU • Java is an interpreter with a defined executable format: VM

  4. Source code Compiler Portability Interpreted Compiled Java • Interpreters are easier to port to other environments • No Source Code changes required Source code Source code Source code Compiler javac Interpreter VM Interpreter VM CPU CPU CPU CPU CPU CPU

  5. Illegal Access To Memory Interpreted Compiled Java • No Illegal Access: Reduces security threats, Improves stability • No (more) memory exceptions and buffer overruns Source code Source code Source code Compiler javac Interpreter VM CPU CPU CPU

  6. lib lib lib Versioning Interpreted Compiled Java • Solves many version issues: Simpler deployment • No More: Requires version 5.12.1.4-kwt • Interpreters use symbolic linking: more robust Source code Source code Source code Compiler javac Interpreter VM CPU CPU CPU

  7. Type Problems Detection Interpreted Compiled Java • Early detection of bugs: improved productivity • Accidental and intended type violations • Java finds all type errors, and many early Source code Source code Source code Compiler javac Interpreter VM CPU CPU CPU

  8. Performance Interpreted Compiled Java • Pre-processing reduces overhead: faster startup • Compiled code is most efficient • JIT techniques can reduce the performance gap Source code Source code Source code Compiler javac Interpreter VM CPU CPU CPU

  9. Interpreted Compiled Java Source code Source code Source code mod mod mod mod mod mod Interpreter Compiler VM rt.jar A-lib B-lib A-lib B-lib Too Many Libraries ... • Foundation library: One App for all platforms! • Problems increase exponentially! • Java very well defined, including run-time

  10. Conversion through casting Invalid memory access checks Use of Unicode versus bytes Meta information for diagnostics Security Checks Source code Source code Source code Source code Source code = int = byte security check memory memory unicode s meta s Do It Right versus Performance • Cannot perform hacks: security versus performance • Traditional code has hacks that perform well • Hacks increase maintenance cost and field problems

  11. Traditional Java code network = Class Loader code code run-time VM code CPU CPU Life Cycle Management • Loading policy defined in application code: Flexibility • Used by the OSGi specifications • Policies implemented by application code

  12. Security • Language includes security check: Safe code • Prevents against viruses and worms • First language with built-in security architecture Application A Verify permissions for resource x Application B Application C method foo SecurityManager resource x

  13. But What About Microsoft’s .NET ?

  14. What is .NET? Windows CE .NET SOAP .NET Passport C# Windows Forms ADO.NET Visual Studio .NET CLI CLR Microsoft .NET speech ASP.NET Web Services Visual Basic .NET .NET Framework

  15. Java versus .NET CLI/CLR • Java VM technology is similar to .NET C# • But the Java environment is: • More mature • Not controlled by a single vendor: JCP • Applicable for embedded devices • Coherent environment (single syntax) • Exists for virtually every OS in existence, today • Runs the OSGi specifications!

  16. Conclusion • Portability • Safety and security features • Increased productivity • Class loaders make OSGi possible • Interpreted language is the right choice for the OSGi • Should we use Java today [again]? • YES!

  17. Questions ? Contact: Peter.Kriens@aQute.se

More Related