Starting Out with OSGi

OSGi the modularity system for Java . Since some people prefer mailing lists than Google to request introductory material, here’s my own.

The first thing you’ll need to start practicing is an OSGi distribution. Pick one of them below:

You should be able to get example projects for any of the above, and try OSGi bundles, usually by dropping the bundles into a pickup folder.

Osgi layer
Image via Wikipedia

Then get an IDE to start developing:

Happy OSGi-ing! 🙂

Like this article? Please share this article with others:

baru "dhong" what OSGi is all about

Amsterdam servercluster in its own rack
Image via Wikipedia

OSGi…. comparison-nya dengan WebSphere , Tomcat, JBoss

Mereka mengepak sebuah "Application Server " beserta libraries-nya yang versinya udah ditentuin. Mulai dari servlet, JSP, JSF, ESB, JMS, JMX, dll.

Dengan begitu, file WAR "harusnya" sih kecil (dan pada kasus2 simple tetep kecil). Kenyataannya file WAR tetep banyak yang gede2, karena banyak library yang dibutuhkan yang belum tentu ada di paket AppServer yang awal, atau ada versi baru. Ato bahkan bisa konflik.

OSGi development on the other hand, membebaskan kita untuk menentukan "platform" sendiri. Mau pake CXF, Spring, JSF dll. versi berapa aja terserah. Deploynya bukan dalam bentuk 1 WAR gede, tapi dalam bentuk beberapa war+jar+cfg kecil2. JAR untuk library. WAR untuk webapp (dalam sebuah aplikasi OSGi bisa ada banyak WAR, masing2 WAR bisa punya servlet sendiri2, namun antar WAR bisa berkomunikasi via OSGi). Dan CFG untuk mengkonfigurasi service2 di dalam WAR/JAR tsb.

Kalo deploy di Application Server tradisionil tinggal copy ke "deploy"…. di OSGi pun sama persis. Baik menggunakan superlightweight (Pax-Runner + DirInstaller, ini cara yang dipakai ModuleFusion), moderately lightweight (Apache ServiceMix Kernel), maupun full-fledged (SpringSource dm Server).

Bedanya adalah berapa banyak library yang di-bootstrap oleh "underlying platform" sebelum "platform kita sendiri".

Misalnya kalo kita hanya mengandalkan Pax-Runner + DirInstaller, maka loggingnya harus di-specify sendiri, terus Spring, dan lain-lain kudu di-setting juga. Bukan setting sih, lebih tepatnya drag&drop JAR-JAR untuk library2 tersebut.

Kalo pake OSGi container yang agak lengkap, misalnya Apache ServiceMix Kernel. Ini sebenarnya konfigurasinya nyaris sama dengan yang barusan tadi, karena platform dasarnya tetap Apache Felix + "DirInstaller" bawaan ServiceMix (bertugas untuk autodeploy dan auto-undeploy). Bedanya adalah ServiceMix ini sudah punya bawaan logging, administration console, dan juga Spring dll. ServiceMix Kernel sudah cukup lengkap dengan size hanya 5,3 MB (ServiceMix Kernel lho, bukan paket lengkap yang beserta NMR untuk support JBI). Kecil sekali bukan untuk sebuah application server??

Yang lebih luengkap lagi adalah SpringSource dm Server. Ini bisa dibilang isinya adalah semacam ServiceMix Kernel plus web-based admin interface, web support/WAR built-in (JSP, JSF, dll.). Makanya ukurannya juga rada gede (32.4 MB).

Like this article? Please share this article with others:

Start A Meme: Kill The Internet?


The Sad Bear 1, by Nedroid

7 Reasons the 21st Century is Making You Miserable

It turns out humans are social animals after all. And that ability to suffer fools, to tolerate annoyance, that’s literally the one single thing that allows you to function in a world populated by other people who aren’t you. Otherwise, you turn emo. Science has proven it.

And none of it mattered, because none of those people knew me well enough to really hit the target. I’ve been insulted lots, but I’ve been criticized very little. And don’t ever confuse the two. An insult is just someone who hates you making a noise to indicate their hatred. A barking dog. Criticism is someone trying to help you, by telling you something about yourself that you were a little too comfortable not knowing.

If you’ve built a pool of friends via a blog, building yourself up as a misunderstood, mysterious Master of the Night, it’s kind of hard to log on and talk about how you went to prom and got diarrhea out on the dance floor. You never get to really be yourself, and that’s a very lonely feeling.

We have Iraq, but our parents had Vietnam (which killed 50 times more people) and their parents had World War 2 (which killed 1,000 times as many). Some of your grandparents grew up at a time when nobody had air conditioning. All of their parents grew up without it.

… where before we disagreed because we saw the same news and interpreted it differently, now we disagree because we’re seeing completely different freaking news. When we can’t even agree on the basic facts, the differences become irreconcilable. That constant feeling of being at bitter odds with the rest of the world brings with it a tension that just builds and builds.

The problem is you are hard-wired by evolution to need to do things for people. Everybody for the last five thousand years seemed to realize this and then we suddenly forgot it in the last few decades. We get suicidal teens and scramble to teach them self-esteem. Well, unfortunately, self-esteem and the ability to like yourself only come after you’ve done something that makes you likable.

Why do they make those cuts on their arms? It’s because making the pain—and subsequent healing—tangible releases endorphins they don’t get otherwise. It’s pain, but at least it’s real.

Read the article now on Cracked.com.

I usually don’t post something containing simply containing direct quotes.

But this time it’s an exception.

In fact, I think it’s one of the best, if not THE best, article I’ve ever read in 23 years.

Mr. Wong should have gotten a Noble Prize.

You can see the comments already resulted in that site, and on Digg

And you can also see my DailyStrength journal entry about it.


PUT IN THE BLACK BOX,
in its most literal meaning,
is actually already happening right now…
to you.

If you like Mr. Wong’s article, feel free, or I’d say let other your friends know about it: e-mail it, post it on your blog, forward it to your mailing lists. Whatever.

As long as it doesn’t make you more miserable. 😉

Like this article? Please share this article with others:

WordPress.com was Down for A Moment

Not sure why I’m doing this, but well… WordPress.com, that probably mega blog hosting provider was down for a couple minutes (?) a few hours ago, at 25 August 2007 around 14:25 GMT+0700.

Original message:

Goshdarnit!

Something has gone wrong with our servers. It’s probably Matt’s fault.

We’ve just been notified of the problem.

Hopefully this should be fixed ASAP, so kindly reload in a minute and things should be back to normal.

Alright alright… Nothing to see here. Move on…

Like this article? Please share this article with others:

Everybody Is A Programmer

Sculpting girl

When people ask me, what do you do? And I probably answer… “I’m a programmer.”

So they ask about computers, the Internet, e-mail, et cetera…

Great!

But the truth is… Everybody in this world is a programmer.

I’m not talking in the narrow sense, and I’m not talking in the too much broad/generic sense that doesn’t apply specifically.

I’m talking in the true sense, in that there’s no difference between a simple programmer and a computer programmer.

Confused?

Well, it may not be coming to you now. But I’ll guarantee it myself. 🙂

Like this article? Please share this article with others: