Masoud Kalali has a software engineering degree and has been working on software development projects since 1998. He has experience with a variety of technologies (.NET, J2EE, CORBA, and COM+) on diverse platforms (Solaris, Linux, and Windows). His experience is in software architecture, design, and server-side development.

Masoud has published several articles at Java.net and Dzone. He has authored multiple refcards, published by Dzone, including but not limited to Using XML in Java, Java EE Security and GlassFish v3 refcardz. He is one of the founder members of NetBeans Dream Team and a GlassFish community spotlighted developer. Recently Masoud's new book, GlassFish Security has been published which covers GlassFish v3 security and Java EE 6 security.

Masoud's main area of research and interest includes service-oriented architecture and large scale systems' development and deployment and in his leisure time he enjoys photography, mountaineering and camping. Masoud's can be followed at his Twitter account.

Masoud has posted 82 posts at DZone. You can read more from them at their website. View Full User Profile

Win Your Copy: OSGI in Action

01.27.2009
| 20451 views |
  • submit to reddit
Published by: Manning
ISBN: 1933988916

Reviewer Ratings

Relevance:
5

Readability:
5

Overall:
5

Buy it now

One Minute Bottom Line

So far four chapters of the book is available to the MEAP subscribers. The available chapters form most of the book's first part which intended to introduce OSGI to readers. The chapters have acheived the goal that authors set for them very well. I was well familiar with OSGI Module layer before reading the available four chapters and now I can certainly say that the content provided in these chapters are unique in the quality. Reading these chapters further enhanced my knowledge on OSGI Module layer and service layer. I recommend this book to every serious Java developer which is involved or will be involved with modular architecture in general and OSGI in particular.

Review

The first chapter of every Mannig book that I read  was some kind of introduction and was covering the background of the domain which book was going to cover. The OSGI in Action is not an exception and its first chapter explains why a framework like OSGI is important for Java community and how this framework fit in the big picture of application development using Java programming language.

The second chapter, Mastering Modularity, gradually introduces modularity and OSGI Module layer. The good point about the chapter is the way that it starts with explaining the modularity and the reason that modularity is important and its gradual move toward OSGI module layer, module description and modules dependencies. The authors introduces a sample program in this chapter which they further complete the software in each chapter. Chapter ends where its provided content make the readers ready to learn the OSGI service layer.

Welcome to the third chapter which is the longest chapter so far. This chapter is title Learning Lifecycle,  and introduces the OSGI module life Lifecycle in a detailed manner. You can expect to see many sample code related to OSGI modules  lifecyle and module management.This chapter introduces the OSGI module management API and use them in completing the "paint program".

Forth chapter, Studying Services, is what most of the readers are looking to understand in the beginning. The forth chapter starts in the same way that second chapter started, it gradually introduces the service concept and reasons for using services by providing very good illustrations.  Later on author connect these concepts to OSGI service layer. Again you can see several sample code which shows how OSGI service layer works and how we can utilize OSGI framework API to manage the OSGI services lifecyle.

Published at DZone with permission of its author, Masoud Kalali.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

Christopher Brind replied on Thu, 2009/01/29 - 3:13am

By the way everyone, the discussion around JSR294 (Java Modularity) is under-way again.  You can observe the discussion here:

 http://cs.oswego.edu/mailman/listinfo/jsr294-modularity-observer

 Check out the archives to catch up on what is happening.

Also, if there's anyone on here from the UK, please contact me for more information about the official UK OSGi User Group which is being established soon.

 

Cheers,

Chris 

 

Allahbaksh Asadullah replied on Thu, 2009/01/29 - 3:20am

In todays world writing software which are scalable and which adhere to the standards is an essential skill. Frame work like OSGI helps not only write a scalable application but also give you flexibility to load and unload the jars dynamically. It reduces time to market ratio and also helps in getting best performance.

People have started using OSGI frameworks in Servlet Container which is giving raise to new wave of thinking and developing enterprises web applications. Platform like Eclipse which is widely used in industry for RCP application are giving developer a challenge to better understand OSGI underlying architecture and usage.

Till data there is only one book which give developer an insight into what exactly he can achieve by use OSGI Platform. It is nice move by Manning to come up with this title which will not only give a competition to the already existing book but also help people to understand the fundamentals in better way.

Albert Latacz replied on Thu, 2009/01/29 - 3:46am

I am looking into using OSGI (Spring DM Server) for one of my projects and really like to get familiar with this platform.

Geoffrey De Smet replied on Thu, 2009/01/29 - 6:38am

Has anyone got any experience generating OSGi configuration from maven2 pom.xml files with for example the maven felix bundle plugin?

If there are already seperate API and implementation modules, does felix handle the rest for you, based on the dependencies in the pom.xml files? Or is there still much work to be done even then?

