Synology DS 210j review

My solution was based on a super old computer and FreeNAS. It was a pretty good solution but:
  • It wasn’t setup for redundancy (I’ve been extremely lucky so far as I don’t remember ever having a hard drive crashing)
  • It was running out of space
  • It was quite power consuming
  • The torrent client wasn’t super stable
To solve my two first issues I would have had to buy new IDE hard drives (remember the desktop is old) or another PCI card to do the bridge for SATA disks). You can find cheap cards, but that was again, more DiY in an already busy box. FreeNAS could have done some software RAID which fulfilled my main issue.

I was willing to give a try to a ready-to-go NAS solution, convinced that in the long run it could be even cheaper (with the power consumption) and with less maintenance.

The choice
I wanted:
  • A network filesystem that is replicated on different disks
  • A DLNA server so I can watch movies from the NAS straight on my DLNA-ready TV

I wished

  • A good bittorrent client with watched folders… But I know nothing would compete with Transmission+RSS downloader+file organizer.
  • A simple HTTP server could be handy to easily share some documents with some people, but it was a no-brainer I expected this to be available anyway
I looked around for a NAS, I often heard of Synology and Drobo as being reliable.

Price helped choosing and the comparison of Synology products as well. The differences between the models are not that big and very often are only based on RAM, CPU and max capacity. At that time I didn’t care about RAM and CPU since the goal was to just deliver files to 1 or 2 clients…
So I went ahead and bought the DS210j with 2*1TB hard-drives from the super cool swiss online store Digitec for 435CHF (375USD)

The setup
I took the “standard” setup for harddrive which sounds like RAID1 but then differenciate from RAID1, it may have been a mistake as I don’t see the difference and I’m now afraid that if the box dies, I would have to buy a Synology box to be able to read my drives. I really don’t know it’s just an afterthought.
It took around 5 hours to complete the process of preparing the harddrives.
I could setup users and groups easily (well I have 2 users and only 1 that is really used…), I could create shared folders for Windows and share those though NFS as well. Easy enough.
Goal no1 was complete, from any computer of the house I can browse my files.

For the DLNA part, I’m still a bit confused and the main complain I have against synology is that all their apps are not configurable enough (and even what is simple was made hard with their very bad French translation). I basically organize my files such as:
  • /Media/Photos
  • /Media/Videos
  • /Media/Music
But the DLNA server wants me to have at the root of the volume:
  • /photo
  • /video
  • /music
And you can’t change this :-/ You can only trick and do links such as explained in this blog. But then byebye the ultimate dream of “I will not have to hack into this box”. I could have just move my files there and be good to go but I don’t like when things go in my way.
Also I have organized documents classified as above but also unorganized documents that come from BitTorrent that I want to be able to watch through DLNA before classifying them (If I ever do). I had to create a directory /video/incoming and point to the incoming folder of my bittorrent client… So all the unclassified documents, could be photos, videos or music go to /video/Incoming, not intuitive and I get the strange look from my wife if I have to tell her that if she wants to listen to some music, she has to:
  • Switch on the TV
  • Go the the media player
  • Choose Music
  • Now browse into Videos ??To listen to my music??
  • Then Incoming
  • And pick the album
I haven’t checked yet that the DLNA server index is properly refreshed when new content is added in /video/incoming.
Torrents
My experience with torrents was to use a “watched folder” where I would just drop my torrent files and they would start to be downloaded immediately. Unfortunately with the set of software provided by Synology this is not possible, you have to ‘manually’ add them one by one either through an application on Windows (I think there is for Mac as well) or through a web interface. Also the default settings is to stop seeding once a file has been downloaded completely, that’s a bad default IMO but can be changed.
And then I am not talking about automatic downloading though RSS or automatic sorting of files based on their names, that’s not for now…
So again, I was not expecting something good and I was unfortunately right :-/
Photos
There is one application that I didn’t think about using called “Photo Station” basically it takes whatever is in /photo and makes album from it so you can share with the world. Again this is a very basic app, you can’t do much with it. It takes the folder structure to create the albums, you can change the name of the album (it defaults to the name of the folder), you can decide if it’s public or private (if private, you need an account) but you can’t create groups and make some albums visible to only a group of people. (Edit: In fact you can select individuals, and there are more settings that I originally thought, such as virtual albums that display the latests added pictures)
It looks like this.
At the time of writing there is still no preview of the pics, it has been running for 4-5 days and creates a thumbnail out of all the pictures I had (35GB). That’s when I wished I had a bigger CPU :)

