Time |
S |
Nick |
Message |
00:19 |
|
pdurbin |
whartung: I'd be happy to hear you elaborate on "my mistake earlier was conflating the servlet async capability with what node.js does, and it's not the same at all" |
00:20 |
|
whartung |
node.js is a single threaded server. |
00:20 |
|
pdurbin |
yep |
00:20 |
|
whartung |
so, pretty much EVERYTHING has to be non-blocking. |
00:20 |
|
pdurbin |
right |
00:20 |
|
whartung |
a servlet container, however, is not. |
00:20 |
|
whartung |
it's multi threaded |
00:21 |
|
whartung |
and remains multi-threaded even if you leverage the async support |
00:21 |
|
whartung |
the async support is handled internally by the NIO based frameworks in the containers |
00:21 |
|
whartung |
but it's still multi-threaded |
00:21 |
|
whartung |
so my question |
00:21 |
|
whartung |
was within a process servicing an async context |
00:21 |
|
whartung |
notably where it's just streaming results down the socket |
00:22 |
|
whartung |
how did this not block? |
00:22 |
|
whartung |
and the answer is… it DOES block |
00:22 |
|
whartung |
an async sservlet is not under the same constraints as something in node. |
00:22 |
|
whartung |
I have not used node |
00:23 |
|
whartung |
but if you want to send anything down the socket, you will hand off what you want to send to the container, and IT will send it down the socket for you, with a call back when it's done. |
00:23 |
|
whartung |
so, in a servlet |
00:23 |
|
whartung |
you'd do: for(String line: lines) { out.println(line); } |
00:24 |
|
whartung |
in node, you'd either send the entire payload all at once (i.e. [in java] StringWriter sw = …; for(String line : lines) { sw.println(line); } sendToSocket(sw.toString()); |
00:25 |
|
whartung |
something like that |
00:25 |
|
whartung |
so, that means that an async jee server is "not quite" as efficient as node, but at the same time, it's not as tyrannical as node is. |
00:26 |
|
whartung |
in terms of mandating programming gmodel |
00:26 |
|
whartung |
in the end, you will need a number of threads that you wish to SERVICE at once time (i.e. send output + processing), but not necessarily as many threads as you want to ACCEPT requests from. |
00:27 |
|
whartung |
so you can use far fewer threads in the server for a similar workload by using a little bit of async and lightweight message passing in your application using the jEE model |
00:28 |
|
pdurbin |
sounds like a nice feature, generally. async in java ee |
00:29 |
|
whartung |
well I though about how to do this long ago, notably , how do you convert a nominally sync request in to async system. |
00:29 |
|
whartung |
and the trick was to store a monitor in to a queue, send off the request (from the servlet), then Object.wait() on the monitor. |
00:30 |
|
whartung |
in the back ground something else would do processing via JMS queues or whatever, and then when done, and it all returned to the servlet container |
00:30 |
|
whartung |
it would Object.notify() the monitor, thus freeing the servlet to move on |
00:30 |
|
whartung |
this makes that easier to do, and unbinds the request form the thread |
00:30 |
|
whartung |
so, it's certainly much more versatile. |
00:30 |
|
whartung |
and I must be off, follow up tomorrow, we can talk about it some more. |
00:30 |
|
pdurbin |
o/ |
00:31 |
|
* pdurbin |
checks out the article whartung linked to earlier: https://plumbr.eu/blog/how-to-use-asynchronous-servlets-to-improve-performance |
00:31 |
|
|
huhlig_ joined ##javaee |
00:32 |
|
|
QshelTier joined ##javaee |
00:35 |
|
|
acuzio joined ##javaee |
00:44 |
|
pdurbin |
very nice article. I should try this out |
01:42 |
|
|
drspockbr joined ##javaee |
02:33 |
|
|
gandalfpimp joined ##javaee |
04:26 |
|
|
cem__ joined ##javaee |
04:26 |
|
cem__ |
recurssively failing on integrating bootstrap with jsf |
06:41 |
|
|
Mahi_ joined ##javaee |
06:48 |
|
|
Mahi_ left ##javaee |
07:19 |
|
|
AlexCzar joined ##javaee |
08:13 |
|
|
fabioportieri joined ##javaee |
08:17 |
|
|
AlexCzar joined ##javaee |
08:28 |
|
fabioportieri |
o/ |
08:35 |
|
|
ramsrib joined ##javaee |
09:16 |
|
AlexCzar |
hi! |
09:17 |
|
AlexCzar |
I've just installed jrebel 5.5.1 in IDEA, strange thing, it works, but there is a shitload of messages in the log saying that reloading failed. I'm testing it on a spring webapp in tomcat |
09:19 |
|
AlexCzar |
says "Probable cause: Remoting is not turned on in the server." And still works :) Any ideas? |
11:36 |
|
|
sajjadg joined ##javaee |
12:07 |
|
cem__ |
hi sajjadg |
12:10 |
|
pdurbin |
cem__: for a bit we used http://repository.primefaces.org/org/primefaces/themes/bootstrap/ but we switched to native bootstrap |
12:13 |
|
cem__ |
i feel hibernate quite interesting compared to spring |
12:14 |
|
cem__ |
Y |
12:14 |
|
cem__ |
both are frameworks :?/ |
12:15 |
|
cem__ |
pdurbin: using bootstrap+primeface |
12:16 |
|
sajjadg |
cem__, both are framework but they are different frameworks doing different things |
12:16 |
|
|
sajjadg joined ##javaee |
12:17 |
|
sajjadg |
cem__, Hi. sorry I got Disconnected |
12:17 |
|
cem__ |
Hibernate : Is making almost all as bidirectional Entity in hibernate is it good ? |
12:17 |
|
cem__ |
k sajjadg |
12:17 |
|
sajjadg |
anyone told you about hibernate and spring? |
12:17 |
|
sajjadg |
they are different. and they are not alternatives. |
12:17 |
|
cem__ |
sajjadg: using both |
12:18 |
|
sajjadg |
good. |
12:18 |
|
sajjadg |
you can compare spring to ejb and hibernate to eclipselink |
12:20 |
|
cem__ |
it will take lot of time to learn these frameworks :) |
12:20 |
|
cem__ |
lot of frameworks and lot of tools :/ |
12:21 |
|
sajjadg |
yeah. you'll waste large amount of time learning those |
12:22 |
|
sajjadg |
and sometimes in this way you may think about going for another easier and cooler language/framework like python/django and ruby on rails |
12:23 |
|
sajjadg |
those morons in schools/university taught us Pascal then C/C++ and we then went for Java |
12:23 |
|
sajjadg |
but I wish I learned Python at first |
12:23 |
|
sajjadg |
I suffered a lot for learning Java... |
12:24 |
|
pdurbin |
sajjadg: life is still suffering |
12:24 |
|
cem__ |
some of my friends learnt java and started bidding prj on java in freelance < they only know java> |
12:24 |
|
sajjadg |
maybe knowing/having python in your mind could be better ... |
12:24 |
|
sajjadg |
pdurbin, Java makes it worse :P |
12:24 |
|
cem__ |
i know js |
12:24 |
|
cem__ |
:) |
12:24 |
|
pdurbin |
heh |
12:25 |
|
pdurbin |
i guess. i was doing some refactoring yesterday and thinking that java is kinda nice :) |
12:25 |
|
sajjadg |
I was just searching about easiest and hardest language (human langs) :) |
12:25 |
|
cem__ |
i dont have time to learn haskell :'( |
12:25 |
|
sajjadg |
pdurbin, it's my favorite ;) but I hate it too :P |
12:25 |
|
sajjadg |
http://voxy.com/blog/index.php/wide-infographics/what-are-the-hardest-languages-to-learn-infographic/?post=3322 |
12:26 |
|
sajjadg |
check that inforgraphic |
12:26 |
|
cem__ |
sajjadg: doing binary search in brain fuck |
12:26 |
|
sajjadg |
it's cool :P we should've something like that for computer languages |
12:26 |
|
sajjadg |
cem__, what??!! |
12:26 |
|
cem__ |
http://en.wikipedia.org/wiki/Brainfuck |
12:27 |
|
cem__ |
1 of the fav language |
12:28 |
|
cem__ |
there is no clients for this language in freelance <expected> :D |
12:29 |
|
sajjadg |
one of the worse way of designing an interface: worse |
12:29 |
|
sajjadg |
^ http://wiki.answers.com/Q/What_is_the_hardest_language_to_learn?#slide=16 |
12:46 |
|
|
drspockbr joined ##javaee |
13:11 |
|
cem__ |
i'm leaving |
13:11 |
|
cem__ |
:/ bye all |
13:13 |
|
tjsnell |
jews not welcome here anyway |
13:13 |
|
tjsnell |
damn, I though you were ron |
13:13 |
|
tjsnell |
haha |
13:13 |
|
tjsnell |
same color |
13:13 |
|
tjsnell |
that's a joke with Ron (who is jewish) and knows I'm being silly |
13:14 |
|
tjsnell |
though Ilhami would agree and not be joking |
13:15 |
|
sajjadg |
tjsnell, why? what's wromg with jews? |
13:16 |
|
sajjadg |
Ron is Jewish...ok i got it |
13:17 |
|
pdurbin |
tjsnell: but ron isn't here. and it's not very funny |
13:31 |
|
|
Naros joined ##javaee |
13:33 |
|
fabioportieri |
argh.. fuck ie |
13:34 |
|
sajjadg |
yeah fuck it |
13:36 |
|
tjsnell |
pdurbin: as I said, I got the channel wrong |
13:37 |
|
tjsnell |
and ron would've thought it was funny and that's all it was intended for |
13:37 |
|
tjsnell |
so I felt bad that here it's be misunderstood :) |
13:42 |
|
tjsnell |
s/it's/it'd/ |
14:43 |
|
|
fabioportieri_ joined ##javaee |
15:02 |
|
|
AlexCzar joined ##javaee |
15:07 |
|
|
aspire joined ##javaee |
15:25 |
|
|
rektide joined ##javaee |
15:54 |
|
|
unix-markow joined ##javaee |
15:55 |
|
|
unix-markow left ##javaee |
16:16 |
|
semiosis |
tjsnell: what the hell is wrong with you? |
16:17 |
|
semiosis |
send a PM if you want to joke with "Ron" and keep your off color jokes out of public channels |
16:28 |
|
whartung |
anyone done much with encryption? |
16:29 |
|
tjsnell |
semiosis: grow up |
16:29 |
|
tjsnell |
that wasn't off color |
16:30 |
|
tjsnell |
and I apologized |
16:35 |
|
semiosis |
you half heartedly apologized for people not getting it, not for saying something hurtful & exclusionary. doesnt matter who might or might not find it funny. |
16:35 |
|
tjsnell |
I really don't care |
16:35 |
|
semiosis |
whartung: plenty. don't ask to ask, just ask |
16:35 |
|
|
cem joined ##javaee |
16:35 |
|
tjsnell |
and you can shove you PC crap up your tight ass |
16:36 |
|
whartung |
how do you deal with keys that are shorter than what are required by the algorithms? |
16:37 |
|
acuzio |
ooh a real question |
16:37 |
|
whartung |
3DES requires a 24 byte key and an 8 byte Initialization Vector, while AES needs a 128 or 256 bit key. |
16:37 |
|
tjsnell |
s/needs/requires/ |
16:37 |
|
whartung |
but if that "password" is "too short", what's best practice here? |
16:38 |
|
semiosis |
whartung: simple solution would be to use a hash function, which always gives a constant lenght output for all inputs |
16:38 |
|
semiosis |
whartung: there's probably more sophisticated solutions in the literature |
16:38 |
|
whartung |
or, use a key generator from the password (which is effectively the same thing, but think they use different techniques) |
16:39 |
|
acuzio |
whartung: The hash technique is pretty standard |
16:39 |
|
whartung |
I was considering using the password as a random seed and populating the rest of the key with random bytes, but I was just curious if that was just false hope. |
16:39 |
|
whartung |
I'll look in to hashing |
16:40 |
|
whartung |
thx |
16:41 |
|
acuzio |
FWIW , Skiena's book mentions hashing as "the" solution for a similar problem |
16:41 |
|
semiosis |
whartung: see also HMAC, which is a keyed-hash. you use a constant secret and the provided input to get a hash value. this should make the resulting hash secure against rainbow table attacks (reverse lookups) which would be important if you're saving the values in a DB |
16:42 |
|
whartung |
yea, we do that normally |
16:43 |
|
whartung |
have you used any of those hardware key store things? |
16:43 |
|
semiosis |
nope |
16:43 |
|
tjsnell |
only to access corporate vpns |
16:43 |
|
tjsnell |
never coded to one |
16:43 |
|
|
sajjadg joined ##javaee |
16:50 |
|
whartung |
java has this already, PBEKeySpec, PBKDF2 |
17:06 |
|
|
raival joined ##javaee |
17:31 |
|
|
sajjadg joined ##javaee |
17:36 |
|
|
idasilva joined ##javaee |
17:36 |
|
|
idasilva left ##javaee |
17:55 |
|
|
AlexCzar joined ##javaee |
17:56 |
|
|
aspire joined ##javaee |
17:57 |
|
|
sajjadg joined ##javaee |
18:19 |
|
|
sajjadg joined ##javaee |
18:22 |
|
|
whiteracoon joined ##javaee |
18:38 |
|
|
sajjadg joined ##javaee |
18:41 |
|
|
waschmittel joined ##javaee |
18:56 |
|
|
sajjadg joined ##javaee |
19:02 |
|
|
aspire_ joined ##javaee |
19:04 |
|
|
balo left ##javaee |
19:08 |
|
|
arkadi joined ##javaee |
19:19 |
|
|
aspire joined ##javaee |
19:27 |
|
|
ramsrib joined ##javaee |
20:04 |
|
|
bvn13 joined ##javaee |
20:05 |
|
bvn13 |
hi! |
20:09 |
|
bvn13 |
Is there the other ways to get current focused system window, than http://docs.oracle.com/javase/7/docs/api/java/awt/KeyboardFocusManager.html#getGlobalFocusedWindow%28%29 ? |
20:26 |
|
|
Voyage joined ##javaee |
20:26 |
|
Voyage |
searched a lot but cant find the jar that contains org.jboss.proxy.ejb.SecurityContextInterceptor. Any one has and ideas? |
20:27 |
|
bvn13 |
http://grepcode.com/file/repo1.maven.org/maven2/org.jboss.jbossas/jboss-as-server/5.0.0.GA/org/jboss/proxy/ejb/SecurityContextInterceptor.java - ? |
20:28 |
|
Voyage |
bvn13, yes i guess but I need a complete jar |
20:29 |
|
bvn13 |
maybe http://www.java2s.com/Code/Jar/j/Downloadjbossjar.htm ? |
20:29 |
|
bvn13 |
Voyage, I saw there Download button |
20:30 |
|
Voyage |
ya but thats a .java file only. I need a .jar that contains it and others dependancies for it. then I can include the jar in my libs |
20:31 |
|
bvn13 |
is it here? http://grepcode.com/snapshot/repo1.maven.org/maven2/org.jboss.jbossas/jboss-as-server/5.0.0.GA/ |
20:31 |
|
bvn13 |
a lot of jars |
20:33 |
|
Voyage |
no i gues |
20:52 |
|
|
neuro_sys joined ##javaee |
20:52 |
|
|
neuro_sys joined ##javaee |
21:48 |
|
|
koperix joined ##javaee |
22:03 |
|
|
AndroidLoverInSF joined ##javaee |
22:51 |
|
|
sajjadg joined ##javaee |
23:35 |
|
|
SEx2 joined ##javaee |
23:36 |
|
|
aspire_ joined ##javaee |