Nicolas Bouillon replied on Thu, 2009/01/29 - 7:39am

I work at a reseller company, and we have to send request document to our supplier. Of course, each supplier has a different request format...

I discovered OSGi 2 month ago, and it was clear thatthe feature of dynamic reloading of bundle is a key feature. We want to be able to update our request document builder without stopping the service : we can't stop it !

So, the design is : each document builder is in a bundle, and expose itself as a OSGi service, with properties that explain what it can do (which request type it can build, and to who). Then, another bundle contains a manager, which grab all the services available. This manager has a unique entry point exposed to the world in RMI, and when called, find the appropriate service and call it. So we can dynamically add,remove or update document builder service.

All this stuff is build thanks to Maven and the Maven Felix Bundle plugin, that help us to automatically generate the appropriate MANIFEST.MF file. Spring DM for OSGi is used to expose and grab easier the OSGi service : our code contains no dependencies on the OSGi framework.

Christopher Brind replied on Thu, 2009/01/29 - 8:39am in response to: Nicolas Bouillon

Hi Bouil,

What IDE do you use?  

We use Eclipse and thus, each bundle is a project.  As a result the MANIFEST.MF is already appropriately defined and project dependancies that are implied by the manifest are enforced in Eclipse (e.g. project classpath).

The only problem is that PDE is not very friendly when trying to build in a headless envrionment, so we use Ant build scripts  in combinbation with a couple of Ant tasks that I wrote which know how to compile (osgijc) and build (osgibb) bundles based on the information in the MANIFEST.MF and build.properties (an Eclipse artifact).

http://code.google.com/p/osgijc/

http://code.google.com/p/osgibb/

 

Cheers,

Chris

 

Thamizh Arasu replied on Thu, 2009/01/29 - 8:46am

Hi All,

 

OSGI will help to load java modules dynamically. While development this will reduce most of the time. From this book i hope i can get some ideas on how OSGI can help. I am eager to get a copy of this book.

Thanks,

Thamizharasu S

Thamizh Arasu replied on Thu, 2009/01/29 - 8:47am

Hi All,

 

OSGI will help to load java modules dynamically. While development this will reduce most of the time. From this book i hope i can get some ideas on how OSGI can help. I am eager to get a copy of this book.

Thanks,

Thamizharasu S

Toni Menzel replied on Thu, 2009/01/29 - 8:59am

Finally OSGi is getting what it deserves: a place in every java developers bookshelf. And hopefully in most minds too. Well done (so far), Richard, Karl and Stuart!

cheers, Toni

Rahul Thakur replied on Thu, 2009/01/29 - 9:20am


Wow! This looks like a very welcome addition to a developer's book shelf!  OSGi is rapidly gaining popularity. I have had good reads with some of the Manning's 'in Action' titles I have,  and I believe this would be a great way to get accquainted with OSGi.  Fingers crossed now for the results :-) 

Cheers.

Nicolas Bouillon replied on Thu, 2009/01/29 - 9:49am in response to: Christopher Brind

@Christopher Brind

 We use Eclipse....mostly : we prefer to not force developpers to use a specific IDE. Then, the build is done with Maven, and the Eclipse project is not an Eclipse Plugin project. It's true that the compilation is not enforced by the MANISEST rules, but MANIFEST.MF is automatically generated so it's not a problem for us.

Thanks for the links, i didn't know those tools.

Christopher Brind replied on Thu, 2009/01/29 - 10:09am in response to: Nicolas Bouillon

I used to be the same - I was very against 'forcing' developers to use the same tool.  However, there's something to be said for a uniform development environment.  In theory I could virtualise our development environment and have new developers on board and coding within a day.  Eclipse is very straight forward and logical to use, IMHO.

The disadvantages of a non-uniform environment are just mind boggling when considering processes and commercial aspects.  If someone wants to use IntelliJ for instance, then that means a commercial licence.  Managing licences is an overhead managment can do with out.

However, in a environment where everyone uses the same IDE it is important to keep an open mind about improvements in other IDEs.   Then again, no one I know uses anything other than Eclipse but if someone came a long and said NetBeans (or whatever) can do everything Eclipse can and better, I'd have a look at it.

Btw, I wrote those tools, so please feel free to contact me if you want/need any help with them.

Cheers,

Chris

Nicolas Bouillon replied on Thu, 2009/01/29 - 10:57am in response to: Christopher Brind

Chris,

I agree with you about licence nightmare. Here, the "official" (=preferer by the CTO) tool is Eclipse. But we don't buy any licence for proprietary IDE, so the developper has to choose in free/FOSS IDE. In practive, Eclipse (80%) and Netbeans (20%) are the only 2 tools used.