Conclusion
Overall I don’t regret my choice but it could have been better. I wasn’t expected anything great on the software end and it didn’t impress me. The box is reliable, I didn’t had to reboot it.
Someone who has more time may get a better solution with FreeNAS and a small/energy efficient machine, but it has some risks and requires much more time to setup, but then you have more freedom.
For the torrent thing, not sure what to do to make my life easier, will probably have to browse about other people experience and may have to hack the box again, something I wanted to avoid by buying a ready-to-go box.

I love the simpsons, and i felt the Apple love and hate…


Mapple – The Simpsons
par aarplane

Servlet filter doesn’t work, or does it ?

It has been a while I found the time to blog. Here is a little entry.

I’ve often hear that a Servlet filter was not working while trying to filter some Java resource. Usually this is because the filter is defined like:

<filter-mapping>  <filter-name>My Broken Filter</filter-name>  <url-pattern>/*</url-pattern></filter-mapping>

and the filtered content is accessed through request dispatching.

This look correct, but this is not. In the 2.4 version of the Servlet spec you can now filter resources accessed directly from the request, through an include request dispatcher, through a forward request dispatch or through the error mechanism of the spec.
By default, if nothing is specified, the filter will only apply to direct requests. This is the case here and this is what confuses people.

If you want to filter request coming from an include request dispatcher you need to add: <dispatcher>INCLUDE</dispatcher>

Here are few examples:
The following will only filter direct requests:

<filter-mapping>  <filter-name>My Filter</filter-name>  <url-pattern>/*</url-pattern></filter-mapping>

The following will only filter direct requests too:

<filter-mapping>  <filter-name>My Filter</filter-name>  <url-pattern>/*</url-pattern>  <dispatcher>REQUEST</dispatcher></filter-mapping>

The following will only filter direct requests and inclusions:

<filter-mapping>  <filter-name>My Filter</filter-name>  <url-pattern>/*</url-pattern>  <dispatcher>REQUEST</dispatcher>  <dispatcher>INCLUDE</dispatcher></filter-mapping>

The following will only filter inclusions:

<filter-mapping>  <filter-name>My Filter</filter-name>  <url-pattern>/*</url-pattern>  <dispatcher>INCLUDE</dispatcher></filter-mapping>

The following will filter all:

<filter-mapping>  <filter-name>My Filter</filter-name>  <url-pattern>/*</url-pattern>  <dispatcher>REQUEST</dispatcher>  <dispatcher>INCLUDE</dispatcher>  <dispatcher>FORWARD</dispatcher>  <dispatcher>ERROR</dispatcher></filter-mapping>

Want more ? Check the servlet spec, “SRV.6.2.5 Filters and the RequestDispatcher

Yamaha fz6 Fazer ABS, It’s here !


No comment so far… Still waiting on my “Student permit”.

Oracle DB, you suck !

As I’m working on a multiple supported database application, most of the issues i faced are because of Oracle Database…
Point 1 – The official jdbc driver sucks.
Since i write in Java, i need to go through the JDBC driver to access the Oracle Database server, while it should be transparent and a fairly easy piece of software to maintain, they do an horrible job… Let’s consider a moment that Oracle DB server is the best database server in the world, going through it with their JDBC driver is just pure abomination… It’s like driving a Porsche with a loose steering wheel, i would rather drive a Renault then.
Point 2 – Empty string is not NULL !
Oracle DB is the only database that i know considering “” (Empty string) as NULL. This is plain stupid.
Let’s say you want to enter a value which can be empty or undefined, well you can’t… (unless you have a special string that means undefined).

Those are the two main points I’m thinking about at the moment.

Mid-life crisis

I just realized that i have some symptoms of Mid-life crisis.

I’m literally changing many things in my life right now, and want to do lot of new things.
First i’m buying my very first house up in the mountains. Second i’m getting married next year. (Chronological order)

Now I regret i didn’t pursue on skydiving but will do my first paragliding fly this year !

Also, if you would have asked me about motorbike riding 3 weeks ago, i would have tell you this is something for people willing to die and wanting to show-off. For the past two weeks, i just kept thinking about riding a motorbike to come from my house to the office… And i don’t want to die, neither i want to show off. I want to learn something new, i’m very excited about learning that. (I still need to find some money and a place to park…)

Anyway what scares me now is that it looks like a mid-life crisis. Nobody really teached me how that works, but since i just turned 30 last November, does that mean i only have 30 more years to live ? I’ve been told that there is a one-third-life crisis too, i hope that’s it.

Why you should jailbreak your iPhone


I finally took some time to check why my cookies were not saved on the iPhone embedded Safari. It appears that it’s a bug that came with the 1.1.4 firmware, a stupid write permission missing, something that takes few seconds to fix on an open platform.
Unfortunately the iPhone is a closed platform if you don’t do anything and you can’t fix that bug yourself, you need to wait on Apple to get a new version of the firmware. Not everybody is affected by this bug so i don’t know the whole story behind, what i know is that when you have that bug it’s very annoying.

Anyway, i was always wondering if i would jailbreak it (open it, against the will of Apple) if i had an iPhone the “standard way”, the answer is “hell no” i can’t live with bugs if i know that it would be easy to fix after opening it.

(Now we could wonder why buying a closed platform at all, well just because it’s a well done gadget)

How to "propose" thanks to Facebook


If you are not so romantic or very shy, you can always propose your beloved through Facebook.
See, if you change a friend status to “engaged” it says “A notification will now be sent to xxx yyy for approval”.
Just wait and you’ll know if he/she says “Yes” !

By the way, this blog entry is also a good way to let you know that she said “yes” (in real, not on Facebook yet though).

OpenSource != Open bar


JBoss World parties usually have nice open bars (This year was a bit different, with a multi-disco place).

With an open bar, you come at the bar, you drink, you don’t pay and most people thank (or even tip) the barmaid. It works because a company pays for the barmaid salaries and the drinks. It’s a financial efforts that lasts for a couple of hours.

Open source definition was made on February 9th 1998, just 10 years ago. Happy birthday Open Source !
The whole notion of open source is quite new and its face is changing, it’s not a hippie thing anymore (considering that it has been).

I don’t exactly know why but many people are still convinced that you owe them more than the piece of software and documentation you wrote. Too many consider support as something you *must* also provide for free if you want them to give you the satisfaction to use your products. Why would they search or make efforts to understand your products if they are already kind enough to use what you wrote ?

So what’s different between free software (with documentation) and free support ? Answer: free support doesn’t scale. If i need to explain installation of a software, i can spend a couple of hours writing it, and i’m done. But sure there will be many cases where people prefer to ask rather than reading the fine prints (the authors knows better and it will only take 5 seconds of his time), the problem is that we need to spend 5-10min per questions and the same question will popup again

Don’t get me wrong, I, like many, enjoy answering forums, see people using my code, help people (i ran a forum for years just for the pleasure to be helpful) in their issues to either improve the doc (if they ask it can be missing) or improve the software by making it easier to use. But, noone should ever assume that he can come, grab a cocktail, not even say thank and drink for a long period of time.

When we start an opensource project we are very cautious to answer everybody’s question since the documentation is immature, we want to get people hooked on the product and such, but then comes a time where you have to decide where to spend your time between your family, developing the opensource project, answering people in a forum (and answering customer cases in my case which is a priority).

Now, please keep asking questions in forums, but:

  1. There is no commitment on answers, be prepared that nobody will have time to answer you
  2. Answer other people questions, it will push them to look at your cases, it also shows your commitment. It’s like helping the barmaid
  3. Do a bit of searching before, maybe the answer is in the FAQ, the doc, or the question have been answered many times before (Either someone will tall you to RTFM, and he will look at the bad boy “Why are you so rude”, or nobody will answer and you won’t know why)
  4. The search may help you to better explain your problem (again if nobody understands, everybody will more likely ignore your question, hoping someone else will understand)
  5. The answer to your question should be short, don’t ask “what is the universe ?”
  6. Be nice ! Nobody owe you anything (you can avoid to be nice if you have support contracts ;) but i would not recommend it to keep good contacts :-D )

If everybody could follow those rules (there are more to add) we would have much better OSS out there, see the time wasted by developers to answer those questions.

Anyway, i’ve been told that on our project, 2/3 of the questions are answered which is quite good I think.

Again, forums feedback is *very* important so keep posting, just don’t get angry if someone reminds you one of those rules.

JBoss World 2008 – Orlando

This JBoss World was particularly interesting for our project.

We had two major announcements:
- JBoss Portlet Bridge: The JSR-301 bridge with Seam and Richfaces supports for portlets, it is *huge*.
- JBoss Portlet Container 2.0: The implementation of the public final draft of Portlet 2.0. Julien demoed a mashup-style portal that uses the spec ! It is also *huge*.

It’s also always very interesting to hear people from the field facing our customers. The good news is that what they want totally fit with what we plan to provide.
Meeting users with whom i only interacted through the customer support portal or through the public forums is also something that worths a lot.

Last but not least, i got the opportunity to meet coworkers that i never met before.

Finally, partying with friends is always good, even though this year i wasn’t totally into it (tired).