greptilian logo

IRC log for #javaee, 2014-02-02

Please see http://irclog.greptilian.com/javaee for which days have been logged.

| Channels | #javaee index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

All times shown according to UTC.

Time S Nick Message
00:14 pdurbin Voyage: I'm pretty sure you can mix and match
00:17 Voyage k
00:17 Voyage whats recomended. which one goes on top'
00:38 pdurbin Voyage: maybe look at all the ingredients for TomEE: http://tomee.apache.org/apache-tomee.html
00:41 pdurbin Voyage: or maybe, if you really liked, say, Spring Security, you could use that, even though it's not part of Java EE (I don't think). I'm not sure how much of Spring you need to bring in to use it
00:42 pdurbin it's probably easier to answer what's on the bottom, such as Servlet
00:55 NationalCoder joined ##javaee
00:59 Voyage pdurbin,  thanks
01:07 NationalCoder joined ##javaee
01:08 sajjadg EJB and spring? I don't think so! JPA, spring security, JAX-RS and lots of other parts of those frameworks can work separately in any stack. but mixing two technology that some kind overwrite each other! like JPA and Hibernate both at the same time, seems impossible.
01:09 sajjadg Voyage, pdurbin ^
01:12 Voyage sajjadg,  sorry, I understood that hibernate factory cant work with JPA entity Manager but what did  you meant by "EJB and Psring" and rest
01:13 sajjadg Voyage: I say we can't use two implementation of a JSR at the same time.
01:14 Voyage Can I use spring on the top of a JavaEE application that has all features e.g EJBs, JPA, or viceversa as make JavaEE on top of spring ?
01:14 Voyage and if so, which approach is better
01:14 sajjadg http://en.wikipedia.org/wiki/Java_Community_Process
01:14 Voyage e.g spring based app that uses EJBs unerneed by using javaee
01:14 Voyage possible?
01:15 sajjadg Voyage: why do you want to do that?
01:15 Voyage well, just RNDing
01:16 sajjadg Voyage: spring is a full Java EE stack and it's nothing but some building blocks which most of them are implementation of JSRs
01:18 Voyage I though when you make web apps, you use JEE. no matter what is used. mare servlets, spring, stuts or any other framework
01:18 sajjadg spring has lots of feature but you should see if you need them or not. you can mix the building blocks to build your own stack. but having two things that overwrite each other is not possible or not logical!
01:18 Voyage hm
01:19 Voyage was i correct about the last line?
01:19 sajjadg http://en.wikipedia.org/wiki/Java_ee
01:20 sajjadg in that ^ wiki link, list of all java EE api is available. each of them have multiple implementation. and by using them you are using Java EE
01:22 sajjadg spring implements all of them. and you have other Java EE implementations like glassfish, redhat jboss (wildfly) etc. they are all full Java EE stack.
01:22 sajjadg you can just use small part of the full stack
01:22 sajjadg most people don't need all of those features
01:23 sajjadg see what's good for your project
01:23 sajjadg and have fun ;)
01:23 sajjadg https://www.youtube.com/watch?v=4f2Zky_YyyQ
01:23 Voyage thx
01:23 sajjadg and remember that world is going SaaS way ;)
01:24 Voyage spring dont implement EJBs
01:24 sajjadg so go with JAX-RS (backend) + AngularJS (frontend)   <--REST
01:24 Voyage hm
01:25 Voyage sajjadg,  what technologies can be my options if I want to make a stackoverflow.com replica for example.     I have chosen hibernate with JPA implimentation and postgresql as a start
01:27 sajjadg Voyage: very good. PG is way better than mysql. and between hibernate and eclipselink, benchmark say that eclipselink has better performance with PG. and I fing eclipselink to be nicer to work with.
01:27 Voyage sajjadg,  and I have heard that some people dont just use spring because old code might be very obsolete as compared to JEE old code. + lots of configuration of spring
01:27 sajjadg Voyage: that's somehow true. but both of them work for a long, long, long, time. so don't be afraid of that.
01:28 Voyage sajjadg,  you have worked with both JEE and spring?
01:29 sajjadg Voyage: kinda yeah.
01:29 sajjadg Voyage: http://www.jpab.org/PostgreSQL.html
01:29 sajjadg that ^ site is cool. I like it :-)
01:31 Voyage sajjadg,  ok. what about page redirection in JEE. like in struts we retrn success/failure.    in spring we return the /view/jspName     and avoid request.getDispatcher etc .  2. in spring security, it manages sessions for use once the user is logged in. no session.setAttribut (loggedin, true)  .     What does JEE give us?
01:32 sajjadg Voyage: http://www.jpab.org/All/All/All.html the only situation that hibernate is better than eclipselink is with mysql :-) in all other test eclipselink is better
01:32 Voyage jm
01:32 Voyage hm
01:34 sajjadg Voyage: I haven't worked with jsp and spring security. I use angularJS which has route. and apache shiro which is too easy and fun to work with. so much easier than spring security and JAAS
01:35 sajjadg personally I don't like spring! you don't get + comments about spring from me ;)
01:37 Voyage sajjadg,  ok, how to do you 1. redirect to .jsp / view pages and 2. manage user sessions in PURE JEE?
01:38 sajjadg don't know
01:38 Voyage k
01:38 Voyage so what technologies have you used for web services?
01:41 sajjadg JAX-RS
01:42 sajjadg for the last project I have to create some simple read only (GET) services that read from XML files at startup! so it was so easy.
01:42 Voyage sajjadg,  what did you used with JaxRS? any other framework
01:43 sajjadg but eclipselink comes after sometimes. and CDI after that and maybe apache shiro
01:43 Voyage no view technology?
01:43 Voyage jsp?
01:43 sajjadg Voyage: jersey is the reference impl. but there's resteasy and others too
01:44 Voyage I have heard praise for jersey though
01:44 Voyage so, no jsps?
01:45 sajjadg Voyage: think SaaS brother ;) the views are everywhere :) I'm working on AngularJS for web view and after that I will go and create an android app as a view too
01:45 Voyage sajjadg,  ya. software as service with REST?
01:45 Voyage but I am making a website.
01:46 sajjadg Voyage: of course. SOA -> SaaS -> REST
01:46 sajjadg I'm making a website too. that's the beauty of it. you create a service and use it everywhere. website, mobile, etc.
01:47 Voyage sajjadg,  idea: why not just make ONE view. that is website and use embedded object browser for android/IOS/blackberry to show the same page.
01:47 MasterProgram joined ##javaee
01:48 sajjadg Voyage: very good question brother. that's what I'm hardly looking for an answer to. and I'm watching this https://www.youtube.com/watch?v=4f2Zky_YyyQ
01:48 Voyage sajjadg,  any thoughts? as I am thinking of it too, for my app
01:48 Voyage sajjadg,  it is possible
01:48 sajjadg there's a debate between android and chrome team in google i/o 2013
01:49 sajjadg html5 is awesome. but it has its downsides. but embedding web inside native app is the way to do it.
01:49 Voyage sajjadg,  well you would load your webpage (which includes your javascript scripts) with a simple WebViewClient and add a JavaScriptInterface to it, which contains all the methods you want to expose to your JavaScript code
01:50 sajjadg Voyage: if you don't need any extra feature for your website, (most people don't) then you should  go for html5
01:50 Voyage I was also thinking: why make 5 UIs for all mobile platforms. why not just embed one site in all?
01:51 Voyage sajjadg,  jQuery , css3 and html 5 can make you embedded mobile app , better that any mobile app if you are up to it
01:51 Voyage thats what i think.
01:51 sajjadg Voyage: all of them have browsers right? so just make a responsive web app :-)
01:51 Voyage and it would be same too
01:51 Voyage look at phonegap.com too
01:52 sajjadg Voyage: lots of solutions out there. even JavaFx is an option!
01:53 Voyage wait
01:53 sajjadg but HTML5 is very promising
01:53 Voyage JavaFX?
01:53 Voyage thats a PC running thing
01:53 Voyage it cant run on mobiles
01:53 Voyage sajjadg,  html5 or xhtml 1 transitional
01:54 Voyage sajjadg,  I would go with embedded browser app and just use natives for alerts and notifications on mobiles
01:55 NationalCoder joined ##javaee
01:55 Voyage sajjadg,  what do you think?
01:55 NationalCoder Test
01:56 Voyage NationalCoder,  use ##javaee-testing
01:57 Voyage sajjadg,  need to go
01:58 NationalCoder Oh I was just testing to see what nickname was being used for this connection. Sorry Voyage.
01:58 Voyage np
02:04 sajjadg NationalCoder: cool name ;)
02:05 NationalCoder Thanks, sajjadg
04:56 Guest15018 joined ##javaee
05:46 kotten_ joined ##javaee
06:39 Guest15018 my name is not converted to cem :(
06:58 ramsrib joined ##javaee
07:50 Voyage joined ##javaee
08:57 AlexCzar joined ##javaee
09:08 AlexCzar joined ##javaee
09:48 Voyage joined ##javaee
09:51 AlexCzar hi! I have two application, one is spring-mvc + freemarker, second is spring-mvc based JSON API application, I want to have user authenticated in both apps when he authenticates against the first one. Is there an easy way to to this with spring-security?
09:52 AlexCzar s/way to to/way to do/
10:00 Guest15018 i'm learning spring :/ sorry
10:31 SEx2 joined ##javaee
10:44 TinkerTyper|away joined ##javaee
10:47 AlexCzar joined ##javaee
10:47 kotten_ joined ##javaee
11:08 sajjadg joined ##javaee
11:10 sajjadg pdurbin: nice talk about the end of internet.
11:15 sajjadg centralized architecture is evil. distributed networking is awesome. we should pay the price and fight for that
11:24 Guest15018 lol sajjadg
11:25 Guest15018 whats the big deal
11:25 sajjadg pdurbin: can you share the link here?
11:27 Guest15018 ppl use to belive earth was flat later some xyz person discovered and said it was round so its no big deal :/
11:28 Guest15018 later ppl started get into arguments :/
13:51 pdurbin AlexCzar: how similar is this to your situation? http://stackoverflow.com/questions/21321825/shared-authentication-for-website-and-restful-api
13:53 AlexCzar pdurbin, it is very similar
13:54 AlexCzar the only viable solution would be the 'token' based one
13:55 AlexCzar that is the third option mentioned by Thor84no
13:57 neuro_sys joined ##javaee
13:57 neuro_sys joined ##javaee
13:58 AlexCzar Although I don't quite grasp it. I need the following flow: client is on login page (app1) → client authenticates via login/password (or openid, or facebook, etc). → app1 returns a web page which contains JS client for app2, all calls to app2 have to be authenticated against the user logged in to app1.
14:00 AlexCzar so, let's say I authenticated client against app1, do I return token via the model rendered by freemarker (in some hidden input maybe) on each page?
14:01 AlexCzar Thor84no writes "Create an authentication system on the REST API that authenticates a request with a username/password authorization and returns a token that is valid for a limited time." which is somewhat opposite of what I want to do.
14:03 AlexCzar Also this approach creates problems with logout and expiration, if the client used 'remember-me' option at app1, I won't expire his session, so I can't use short-lived token for app2
14:04 AlexCzar and long-lived token will introduce security problems, won't it?
14:17 acuzio joined ##javaee
14:49 pdurbin AlexCzar: do you want app1 and app2 to both have the same security mechanism (e.g. username/password)? or do you want app2 to only use tokens or something?
14:50 AlexCzar pdurbin, app2 should use token within authorization header, I think, because user/password and other mechanisms are handled via app1.
14:51 AlexCzar I've even started to read about openid and oauth, but I do not have much time left to provide a working prototyped
14:51 AlexCzar s/s$//
14:52 pdurbin I'm not sure I'd waste my time with openid... oauth seems way more popular
14:52 AlexCzar pdurbin, there's also openid connect which is openid 2.0 nicely integrated with oauth 2.0
14:52 AlexCzar it is not final yet, though
14:54 pdurbin ah, ok
14:54 pdurbin my users want shibboleth/saml, which has been difficult for me to implement (some progress, still a long way to go)
14:55 AlexCzar another problem which is in the mix, I can't keep session in memory (HttpSession), spring provides some kind of 'stateless' authentication, but I haven't dived in yet
14:56 AlexCzar this is because system architecture relies on horizontal scaling by adding more servers with app1 and more servers with app2 whenever throughput becomes an issue, so I either need something stateless or shared state, latter being a nightmare
15:03 pdurbin AlexCzar: you might try asking in #rest as well. whartung and I hang out there
15:04 pdurbin maybe there should be a ##sso channel
15:05 AlexCzar pdurbin, the rest part is actually the easy one, there is an authorization header and spring can authenticate against it
15:06 AlexCzar token handling is the tricky part
15:06 pdurbin gotcha
15:08 pdurbin shibboleth has a way of operating with mostly headers. it seemed less secure to me somehow or something so I haven't given it a hard look. and it requires running a shibboleth daemon on the side and proxying my app through it. I should probably look at this some more
15:09 pdurbin "Alternatively, data can be passed via HTTP request headers (by means of using ShibUseHeaders On) but this is considered less secure" -- https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPJavaInstall
15:10 pdurbin honestly, at this point, I just want something that works... that I can demo at least
15:10 pdurbin AlexCzar: when is your prototype due?
15:10 pdurbin balo: you're into all this auth stuff. openam and whatnot
15:11 AlexCzar pdurbin, tomorrow, maybe I can delay until tuesday
15:11 pdurbin AlexCzar: good luck. I wish I could help more but I'm still trying to figure it out myself :/
15:11 AlexCzar pdurbin, thanks :) good luck to you, too
15:12 pdurbin AlexCzar: thanks. I'm currently taking a break from shibboleth/saml but it's sure to become a priority again within a few months
15:14 AlexCzar pdurbin, months <3 my employer somehow thinks that a 3man team can create a startup within couple of months and from the beginning it will be state of the art platform with infinite horizontal scaling, open api and whatnot
15:14 * balo is here
15:39 pdurbin AlexCzar: it is ever thus :)
15:42 pdurbin AlexCzar: I'm reminded of my friend who founded a startup and keeps saying, "I don't understand why these programmers are so slow" :)
15:55 AlexCzar :)
15:58 AlexCzar I've just encountered this bit: http://docs.spring.io/spring-security/site/docs/3.2.0.RELEASE/reference/htmlsingle/#csrf-login
15:58 AlexCzar basically it says - no sessions = no csrf protection
15:59 AlexCzar Quote: "Practically speaking, the CSRF token is quite small in size and should have a negligible impact on our architecture."
15:59 AlexCzar Well nobody minds a small token, but this introduces shared/sticky sessions (read: pain)
16:01 AlexCzar sounds like I'll have to implement session sharing :( one of the "easier" methods I've found is migrate from tomcat to jetty and add jetty-pluggable-session-manager which supports mongodb out of the box for storing sessions and also has support for other mechanisms, like memcached and redis
16:01 AlexCzar which is a nice bonus for the future
16:12 pdurbin AlexCzar: do you have something in front on tomcat, such as apache httpd?
16:13 AlexCzar yes, nginx
16:14 pdurbin ok. our users hit glassfish directly. maybe we should change that
16:14 pdurbin well, technically there's a load balancer. but I mean that glassfish runs on ports 80 and 443
16:15 AlexCzar pdurbin, we use nginx as load balancer and caching reverse-proxy
16:15 Voyage joined ##javaee
16:15 AlexCzar with future plans to add dns round-robin and have several nginx-based balancers
16:16 AlexCzar although nginx is a bit arbitrary, maybe in the future we'll move to some alternative, that depends on how the system will behave during betatesting
16:18 pdurbin we used to use a Coyote Point load balancer, which I liked a lot. I don't know much about the current solution but I'm pretty sure it's hardware and it seems to work fine.
16:19 AlexCzar pdurbin, we on the other hand are deploying to the cloud (currently AWS) so hardware is not an option.
16:19 pdurbin balo: you're here but do you have any tips for AlexCzar? :)
16:20 AlexCzar :)
16:20 pdurbin AlexCzar: ah sure. well, AWS has a ton of features. just ask semiosis
16:20 AlexCzar pdurbin, our sysadmin is dealing with that part, fortunately :D
16:21 pdurbin thank god for sysadmins :)
16:21 AlexCzar yep :)
16:21 pdurbin I'm starting to introduce Solr into our mix and I have no idea how to scale it...
16:21 pdurbin works fine as a single instance on my laptop :)
16:22 balo i'm not familiar with spring :/
16:22 pdurbin well, except when I try to index a ton of data at once :(
16:22 balo but if you have questions about shibboleth or openam or sso basically maybe i can answer. but not sure ofc :P
16:23 pdurbin balo: should we start a channel called ##sso or something?
16:23 AlexCzar balo, thanks, good to know :)
16:24 AlexCzar pdurbin, solr is on our todo-list as well :) there is still couple of months until it becomes my headache :)
16:24 balo pdurbin: I'm not sure it's necessary. we can discuss the general things here or maybe in #openam. or #shibboleth (if it exists:)
16:25 pdurbin balo: it's ##shibboleth with 2 ## (I started it) but I'm the only one there most days: http://shibboleth.net/pipermail/users/2013-February/008097.html
16:25 balo i say we should contain informations less fragmented
16:25 pdurbin balo: I like "big tents" like all of java ee
16:25 pdurbin ##java is a little too big for me (usually) though ;)
16:26 AlexCzar java is too noisy, and ron is there :D
16:27 balo i don't like those general channels. too much things asked before it googled properly
16:27 * AlexCzar looks to the right, where the participants list is and calms down when ron is nowhere to be seen
16:28 balo and the other kind of questions: "can i have a question?"
16:28 balo :D
16:29 pdurbin to each his own :)
16:29 AlexCzar yes and when you ask something non-standard about standard things because of all those people who doesn't like to google, you're also sent to google, which was actually checked by you couple of hundreds of times
16:31 pdurbin AlexCzar: I haven't been great about taking Solr notes ( http://wiki.greptilian.com/solr and https://github.com/dvn/solrpoc ) but feel free to ping me when you get started
16:32 pdurbin balo: I'm fine with discussing general sso things here. I'm not sure I'm going with openam yet
16:33 AlexCzar pdurbin, thanks, great!
16:33 pdurbin AlexCzar: I'll leave it to you to teach me about zookeeper :)
16:33 AlexCzar pdurbin, :) how do you know I'm using it? some previous conversation? :)
16:34 pdurbin AlexCzar: nope
16:34 pdurbin solr or zookeeper?
16:34 AlexCzar zookeeper
16:34 pdurbin no idea
16:36 pdurbin AlexCzar: ron's appearances here seem to have been infrequent: http://irclog.greptilian.com/search.pl?channel=javaee&nick=ron
16:40 AlexCzar pdurbin, actually for now I only have one zookeeper instance, which is very easy to have, just unpack, copy default config, remove almost everything from it and launch :)
16:40 pdurbin AlexCzar: but you aren't using it for solr
16:40 AlexCzar no, I use it for snowflake servers
16:40 AlexCzar that is Twitter Snowflake
16:40 pdurbin javaeebot: lucky twitter snowflake
16:40 javaeebot pdurbin: https://github.com/twitter/snowflake/
16:41 pdurbin "Snowflake is a network service for generating unique ID numbers at high scale with some simple guarantees"
16:41 pdurbin AlexCzar: you're working at high scale? internet scale, I assume
16:41 AlexCzar Yes, that is the plan
16:42 pdurbin I just love all this open source stuff from twitter and netflix
16:42 AlexCzar Can't agree more :) I also use finagle
16:43 AlexCzar raw thrift is too raw :)
16:44 AlexCzar Although there is one problem with twitter's stuff - most of it is written in scala and almost no documentation has java in mind
16:44 AlexCzar Don't get me wrong, I'm very much interested in scala, but I just do not have any productive time left to really learn it
16:45 acuzio left ##javaee
16:45 pdurbin AlexCzar: sounds like you need to go to Twitter's Scala School - http://twitter.github.io/scala_school/ ;)
16:45 AlexCzar One cannot grasp complex concepts after 12 hours of creative work (e.g. programming)
16:46 AlexCzar and that is my case, these days I work 12/24 7 days a week :)
16:47 acuzio joined ##javaee
16:47 pdurbin yeah, my kids wouldn't like that
16:53 AlexCzar pdurbin, kids are awesome :)
16:56 pdurbin AlexCzar: I took mine skiing yesterday. My four year old: http://www.youtube.com/watch?v=0jAz5HXH6Bo
16:57 AlexCzar pdurbin, cute :)
16:58 AlexCzar her skiing is better than mine :D (I've never tried)
16:58 AlexCzar where was it taken?
17:10 sbos99 joined ##javaee
17:15 pdurbin AlexCzar: http://en.wikipedia.org/wiki/Mount_Wachusett
17:15 AlexCzar beautiful
17:25 AlexCzar pdurbin, I'm starting to be jealous (in a good way) of people with kids, guess that's a growing-up thing :D
17:27 pdurbin "kids are like 49% enormous pain in the ass and 51% the most sublime joy you've ever felt" -- https://twitter.com/codinghorror/status/22416656017915904
17:27 pdurbin :)
17:29 AlexCzar pdurbin, yep, I know that but the 51% of the time is actually 99% of the volume :) If you catch what I mean :)
17:30 apric joined ##javaee
17:31 pdurbin :)
18:02 NationalCoder joined ##javaee
18:54 kobain joined ##javaee
19:55 Voyage joined ##javaee
20:28 rektide joined ##javaee
20:45 dabos joined ##javaee
20:51 SoniEx2 joined ##javaee
22:10 mTTu joined ##javaee
22:27 NationalCoder joined ##javaee
22:28 Voyage joined ##javaee
22:42 rstr joined ##javaee
22:43 rstr joined ##javaee
23:15 NationalCoder joined ##javaee

| Channels | #javaee index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

Please see http://irclog.greptilian.com/javaee for which days have been logged.