About your Ant OSGi tools. We use Maven and very happy : the maven-bundle-plugin is really awsome. We developp our project as a usual Java project, and the maven bundle plugin do the hard job : writing dependencies in MANIFEST . And we are not dependent on Eclipse.

http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html

Regards.

khaled essghaier replied on Thu, 2009/01/29 - 11:00am

Hi i am a student in computer science engineering and always wanted to learn OSGi but didn't got the materials it will be great to get some help since i am starting my internship the next week and be dealing with SOA and potentially OSGi   

Debbabi Bassem replied on Thu, 2009/01/29 - 11:22am

I have one year experience with OSGi. I spent my internship last year (and this year too) in the team where Felix osgi was born (OSCAR :)

My interest is often around the dynamic component models upon OSGi.

 

Amr Lafi replied on Thu, 2009/01/29 - 6:17pm

Hey,

I'm an ASP.NET developer and eager to know about OSGI and how it can be used for integrations between Networks and devices revealing Java's best feature : Portability ! I would like to win this book :)

Markus Kolb replied on Fri, 2009/01/30 - 4:39am

Mmh. OSGi is another thing I would like to use in the near future. The book OSGi in action would be a good starting point to get to best practice in shortest time. At least I hope ;-)

Danny Lee replied on Fri, 2009/01/30 - 6:22am

Hi,

I'm developing software for patient care and thinking about redesigning my software in the near feature for better integration with hospital information system. So the main idea is to combine all the hypes and to use both SOA and OSGi. I think a good OSGi book would be a great help for me in this task. 

 

 

Upendra Chintala replied on Mon, 2009/02/02 - 2:26am

I tried to find a best and simple material on OSGI from long time. Hope this book is going to fill the gap.

Eric Rauer replied on Mon, 2009/02/02 - 10:22pm

I have no experience with OSGI but hope to learn.

lin kai replied on Tue, 2009/02/03 - 2:11am

  I am a university student of China. I doing RFID middleware development in my lab. Since I learned Java programming language and using Eclipse as the IDE, I was getting interesting with the Eclipse plugin  architecture and OSGi framwork. I introduced OSGi in to the development of our RFID middleware.

  During my study of OSGi, I found that lacking of books was an obstruction. I have only read a no-yet-finished book << OSGi in Practice >> which was wrote by Neil. I can wait to read the "in Action" book of OSGi.

  I think OSGi is a wonderful modular framwork. But the OSGi is stiil not widely used that I can find enough case for me to study, expecially OSGi in the enterprise application, OSGi in the server side and OSGi-based web development. I hope this book can help me and more and more book will be published.

lin kai replied on Tue, 2009/02/03 - 2:22am

  I am a student in the University. I have learned Java programming language for many years. Since I used Eclipse as an IDE, I was getting interesting with Eclipse plug-in architecture and OSGi framwork. My lab is developing RFID middleware this time, and I introduced OSGi framwork into this project. OSGi is a wonderful modular framwork that I hope it can bring the advantage to our project.

  During my study on OSGi, I found that lacking of study meterial is an obstruction to everyone. I have only read a not-yet-finished book wrote by Neil --<<OSGi in Practice>>, and I just can not wait to read this "in Action" book about OSGi.

  I think OSGi now is not used widely enough that I cann't find some cases for me to study it, expecially OSGi on the server side and OSGi-based web development, and I realy hope this book can help me.

lin kai replied on Tue, 2009/02/03 - 2:23am

  I am a student in the University. I have learned Java programming language for many years. Since I used Eclipse as an IDE, I was getting interesting with Eclipse plug-in architecture and OSGi framwork. My lab is developing RFID middleware this time, and I introduced OSGi framwork into this project. OSGi is a wonderful modular framwork that I hope it can bring the advantage to our project.

  During my study on OSGi, I found that lacking of study meterial is an obstruction to everyone. I have only read a not-yet-finished book wrote by Neil --<<OSGi in Practice>>, and I just can wait to read this "in Action" book about OSGi.

  I think OSGi now is not used widely enough that I cann't find some cases for me to study it, expecially OSGi on the server side and OSGi-based web development, and I realy hope this book can help me.

lin kai replied on Tue, 2009/02/03 - 2:24am

  I am a student in the University. I have learned Java programming language for many years. Since I used Eclipse as an IDE, I was getting interesting with Eclipse plug-in architecture and OSGi framwork. My lab is developing RFID middleware this time, and I introduced OSGi framwork into this project. OSGi is a wonderful modular framwork that I hope it can bring the advantage to our project.

  During my study on OSGi, I found that lacking of study meterial is an obstruction to everyone. I have only read a not-yet-finished book wrote by Neil --<<OSGi in Practice>>, and I just can wait to read this "in Action" book about OSGi.

  I think OSGi now is not used widely enough that I cann't find some cases for me to study it, expecially OSGi on the server side and OSGi-based web development, and I realy hope this book can help me.

