Filed under: Photography
My chat conversation with kelvin, I dont know where to save it. But his advice cannot be ignored, so ill save it in my blog, as my reference as a newbie in photography.
—————————————————————————————————————————————————————-
(03:48:11 PM) (R) kelchai: hi arif
(03:48:12 PM) (R) kelchai: how is ur DXX?
(03:48:20 PM) Achmad Arif: hi kelvin
(03:48:31 PM) Achmad Arif: ok
(03:48:37 PM) Achmad Arif: but i havent fully test it
(03:48:40 PM) Achmad Arif: kelvin
(03:48:57 PM) Achmad Arif: how to create HDR pic
(03:48:58 PM) (R) kelchai: u guys in Hanoi all play DSLR oledi ar?
(03:48:59 PM) (R) kelchai: haha
(03:49:00 PM) Achmad Arif: using DXX
(03:49:09 PM) (R) kelchai: use photomatrix
(03:49:12 PM) Achmad Arif: normally how you do it ?
(03:49:16 PM) Achmad Arif: i see
(03:49:20 PM) (R) kelchai: use s/w to do it
(03:49:22 PM) Achmad Arif: i have it already ptomatix
(03:49:28 PM) (R) kelchai: got 2 method:
(03:49:29 PM) Achmad Arif: but its just to compose the image
(03:49:37 PM) Achmad Arif: how ya
(03:49:49 PM) (R) kelchai: 1. take 3 diff exposure of photo and combine it in photoshop
(03:50:07 PM) Achmad Arif: ..
(03:50:10 PM) Achmad Arif: ok
(03:50:19 PM) (R) kelchai: 2. shoot in RAW, re-create the photo with 3 diff exposure, then combine it in photoshop again
(03:50:30 PM) Achmad Arif: hmmm i see
(03:50:48 PM) Achmad Arif: normally how you create 3 diff exposure
(03:50:51 PM) Achmad Arif: do you use the
(03:50:54 PM) Achmad Arif: bracketing
(03:50:57 PM) Achmad Arif: BKT function
(03:51:10 PM) (R) kelchai: yes
(03:51:11 PM) Achmad Arif: i use that one, then i use the
(03:51:15 PM) (R) kelchai: tat is for this purpose
(03:51:16 PM) (R) kelchai: http://flickr.com/photos/kelchai/2821714388/in/set-72157605540750143/
(03:51:23 PM) (R) kelchai: my tis photo use BKT
(03:51:40 PM) (R) kelchai: hand held
(03:51:48 PM) (R) kelchai: with continuous shooting mode
(03:51:51 PM) Achmad Arif: wahhh
(03:51:52 PM) (R) kelchai: no tripod used
(03:51:54 PM) Achmad Arif: very nice
(03:51:57 PM) Achmad Arif: very sharp
(03:52:15 PM) (R) kelchai: keke
(03:52:17 PM) Achmad Arif: so you use Bracket
(03:52:22 PM) Achmad Arif: and then
(03:52:28 PM) (R) kelchai: yes
(03:52:30 PM) Achmad Arif: u used 3 image in bracket or 2 ?
(03:52:40 PM) Achmad Arif: imean DXX can 2image +
(03:52:42 PM) Achmad Arif: or 2 image -
(03:52:46 PM) Achmad Arif: or 3 image right
(03:52:53 PM) (R) kelchai: but in certain condition, where i cannot use hand held BKT, i will shoot in RAW
(03:53:00 PM) (R) kelchai: 3
(03:53:03 PM) Achmad Arif: i see
(03:53:13 PM) Achmad Arif: i used 3 image and use raw
(03:53:21 PM) Achmad Arif: not needed actually ya
(03:53:22 PM) Achmad Arif:
)
(03:53:34 PM) (R) kelchai: one under-expose, one normal, one over-expose
(03:53:41 PM) (R) kelchai: no
(03:53:47 PM) Achmad Arif: you use apperture 2 is it ?
(03:53:53 PM) Achmad Arif: apperture 2 for those bracket
(03:54:11 PM) (R) kelchai: no
(03:54:15 PM) Achmad Arif: owh
(03:54:18 PM) (R) kelchai: i prefer photomatrix
(03:54:24 PM) (R) kelchai: more dramatic feel
(03:54:26 PM) Achmad Arif: ???
(03:54:29 PM) Achmad Arif: i dont understand
(03:54:29 PM) (R) kelchai: or photoshop
(03:54:34 PM) Achmad Arif: what do you mean
(03:54:35 PM) (R) kelchai: more realistic feel
(03:54:57 PM) (R) kelchai: i meant the s/w used to generate the HDR
(03:55:07 PM) Achmad Arif: hmmm
(03:55:15 PM) Achmad Arif: i use photomatix also but still not
(03:55:20 PM) Achmad Arif: very good
(03:55:34 PM) (R) kelchai: need to do tuning
(03:56:14 PM) Achmad Arif: in the
(03:56:19 PM) Achmad Arif: BTK
(03:56:27 PM) Achmad Arif: we can use dial command right
(03:56:35 PM) Achmad Arif: the back and the front one
(03:56:48 PM) (R) kelchai: oh
(03:56:50 PM) Achmad Arif: if i switch the back one it will select how many photo you want to take
(03:56:55 PM) (R) kelchai: tat one is to set ur setting
(03:57:02 PM) Achmad Arif: but the front one is to set the apperture is it ?
(03:57:09 PM) (R) kelchai: got 2 funtional only
(03:57:15 PM) (R) kelchai: 1. select the no. of copy
(03:57:16 PM) Achmad Arif: normally the front one is for what ya
(03:57:22 PM) (R) kelchai: 2. select the +- EV value
(03:57:27 PM) Achmad Arif: owh ya EV
(03:57:35 PM) Achmad Arif: normally you set the EV to howmuch ya ?
(03:58:37 PM) (R) kelchai: depends on the lighting condition
(03:58:48 PM) (R) kelchai: normally +-2 is enuf
(03:59:07 PM) (R) kelchai: u need to learn n see the lights
(03:59:14 PM) (R) kelchai: the ambient light i meant
(04:00:02 PM) Achmad Arif: what is ambient light
(04:00:21 PM) Achmad Arif: normally night scene homuch the light u used
(04:00:22 PM) Achmad Arif: ?
(04:00:26 PM) (R) kelchai: the available light
(04:00:41 PM) Achmad Arif: i see
(04:00:42 PM) Achmad Arif: ![]()
(04:00:47 PM) (R) kelchai: at nite go home sleep, there is not enuf of light for photography ![]()
(04:00:58 PM) Achmad Arif: i see
(04:01:05 PM) (R) kelchai: for HDR i meant
(04:01:19 PM) (R) kelchai: at nite must play with long shutter speed
(04:01:39 PM) Achmad Arif: i see
(04:01:48 PM) Achmad Arif: there are 4 mode
(04:01:53 PM) Achmad Arif: P,S,A,M
(04:02:00 PM) Achmad Arif: normally u use which one ya ?
(04:02:44 PM) (R) kelchai: 75% i use A, 20% M, 5% S
(04:03:00 PM) (R) kelchai: the most important is M,A,S only
(04:03:13 PM) (R) kelchai: if A kenot achieve wat i wan, then i will use M
(04:03:23 PM) (R) kelchai: S is for panning
(04:03:35 PM) (R) kelchai: shooting race car, or water fall
(04:03:50 PM) Achmad Arif: i see
(04:03:54 PM) Achmad Arif: wahhh thanks for the tip
(04:03:55 PM) Achmad Arif: hmmmm
(04:04:17 PM) Achmad Arif: u use tripod to take HDR ?
(04:04:19 PM) (R) kelchai: no prob
(04:04:26 PM) Achmad Arif: or just by hand ?
(04:04:31 PM) (R) kelchai: if got time then we can organise a photo trip
(04:04:33 PM) (R) kelchai: kekeke
(04:04:36 PM) Achmad Arif: yeah
(04:04:37 PM) Achmad Arif: love too
(04:04:40 PM) (R) kelchai: normally is hand
(04:04:47 PM) (R) kelchai: lazy carry ripod
(04:04:53 PM) Achmad Arif: *soo chee said he also want to join
(04:04:54 PM) Achmad Arif: ![]()
(04:05:10 PM) Achmad Arif: wah what is your focal length
(04:05:11 PM) Achmad Arif: ?
(04:05:13 PM) (R) kelchai: chee haven’t bought his D80
(04:05:25 PM) (R) kelchai: now i got 2 lenses
(04:05:28 PM) Achmad Arif: he is still hunting
(04:05:32 PM) (R) kelchai: Nikon 18-200mm VR
(04:05:36 PM) (R) kelchai: Nikon 50mm f1.8
(04:05:46 PM) (R) kelchai: and Tamron 17-50mm f2.8
(04:05:48 PM) Achmad Arif: wahhh
(04:05:51 PM) Achmad Arif: you are rich
(04:06:02 PM) Achmad Arif: how much you bought that one ? ![]()
(04:06:46 PM) (R) kelchai: 18-200mm RM2600++
(04:06:46 PM) Achmad Arif: wah you have wide angle and zoom one
(04:06:52 PM) (R) kelchai: Tamron RM1500++
(04:07:01 PM) (R) kelchai: 50mm the cheapest
(04:07:03 PM) (R) kelchai: RM370
(04:07:11 PM) (R) kelchai: i got 2 flash gun
(04:08:17 PM) Achmad Arif: wah what flash gun for ?
(04:08:52 PM) Achmad Arif: ![]()
(04:08:57 PM) Achmad Arif: wah need learn a lot
(04:09:09 PM) (R) kelchai: Flash GUn is a magic
(04:09:13 PM) Achmad Arif: ???
(04:09:17 PM) Achmad Arif: what do you mean ?
(04:09:20 PM) (R) kelchai: it make ur photo looks great
(04:09:22 PM) (R) kelchai: kekeke
(04:09:30 PM) Achmad Arif: ???
(04:09:38 PM) (R) kelchai: Flash gun is external flash
(04:09:48 PM) (R) kelchai: we call it speedlight in Nikon
(04:09:56 PM) (R) kelchai: Canon call it SpeedLite
(04:10:35 PM) Achmad Arif: this flash gun
(04:10:43 PM) Achmad Arif: is attached to your camera ?
(04:11:22 PM) Achmad Arif: ahhh i see
(04:11:26 PM) Achmad Arif: external flash
(04:11:28 PM) (R) kelchai: yes
(04:11:46 PM) (R) kelchai: bcoe the internal flash kenot bounce
(04:12:01 PM) (R) kelchai: tat’s why we need ext flash to play with the bounce light
(04:12:50 PM) Achmad Arif: u use flash light or play with shutter speed normally
(04:12:50 PM) Achmad Arif: ?
(04:13:15 PM) (R) kelchai: depends on the lens tat i have n the ambient light
(04:13:37 PM) (R) kelchai: if i dun have f2.8 lens, i will need Speedlight
(04:13:51 PM) (R) kelchai: to help as a fill in light
(04:14:00 PM) (R) kelchai: for indoor event for example
(04:14:10 PM) (R) kelchai: like tis pic
(04:14:11 PM) (R) kelchai: http://flickr.com/photos/kelchai/3173312721/sizes/l/
(04:14:24 PM) (R) kelchai: the flash is bounce off ceiling
(04:14:32 PM) (R) kelchai: to create a natural lighting effect
(04:14:46 PM) (R) kelchai: direct flash is owes too harsh
(04:15:14 PM) Achmad Arif: ywah
(04:15:15 PM) Achmad Arif: wahhh
(04:15:20 PM) Achmad Arif: right
(04:15:26 PM) Achmad Arif: very nice one
(04:15:41 PM) Achmad Arif: direct flash will blackout the background already
(04:16:08 PM) (R) kelchai: direct flash will blown out the face, and got shadow
(04:16:39 PM) Achmad Arif: yeah
(04:16:47 PM) Achmad Arif: so how you set the flash
(04:16:54 PM) Achmad Arif: do you targetit to ceiling
(04:16:56 PM) Achmad Arif: ?
(04:17:07 PM) Achmad Arif: how about outside scenary
(04:17:09 PM) Achmad Arif: i mean
(04:17:13 PM) Achmad Arif: let say outdoor
(04:17:15 PM) Achmad Arif: in evening
(04:17:18 PM) (R) kelchai: normally 45″
(04:17:23 PM) (R) kelchai: or 60″
(04:17:30 PM) (R) kelchai: point to ceiling
(04:17:44 PM) (R) kelchai: outdoor then need diffuser
(04:17:52 PM) Achmad Arif: diffuser ???
(04:17:53 PM) Achmad Arif: what is that
(04:17:54 PM) Achmad Arif: ?
(04:17:56 PM) (R) kelchai: cos ceiling too heigh
(04:18:03 PM) Achmad Arif: yeah
(04:18:06 PM) (R) kelchai: impposible to bounce back
(04:18:09 PM) Achmad Arif: yeah
(04:18:11 PM) Achmad Arif: impossible
(04:18:16 PM) Achmad Arif: so how you do it
(04:18:17 PM) Achmad Arif: /
(04:18:18 PM) Achmad Arif: ?
(04:18:34 PM) (R) kelchai: use diffuser
(04:18:42 PM) (R) kelchai: some sort of reflector
(04:18:51 PM) (R) kelchai: like bring the ceiling down
(04:18:52 PM) (R) kelchai: haha
(04:18:56 PM) Achmad Arif: ahhhh
(04:18:59 PM) Achmad Arif: i see
(04:18:59 PM) (R) kelchai: or use name card
(04:19:06 PM) Achmad Arif: just like the one in the studio
(04:19:10 PM) Achmad Arif: what name card ?
(04:19:20 PM) (R) kelchai: but the effect will not as good as bounce light
(04:19:27 PM) (R) kelchai: bounce light is still the best
(04:19:36 PM) (R) kelchai: any white color card
(04:19:41 PM) Achmad Arif: ??
(04:19:44 PM) Achmad Arif: i dont understand
(04:19:44 PM) (R) kelchai: attach to the speedlight
(04:19:53 PM) Achmad Arif: owhhh
(04:19:55 PM) Achmad Arif: i seee
(04:20:08 PM) (R) kelchai: u will understand once u understand light
(04:20:08 PM) Achmad Arif: tomake the light bounce to the object
(04:20:12 PM) (R) kelchai: tat is slowly man
(04:20:17 PM) Achmad Arif: yeah
(04:20:20 PM) (R) kelchai: it is hard to learn all in one day
(04:20:22 PM) Achmad Arif: i need to learn a lot
(04:20:35 PM) Achmad Arif: i even still need to learn to operate the camera
)
(04:20:37 PM) Achmad Arif: =))
(04:20:48 PM) (R) kelchai: ya
(04:20:53 PM) (R) kelchai: never too late to learn
(04:21:08 PM) Achmad Arif: how long have you been learning this ?
(04:21:08 PM) (R) kelchai: juz need to remember tat
(04:21:12 PM) Achmad Arif: what is that
(04:21:13 PM) Achmad Arif: ?
(04:21:16 PM) (R) kelchai: photography is an expensive hobby
(04:21:18 PM) (R) kelchai: hahaha
(04:21:22 PM) Achmad Arif: yeah =))
(04:21:22 PM) (R) kelchai: no joking
(04:21:43 PM) Achmad Arif: and im started to drown in it
(
(04:21:45 PM) (R) kelchai: u will ended up all ur income will goes to photography equipment
(04:21:54 PM) Achmad Arif:
(
(04:22:03 PM) Achmad Arif: no kiddin
(04:22:05 PM) Achmad Arif: no kidding
(04:22:10 PM) Achmad Arif: just now i bought tripod
(04:22:12 PM) (R) kelchai: the next things u need to buy is speedlight, then f2.8 lens..
(04:22:17 PM) Achmad Arif: wah cost expensive already
(04:22:21 PM) Achmad Arif:
(
(04:22:42 PM) (R) kelchai: how much?
(04:22:53 PM) Achmad Arif: i bought chinese made tripod
(04:22:59 PM) Achmad Arif: cost around 750.000 dong
(04:23:08 PM) Achmad Arif: quite sturdy but not too heavy
(04:23:25 PM) Achmad Arif: i want to take the honkiam lake
(04:23:28 PM) Achmad Arif: evening scene
(04:23:28 PM) (R) kelchai: RM how mcuh?
(04:23:34 PM) Achmad Arif: but my hand is moving
(04:23:36 PM) Achmad Arif: i need tripod
(04:23:44 PM) Achmad Arif: hmmm
(04:24:04 PM) Achmad Arif: 43USD
(04:24:14 PM) Achmad Arif: 147 RM
(04:24:23 PM) (R) kelchai: wow
(04:24:30 PM) (R) kelchai: still ok
(04:24:31 PM) Achmad Arif: cheap
(04:24:32 PM) Achmad Arif: ?
(04:24:35 PM) (R) kelchai: must be solid one
(04:24:36 PM) Achmad Arif: expensive?
(04:24:41 PM) Achmad Arif: quite solid
(04:24:52 PM) Achmad Arif: but not that solid like the other model
(04:24:58 PM) (R) kelchai: reasonable i guess
(04:25:02 PM) Achmad Arif: got very very very sturdy one
(04:25:07 PM) Achmad Arif: around 1.1 million dong
(04:25:11 PM) Achmad Arif: but very very heavy
(04:25:15 PM) (R) kelchai: ya
(04:25:16 PM) Achmad Arif: like 3kg
(04:25:20 PM) (R) kelchai: some more than RM1k
(04:25:25 PM) Achmad Arif: wahhh
(04:25:55 PM) Achmad Arif: too heavy
(04:26:01 PM) Achmad Arif: and difficult to bring it
(04:26:03 PM) (R) kelchai: u can buy the nikon 50mm f1.8
(04:26:05 PM) Achmad Arif: so i dont take it
(04:26:08 PM) (R) kelchai: to learn wat is DOF
(04:26:13 PM) Achmad Arif: what is DOF ?
(04:26:16 PM) Achmad Arif: what is DOF ?
(04:26:21 PM) (R) kelchai: Depth of Field
(04:26:29 PM) Achmad Arif: what is that ?
(04:26:47 PM) (R) kelchai: photography is abt lights, DOF and composition
(04:26:50 PM) Achmad Arif: if the f is larger what does it means actually ?
(04:27:01 PM) (R) kelchai: these 3 things is very important to make a good photos
(04:27:05 PM) Achmad Arif: …
(04:27:19 PM) (R) kelchai: f larger mean aperture larger
(04:27:27 PM) (R) kelchai: mean higher DOF
(04:27:30 PM) Achmad Arif: i see
(04:28:09 PM) Achmad Arif: if apperture larger what is the meaning
(04:28:10 PM) (R) kelchai: e.g if i focus u, u become very sharp, and the background will very blur
(04:28:10 PM) Achmad Arif: ?
(04:28:17 PM) Achmad Arif: yes
(04:28:18 PM) Achmad Arif: correct
(04:28:30 PM) Achmad Arif: i like to do that ![]()
(04:28:33 PM) (R) kelchai: mean the DOF is very Narrow
(04:28:39 PM) Achmad Arif: i see
(04:28:41 PM) (R) kelchai: only one point is sharp
(04:28:45 PM) Achmad Arif: ahhh
(04:28:46 PM) Achmad Arif: i see
(04:28:47 PM) (R) kelchai: the rest all blur
(04:28:50 PM) Achmad Arif: i see
(04:29:06 PM) Achmad Arif: i like to that with my camera
(04:29:09 PM) Achmad Arif: i zoom the model
(04:29:14 PM) Achmad Arif: and focus on that model
(04:29:19 PM) Achmad Arif: hence the background is blur
(04:29:27 PM) (R) kelchai: ya
(04:29:36 PM) Achmad Arif: but i need to zoom it first
(04:29:37 PM) (R) kelchai: DOF can be archieve with 2 way
(04:29:41 PM) (R) kelchai: one if the f
(04:29:51 PM) (R) kelchai: the other one is the Focal Length
(04:29:58 PM) Achmad Arif: i see
(04:30:04 PM) Achmad Arif: the f means ?
(04:30:08 PM) (R) kelchai: the more u zoom, there more narrow DOF oso
(04:30:13 PM) Achmad Arif: i see
(04:30:13 PM) (R) kelchai: f= aperture
(04:30:17 PM) Achmad Arif: i see
(04:30:33 PM) Achmad Arif: what is the relation f and DOF then
(04:31:00 PM) Achmad Arif: you mean if i set dof to lower scale
(04:31:07 PM) Achmad Arif: i can achieve same thing
(04:31:10 PM) (R) kelchai: the bigger the f, the narrow the DOF
(04:31:12 PM) Achmad Arif: like i did
(04:31:14 PM) Achmad Arif: owh …
(04:31:15 PM) Achmad Arif: i seee
(04:31:25 PM) Achmad Arif: i see
(04:31:36 PM) (R) kelchai: but not all condition u can zoom..
(04:31:43 PM) Achmad Arif: …
(04:31:55 PM) (R) kelchai: tat’s why fast lens f2.8 come into play
(04:32:12 PM) Achmad Arif: why you said fast lest is f2.8
(04:32:21 PM) Achmad Arif: is that means the fast lens DOF is high ?
(04:32:40 PM) (R) kelchai: DOF is narrow
(04:32:55 PM) Achmad Arif: …
(04:32:58 PM) Achmad Arif: i see
(04:33:13 PM) Achmad Arif: so back to nikon 50mm f1.8
(04:33:30 PM) Achmad Arif: it sounds for high DOF
(04:33:39 PM) Achmad Arif: but the focal length is very less
(04:33:45 PM) Achmad Arif: its for wide angle is it ?
(04:34:11 PM) (R) kelchai: no
(04:34:15 PM) (R) kelchai: tis is prime lens
(04:34:22 PM) (R) kelchai: meant the FL is fixed
(04:34:26 PM) (R) kelchai: u kenot zoom
(04:34:34 PM) (R) kelchai: u need to zoom with ur leg ![]()
(04:34:45 PM) Achmad Arif: hehehe
(04:34:49 PM) Achmad Arif: ahhh
(04:34:54 PM) Achmad Arif: i dont like that
(04:34:56 PM) Achmad Arif:
)
(04:35:12 PM) Achmad Arif: why you need this kind of lens ?
(04:35:18 PM) (R) kelchai: but the prime lens imange quality is the best
(04:35:22 PM) Achmad Arif: ahhhh
(04:35:33 PM) (R) kelchai: the lens is already fixed
(04:35:45 PM) (R) kelchai: u know the lens is made from a lot of glasses
(04:36:03 PM) (R) kelchai: one lens may be 15 glass elements inside
(04:36:15 PM) (R) kelchai: when u zoom, the glass element will move
(04:36:42 PM) (R) kelchai: the imange quality is depends on the glass element
(04:37:03 PM) (R) kelchai: not every position will get the best image quality out
(04:37:27 PM) Achmad Arif: ahhhh
(04:37:33 PM) Achmad Arif: i did not know that …
(04:37:36 PM) (R) kelchai: prime lens is different, the glass elements if fixed, so u owes get the best photo quality
(04:37:58 PM) Achmad Arif: i see
(04:38:08 PM) Achmad Arif: is it the apperture f1.8 also fixed ?
(04:38:24 PM) (R) kelchai: nope
(04:38:25 PM) Achmad Arif: does it means this prime lens also fix the apperture ?
(04:38:27 PM) Achmad Arif: ahhhh
(04:38:28 PM) Achmad Arif: i see
(04:38:31 PM) (R) kelchai: u can use till f32
(04:38:35 PM) Achmad Arif: i see
(04:39:25 PM) Achmad Arif: how much this lens price
(04:39:48 PM) Achmad Arif: nvm i will find it in lowyat ![]()
(04:39:53 PM) Achmad Arif: wahhh .. my list is growing already
(04:39:57 PM) Achmad Arif:
)
(04:40:06 PM) Achmad Arif: i was planning to buy bag first
(04:40:18 PM) Achmad Arif: and then zoom lens
(04:40:27 PM) Achmad Arif: now lookslike i need this kind of lens also
(04:40:28 PM) (R) kelchai: bag still enuf to use
(04:40:30 PM) (R) kelchai: keke
(04:40:33 PM) Achmad Arif: yeah
(04:40:38 PM) Achmad Arif: but my bag sooooo lauzy
(04:40:41 PM) Achmad Arif: got it free
(04:40:49 PM) Achmad Arif: i think the shop give me second one
(04:40:55 PM) (R) kelchai: the more important is to think of how to improve ur photos
(04:40:59 PM) Achmad Arif: i cannot say anything bec they give it to me free
(04:41:03 PM) Achmad Arif: yeah
(04:41:08 PM) (R) kelchai: buy wat equipment to improve the photos..
(04:41:13 PM) Achmad Arif: i got photomatix already at least
(04:41:26 PM) Achmad Arif: tonite i will start to get some honkiam lake HDR
(04:41:42 PM) Achmad Arif: ![]()
(04:41:54 PM) Achmad Arif: wahhh thanks kelvin
(04:41:59 PM) Achmad Arif: learn a lot
(04:42:04 PM) Achmad Arif: i need this kind of advice
(04:42:19 PM) Achmad Arif: also admire your photos
(04:42:24 PM) Achmad Arif: good quality one
(04:42:28 PM) (R) kelchai: no prob
(04:42:40 PM) (R) kelchai: still learning ![]()
(04:42:50 PM) (R) kelchai: still saving for my dream lenses
(04:42:51 PM) (R) kelchai: kekeke
(04:42:58 PM) Achmad Arif: ![]()
(04:43:20 PM) Achmad Arif: good luck … thanks a lot
(04:43:54 PM) (R) kelchai: u r welcome
(04:44:01 PM) (R) kelchai: have a nice weekend!
Filed under: Dobo
Wahhh, its been a while. I never had a chance to update this blog (never or … errr lazy ?? )
Today, by this day I decide to be more active blog and writing my daily activities. It will be very boring for you well … I hope not. Aniway I don’t have intention to make this blog to be “pulic” consumption. So … don’t bother, … you will not find anything interesting … or maybe useful …. so never-mind … if you were here accidentally please carry on.
If you have been here before, you might notice I have updated my domains “arif.rach.im” coooll name isn’t it ??
. Owh I also update the themes … hmmm. Not yet perfect, still required some “java” touch then after that will be perfect.
Thats all I guess c ya …
Filed under: Java
Believe it or not, Google Guice is 1000% faster than Spring. This google product wins every aspect of performance compare to Spring. From load module/context to resolve binding object, Guice is the absolute winner.I personally benchmark this two popular Dependency Injection framework myself. And I have made some scenario as if the real world application of the both framework work.
In a real world there are framework client that require objects to be injected. Typically these client performing action, receive request from actor and process the request and send the result back to the actor. These client are instance of actions in struts or webwork, or even a servlet. These action does not contains business logic, usually we put some business logic in a facade/service/manager, these facade are the instance that will injected into the client by framework.
Facade instance are managed by the framework, usually the perform logic for ex. “read user by name from access object” and do something with it. That means facade instance required dependency of Data Access Object service. Typically these service could be singleton or even prototype. It depends the architecture we built.
Data Access Objects are another instance that managed by the framework. Typically this object performing actions to access the persistent framework session, or entity manager.
In a real world, the dependency of an objects can be very complex. As your application grows, the need of an object to be able to communicate one and another or switching old object to new object are managed by the DI framework and configurable.
Based on above scenario, I made benchmark of two popular framework Google Guice and Spring.
(MainService)
|_______ServiceOne
|________ServiceFour
|________ServiceFive
|________ServiceSix
|_______ServiceTwo
|________ServiceSeven
|________ServiceEight
|________ServiceNine
|_______ServiceThree
|________ServiceTen
|________ServiceEleven
|________ServiceTwelve
MainService is the Facade, ServiceOne, ServiceTwo, ServiceThree are the manager, and ServiceFour until ServiceTwelve are the DAOs.
Typically as the application grows the dependency hierarchy could be more deeper and complex. But for the sake of benchmark ill keep it simple.
As I have mention before the service can be singleton or prototype. It depends on the architecture, so I will test in both fashion, in Singleton and prototype.
To give more objective on both framework, I will test the framework performance starting from one clients , and continues to 10,100,10000 client calling for request to be binded their dependency by the framework.
And also to make sure that the client is actually get the object that they want, the client will call method in service so the main service will the objects that depends on. This could be a mechanism to validate is the framework works.
The Service
public interface Service {
public void doService();
public Date getCreatedOn();
}
The service contains the information on when the service object is being created and method doService to perform service functionality.
All the implementation class from MainService to ServiceTwelve is implementing Service interface.
The StopWatch
public class StopWatch {
private static final List serviceInstances = new LinkedList();
/**
* @return the serviceInstances
*/
public List getServiceInstances() {
return serviceInstances;
}
public static void recordInstance(Service service){
serviceInstances.add(service);
}
public static void clear(){
serviceInstances.clear();
}
public static long averageInstanceCreationInMs(){
long total = 0;
Date date = null;
for (Service service : serviceInstances) {
if(date == null){
date = service.getCreatedOn();
}else{
total = total + (service.getCreatedOn().getTime() - date.getTime());
}
}
return total/serviceInstances.size();
}
public static int totalInstance() {
return serviceInstances.size();
}
}
The stop watch is an object that will record the service instantiation time, and calculate the lag time between one creation of service object and another. By Counting this service creation time, and average the time, then we will find how much does the framework actually perform to binding object and inject it to the host in millisecond.
The Configuration
I separate configuration into two different files, first is the configuration for dependency that the objects are prototype and the other is singleton.
Guice Module Prototype
public class GuiceModulePrototype extends AbstractModule{
@Override
protected void configure() {
bind(Service.class).annotatedWith(Client.ClientService.class).to(MainService.class);
bind(Service.class).annotatedWith(MainService.ServiceOne.class).to(ServiceOne.class);
bind(Service.class).annotatedWith(MainService.ServiceTwo.class).to(ServiceTwo.class);
bind(Service.class).annotatedWith(MainService.ServiceThree.class).to(ServiceThree.class);
bind(Service.class).annotatedWith(ServiceOne.ServiceFour.class).to(ServiceFour.class);
bind(Service.class).annotatedWith(ServiceOne.ServiceFive.class).to(ServiceFive.class);
bind(Service.class).annotatedWith(ServiceOne.ServiceSix.class).to(ServiceSix.class);
bind(Service.class).annotatedWith(ServiceTwo.ServiceSeven.class).to(ServiceSeven.class);
bind(Service.class).annotatedWith(ServiceTwo.ServiceEight.class).to(ServiceEight.class);
bind(Service.class).annotatedWith(ServiceTwo.ServiceNine.class).to(ServiceNine.class);
bind(Service.class).annotatedWith(ServiceThree.ServiceTen.class).to(ServiceTen.class);
bind(Service.class).annotatedWith(ServiceThree.ServiceEleven.class).to(ServiceEleven.class);
bind(Service.class).annotatedWith(ServiceThree.ServiceTwelve.class).to(ServiceTwelve.class);
}
}
Guice Module Singleton
public class GuiceModuleSingleton extends AbstractModule{
@Override
protected void configure() {
bind(Service.class).annotatedWith(Client.ClientService.class).to(MainService.class).in(Scopes.SINGLETON);
bind(Service.class).annotatedWith(MainService.ServiceOne.class).to(ServiceOne.class).in(Scopes.SINGLETON);
bind(Service.class).annotatedWith(MainService.ServiceTwo.class).to(ServiceTwo.class).in(Scopes.SINGLETON);
bind(Service.class).annotatedWith(MainService.ServiceThree.class).to(ServiceThree.class).in(Scopes.SINGLETON);
bind(Service.class).annotatedWith(ServiceOne.ServiceFour.class).to(ServiceFour.class).in(Scopes.SINGLETON);
bind(Service.class).annotatedWith(ServiceOne.ServiceFive.class).to(ServiceFive.class).in(Scopes.SINGLETON);
bind(Service.class).annotatedWith(ServiceOne.ServiceSix.class).to(ServiceSix.class).in(Scopes.SINGLETON);
bind(Service.class).annotatedWith(ServiceTwo.ServiceSeven.class).to(ServiceSeven.class).in(Scopes.SINGLETON);
bind(Service.class).annotatedWith(ServiceTwo.ServiceEight.class).to(ServiceEight.class).in(Scopes.SINGLETON);
bind(Service.class).annotatedWith(ServiceTwo.ServiceNine.class).to(ServiceNine.class).in(Scopes.SINGLETON);
bind(Service.class).annotatedWith(ServiceThree.ServiceTen.class).to(ServiceTen.class).in(Scopes.SINGLETON);
....
}
}
spring-module-singleton.xml
<beans>
<bean id="mainService" class="guice.comparison.service.MainService" >
<property name="serviceOne">
<ref bean="serviceOne"/>
</property>
<property name="serviceTwo">
<ref bean="serviceTwo"/>
</property>
<property name="serviceThree">
<ref bean="serviceThree"/>
</property>
</bean>
<bean id="serviceOne" class="guice.comparison.service.ServiceOne" >
<property name="serviceFour">
<ref bean="serviceFour"/>
</property>
.....
</beans>
spring-module-prototype.xml
<beans>
<bean id="mainService" class="guice.comparison.service.MainService" singleton="false">
<property name="serviceOne">
<ref bean="serviceOne"/>
</property>
<property name="serviceTwo">
<ref bean="serviceTwo"/>
</property>
<property name="serviceThree">
<ref bean="serviceThree"/>
</property>
</bean>
<bean id="serviceOne" class="guice.comparison.service.ServiceOne" singleton="false">
<property name="serviceFour">
<ref bean="serviceFour"/>
</property>
....
</bean>
spring-module-client.xml
<beans>
<bean name="0" class="guice.comparison.Client" singleton="false">
<property name="service"><ref bean="mainService"/></property>
<property name="name"><value>0</value></property>
</bean>
....
....
</beans>
Above are the configuration for the spring. For Spring we still do need to create a context for clients, because in spring the client it self must be configured so the spring can inject the client dependency object.
To make it dynamic I made a simple class to create an spring xml configuration. That will automatically create xml client of n beans. “can u imagine creating xml configuration of 10000 bean by hand
that can take days to make sure everything is in its place, Imagine you create 10000 actions that depend 13 service that means you configuration actions bloated !!”
The Main
public static void main(String[] args) throws IOException{
boolean singleton = false;
boolean callMethod = true;
int client = 1;
StopWatch.clear();
long loadModule = springClientRequest(client,singleton,callMethod);
System.out.println("Springt "+client+"t"+singleton+"t"+callMethod+"t"+StopWatch.averageInstanceCreationInMs()+"t"+StopWatch.totalInstance()+"t"+loadModule);
StopWatch.clear();
loadModule = guiceClientRequest(client,singleton,callMethod);
System.out.println("Guicet "+client+"t"+singleton+"t"+callMethod+"t"+StopWatch.averageInstanceCreationInMs()+"t"+StopWatch.totalInstance()+"t"+loadModule);
}
The main method will perform to create framework modules and start benchmark.
For spring framework, the client will be pulled from the spring context, as the behavior of spring where the client it self is being managed by the container.
For guice framework, the client will be instantiated and injected into the injector, and then injector bind all the object that client needs.
The result as following
#C number of client S : Service are singleton C : Method doPerfom is called I : Instance created in framework T : Average time of framework binding object into bean in ms M : module/context startup time in ms #C S C I T M spring 1 y y 13 34 601 guice 1 y y 13 0 407 spring 10 y y 13 26 607 guice 10 y y 13 0 393 spring 100 y y 13 28 768 guice 100 y y 13 0 456 spring 1000 y y 13 53 1300 guice 1000 y y 13 0 492 spring 10000 y y 13 35 3910 guice 10000 y y 13 0 417 spring 1 y n 13 20 528 guice 1 y n 13 0 457 spring 10 y n 13 25 530 guice 10 y n 13 0 392 spring 100 y n 13 21 744 guice 100 y n 13 0 537 spring 1000 y n 13 34 1445 guice 1000 y n 13 0 591 spring 10000 y n 13 34 3819 guice 10000 y n 13 0 401 spring 1 n n 13 35 660 guice 1 n n 13 0 419 spring 10 n n 130 88 612 guice 10 n n 130 0 406 spring 100 n n 1300 221 708 guice 100 n n 1300 6 415 spring 1000 n n 13000 877 1243 guice 1000 n n 13000 55 386 spring 10000 n n 130000 3858 3765 guice 10000 n n 130000 202 400 spring 1 n y 13 31 567 guice 1 n y 13 0 393 spring 10 n y 130 67 564 guice 10 n y 130 1 407 spring 100 n y 1300 223 693 guice 100 n y 1300 7 435 spring 1000 n y 13000 957 1259 guice 1000 n y 13000 43 424 spring 10000 n y 130000 2931 3859 guice 10000 n y 130000 208 405
As we can see the average time that both framework perform when injecting the bean to the client, GUICE is far more faster than Spring. In 10000 bean of client that requested to be injected of object which type is Proxy(not singleton), GUICE shows its superior where the performance is 1000% percent faster than Spring !
In Singleton service that will injected into client, GUICE has outstanding performance where almost more than 50 times faster than spring.
The results really remarkable, as we can see, the Spring load time is getting higher as the configuration getting big. In contrary Guice is relatively constant, I set Guice Stage in Production so I was expecting GUICE will perform slower, then I was wrong, GUICE does not have problems with bigger client request.
If we realize this is the benefit of GUICE architecture, GUICE does not manage all the client instance, GUICE only inject what instance that client need.
In the end, GUICE architecture has given remarkable new horizon in the new breed of ultra light weight container.
Filed under: Java
There are several reasons why I prefer not to use SPRING.
1. Spring configuration is bloated.
My team develop enterprise application using Dependency Injection framework. There are more than 1500 classes in that project, and separated to more than 11 modules.To my experience in a real world, “we made service object less then the object who depend on that service”. If we use spring framework when we made 1000 actions who depend in 100 service, it means we have to make configuration on 1000 bean that depend on 100 service. The configuration getting worst if the actions continue growing in numbers, we must very extra carefull when we want to refactor something, we dont want to break existing code. You might start thinkin using autowire by type … no that would be a bad idea. Then … why not using autowire by name, … that sound silly what if we have different name in configuration for different object, well i guess thats gonna be another long nite at the office.
2. Putting configuration into XML is painful.
XML configuration is painful, the context painful is not something concerning how top coder you are, but more on maintenance. If you have 1000 actions then you got to be very aware what and where the configuration taken place in XML, you should have an eagle eye, you must not forget to use tools feature find and replace to change the xml configuration. Otherwise the application will blowup when going on production.
3. You loose Java Strong Type Checking if using XML configuration
When you start using XML configuration, you will loose the power of java. When you lucky the object that you inject into the bean is not what the bean wanted. You have to wait until Spring Start Running and start checking the dependency, at that time you realize you made a silly mistake. Ouchh ….
Some Configuration not using XML but in Java class, in GUICE you use module, If we want flexibility, we still can achieved by separate the business logic jar into another archive, and in the core jar we just put Class.forname(”the module class”). Thats all
4. Spring is not light weight container.
Unfortunately spring is not light weight anymore. Today Spring performance is not the fastest anymore, there are more lightweight container exist out there where the performance is better.
5. Spring is a Container that promise us to build loosely coupled application.
Spring is a container that just promise us to build loosely coupled technology, spring does not really concern that much about tightly coupled. I’m very sure that once we use spring lib other than spring-core.jar that means our application cannot live without spring.
Filed under: Java
I was invited by Java User Group Indonesia as a speaker in regular monthly meeting held at Sun Microsystems Indonesia on June 30th 07. This time topic is GUICE. In contrary, two years ago at the same place, I speak about SPRING framework. At that time not much people are aware about spring, today the spring community in Indonesia is growing wide and here we go again, I’m standing against the main stream.
I made some example using GUICE to create web blog application using Struts 2 – Guice – JPA hibernate. To my Experience GUICE is very simple and learning curve is not as much as spring. Nothing can compare the beauty of Module and binder in GUICE, not even the Spring Java Config can do that.
The Presentation covered from simple hello world to advance GUICE such as provider, scope – “how to create custom scope” , aspect using AOP Alliance and create declarative transaction using aspect.
I made some example how we can externalize module into properties or xml, however this is not good, since we will loose the power of strong type checking in JAVA.
I recommend friends how to modularize the GUICE module, we can seperate GUICE module into different JAR, and by using Class.forname we can have the module runnin right away. We treat the module as plugins.
So …. go a head , have some GUICE.!!