lin kai replied on Tue, 2009/02/03 - 2:26am

  I am a student in the University. I have learned Java programming language for many years. Since I used Eclipse as an IDE, I was getting interesting with Eclipse plug-in architecture and OSGi framwork. My lab is developing RFID middleware this time, and I introduced OSGi framwork into this project. OSGi is a wonderful modular framwork so that I hope it can bring the advantage to our project.

  During my study on OSGi, I found that lacking of study meterial is an obstruction to everyone. I have only read a not-yet-finished book wrote by Neil --<<OSGi in Practice>>, and I just can wait to read this "in Action" book about OSGi.

  I think OSGi now is not used widely enough that I cann't find some cases for me to study it, expecially OSGi on the server side and OSGi-based web development, and I realy hope this book can help me.

lin kai replied on Tue, 2009/02/03 - 2:27am

  I am a student in the University. I have learned Java programming language for many years. Since I used Eclipse as an IDE, I was getting interesting with Eclipse plug-in architecture and OSGi framwork. My lab is developing RFID middleware this time, and I introduced OSGi framwork into this project. OSGi is a wonderful modular framwork so that I hope it can bring the advantage to our project.

  During my study on OSGi, I found that lacking of study meterial is an obstruction to everyone. I have only read a not-yet-finished book wrote by Neil --<<OSGi in Practice>>, and I just can wait to read this "in Action" book about OSGi.

  I think OSGi now is not used widely enough that I cann't find some cases for me to study it, expecially OSGi on the server side and OSGi-based web development, and I realy hope this book can help me.

lin kai replied on Tue, 2009/02/03 - 2:28am

  I am a student in the University. I have learned Java programming language for many years. Since I used Eclipse as an IDE, I was getting interesting with Eclipse plug-in architecture and OSGi framwork. My lab is developing RFID middleware this time, and I introduced OSGi framwork into this project. OSGi is a wonderful modular framwork so that I hope it can bring the advantage to our project.

  During my study on OSGi, I found that lacking of study meterial is an obstruction to everyone. I have only read a not-yet-finished book wrote by Neil --<<OSGi in Practice>>, and I just can wait to read this "in Action" book about OSGi.

  I think OSGi now is not used widely enough that I cann't find some cases for me to study it, expecially OSGi on the server side and OSGi-based web development, and I realy hope this book can help me.

lin kai replied on Tue, 2009/02/03 - 2:33am

  I am a student in the University. I have learned Java programming language for many years. Since I used Eclipse as an IDE, I was getting interesting with Eclipse plug-in architecture and OSGi framwork. My lab is developing RFID middleware this time, and I introduced OSGi framwork into this project. OSGi is a wonderful modular framwork so that I hope it can bring the advantage to our project.

  During my study on OSGi, I found that lacking of study meterial is an obstruction to everyone. I have only read a not-yet-finished book wrote by Neil --<<OSGi in Practice>>, and I just can wait to read this "in Action" book about OSGi.

  I think OSGi now is not used widely enough that I cann't find some cases for me to study it, expecially OSGi on the server side and OSGi-based web development, and I realy hope this book can help me.

lin kai replied on Tue, 2009/02/03 - 10:11am

  I am a student in the University. I have learned Java programming language for many years. Since I used Eclipse as an IDE, I was getting interesting with Eclipse plug-in architecture and OSGi framwork. My lab is developing RFID middleware this time, and I introduced OSGi framwork into this project. OSGi is a wonderful modular framwork so that I hope it can bring the advantage to our project.

  During my study on OSGi, I found that lacking of study meterial is an obstruction to everyone. I have only read a not-yet-finished book wrote by Neil --<<OSGi in Practice>>, and I just can wait to read this "in Action" book about OSGi.

  I think OSGi now is not used widely enough that I cann't find some cases for me to study it, expecially OSGi on the server side and OSGi-based web development, and I realy hope this book can help me.

lin kai replied on Tue, 2009/02/03 - 10:13am in response to: Wei Ling Chen

I am a student in the University. I have learned Java programming language for many years. Since I used Eclipse as an IDE, I was getting interesting with Eclipse plug-in architecture and OSGi framwork. My lab is developing RFID middleware this time, and I introduced OSGi framwork into this project. OSGi is a wonderful modular framwork so that I hope it can bring the advantage to our project. During my study on OSGi, I found that lacking of study meterial is an obstruction to everyone. I have only read a not-yet-finished book wrote by Neil --<>, and I just can wait to read this "in Action" book about OSGi. I think OSGi now is not used widely enough that I cann't find some cases for me to study it, expecially OSGi on the server side and OSGi-based web development, and I realy hope this book can help me.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.