greptilian logo

IRC log for #sourcefu, 2014-09-29

http://sourcefu.com

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

All times shown according to UTC.

Time S Nick Message
00:05 pdurbin recommendation to use this: Cross Browser Testing Tool. 300+ Browsers, Mobile, Real IE. - http://www.browserstack.com
00:06 pdurbin java vs. nodejs stuff
00:06 pdurbin nodejs good for a proxy, processing json
00:06 pdurbin java better for number crunching
00:08 pdurbin seems to like both
00:09 pdurbin "James Gosling was able to ship Java in 1995 by knowingly leaving out two features: generics and closures"
00:10 pdurbin "there is nothing in OO that says you can't treat code as data"
00:11 pdurbin (from the "Is Java deviating from OO programming?")
00:12 pdurbin sounds like someone has JavaFX on Android working
00:29 pdurbin next session: UGF8906 -- Lightning Talks: Even More Productivity with Free Java Tools
00:29 pdurbin https://oracleus.activeevents.com/2014/connect/sessionDetail.ww?SESSION_ID=8906
00:30 pdurbin first guy talking about how he loves netbeans and primefaces
00:31 pdurbin this guy: Josh Juneau (@javajuneau) | Twitter - https://twitter.com/javajuneau
00:35 pdurbin showing creation of tables from entity classes
00:36 pdurbin "inserrt JSF data table from entity" on the xhtml side
00:41 pdurbin code examples at https://github.com/juneau001/AcmePools
00:42 pdurbin his various books: https://www.apress.com/index.php/author/author/view/id/1866
00:49 pdurbin next guy works on https://github.com/AdoptOpenJDK/javacountdown
00:51 pdurbin says he's the ceo of startup. maybe this guy:karianna (Martijn Verburg) - https://github.com/karianna
00:51 pdurbin next speaker: Kirk Pepperdine (@javaperftuning) | Twitter - https://twitter.com/javaperftuning
00:51 pdurbin showing allocation rates in visualvm
00:51 pdurbin talking about memory pressure
00:53 pdurbin profile object allocations
00:56 pdurbin next speaker: Steve Reinert | LinkedIn - https://www.linkedin.com/pub/steve-reinert/1/969/60a
01:01 pdurbin built an IDE built on netbeans
01:01 pdurbin next speaker: http://timboudreau.com
01:02 pdurbin wrote a netbeans module for node.js support: http://timboudreau.com/modules
01:03 pdurbin how to turn a unix utility into a web service with node.js
01:04 pdurbin http://potrace.sourceforge.net (upload bitmap and get an svg)
01:07 pdurbin showing off an unreleased "code patterns" plugin
01:07 pdurbin https://github.com/timboudreau
03:07 tumdedum joined #sourcefu
07:16 westmaas joined #sourcefu
09:15 aditsu joined #sourcefu
09:19 aditsu joined #sourcefu
15:27 pdurbin first session of the day: JSF 2.2 Deep Dive [TUT2527] https://oracleus.activeevents.com/2014/connect/sessionDetail.ww?SESSION_ID=2527
15:34 pdurbin with Kito D. Mann (@kito99) | Twitter - https://twitter.com/kito99
15:35 pdurbin whom I know from listening to JSF Central (@jsfcentral) | Twitter - https://twitter.com/jsfcentral
15:41 pdurbin "components are the key"
15:42 pdurbin likes omnifaces
15:43 pdurbin "great utility library"
15:44 pdurbin primefaces, icefaces, and richfaces are the most popular
15:46 pdurbin talking about alloyfaces: http://www.liferayfaces.org
15:48 pdurbin hmm, or maybe liferayfaces? ( https://twitter.com/liferayfaces ) ... he says it's being announced today
15:50 pdurbin something about how it uses portlet
15:50 * pdurbin looks at https://www.liferay.com/web/neil.griffin/blog/-/blogs/the-future-is-bright-for-jsf
15:51 pdurbin founder is in the front row, says the focus is on responsive
15:52 pdurbin talking about http://alloyui.com
15:53 pdurbin back to JSF in general. new features in 2.2:
15:53 pdurbin - html5 friendly markup
15:53 pdurbin (pass through attributes and elements)
15:54 pdurbin - faces flows
15:54 pdurbin (ability to define a set of pages, with node states)
15:55 pdurbin - cross site request forgery protection
15:55 pdurbin - loading facelets via ResourceHandler
15:55 pdurbin - File Upload Component
15:56 pdurbin - Resource Library Contracts (Multi-templating)
15:56 pdurbin (changing the way your application looks for different clients)
15:57 pdurbin more on HTML5 friendly markup:
15:57 pdurbin use pure HTML and special attributes to indicate JSF components
15:57 pdurbin pass through attributes vs. pass through elements
15:58 pdurbin rendered on the top most element of the component
15:58 pdurbin HTML5 doctype is the default
15:58 pdurbin can turn this off in web.xml (I think)
15:59 pdurbin <f:passThroughAttributes value="#{myBean.attributeMap}"/>
15:59 pdurbin above:
16:00 pdurbin <h:selectOneMenu pt:autofocues="true"
16:00 pdurbin er
16:01 pdurbin <h:selectOneMenu pt:autofocus="true"
16:01 pdurbin these are both examples of pass through attributes
16:01 pdurbin can also use pass through elements:
16:02 pdurbin specify the html elements and embed jsf stuff, like this:
16:03 pdurbin <input type="password" jsf:id="passwordInput" jsf:value="#{loginController.password}"
16:08 pdurbin another example:
16:09 pdurbin <head jsf:id="head">
16:11 pdurbin mentions ui:debug
16:12 pdurbin <ui:debug hotkey="j"/>
16:15 pdurbin pt:pattern=".{5,}" # example of html5 validation (no javascript required)
16:18 pdurbin this is starting to make more sense: The Java EE 7 Tutorial:HTML5-Friendly Markup | Java EE Documentation - http://docs.oracle.com/javaee/7/tutorial/doc/jsf-facelets009.htm
16:19 pdurbin interesting example of how in safari, the client side validation isn't supported so falls through to the server side validation
16:20 pdurbin <button jsf:action="#{loginController.login}"/>
16:20 pdurbin (normal html5 button)
16:21 pdurbin talking about table layout vs. alternatives
16:21 pdurbin such as a responsive grid (i.e. bootstrap)
16:21 pdurbin says primefaces recently added a responsive grid
16:24 pdurbin done with html5 stuff (says code will be on github or bitbucket), now on to Stateless Views
16:25 pdurbin jsf component tree is the representation of your page
16:25 pdurbin talking about how the tree can get big if there are a lot of tabs, for example
16:27 pdurbin stateless view often used for inputs. a way to avoid using too much memory server-side
16:27 pdurbin essentially a performance enhancement
16:27 pdurbin <f:view transient="true"/>
16:28 pdurbin not per component, affect the whole page
16:28 pdurbin does not work with view scoped beans
16:29 pdurbin now on to Faces Flows
16:29 pdurbin group a set of views together into logical navigation paths
16:29 pdurbin ideas from myfaces codi (sp?)
16:29 pdurbin a flow is like a Java method
16:30 pdurbin can accept input parameters and return values
16:30 pdurbin when entering a flow, you have a well defined interface contract
16:35 pdurbin @ManagedBean, @RequestScoped # regular JSF managed bean
16:35 pdurbin javax.session.bean # newer CDI
16:36 pdurbin @Named is CDI
16:36 pdurbin java.enterprise.context.RequestScoped # older
16:37 pdurbin whoops
16:37 pdurbin I have this all confused
16:37 pdurbin enterprise is the newer one, the CDI one
16:38 pdurbin import javax.faces.bean.ManagedBean # older, best not to use this
16:40 pdurbin import javax.enterprise.context.SessionScoped # newer, CDI, preferred
16:41 pdurbin see also http://stackoverflow.com/questions/15057564/why-are-there-different-bean-management-annotations
16:43 pdurbin talking more about Faces Flows
16:43 pdurbin jsfwid=sdfafasdaf:7 # JSF window id
16:45 pdurbin glassfish samples has good examples (enterflow, etc)
16:46 pdurbin https://svn.java.net/svn/glassfish-samples~svn/trunk/ws/javaee7/jsf/annotatedflow/src/main/webapp/enterflow/
16:47 pdurbin https://svn.java.net/svn/glassfish-samples~svn/trunk/ws/javaee7/jsf/annotatedflow/src/main/java/flow/EnterFlow.java
16:47 pdurbin FlowBuilder builder = flowBuilder.id("", "flow");
16:48 pdurbin builder.viewNode("enter", "/enterflow/stepA.xhtml").markAsStartNode();
16:52 pdurbin showing off this now: https://svn.java.net/svn/glassfish-samples~svn/trunk/ws/javaee7/jsf/scrumtoys/
16:53 pdurbin https://svn.java.net/svn/glassfish-samples~svn/trunk/ws/javaee7/jsf/scrumtoys/flows/manageStoryAttachments/src/main/java/jsf2/demos/scrum/manageStoryAttachments/UploadManager.java
16:55 pdurbin question about ConversationScope vs. Faces Flow
16:57 pdurbin now on to CSRF
16:57 pdurbin cross-site request forgery
16:59 pdurbin JSF has typically used POST, ViewState required for a post to be accepted
16:59 pdurbin GET requests handled with new <protected-view> element
16:59 pdurbin you have to turn it on
17:00 pdurbin now on to loading via ResourceHandler
17:00 pdurbin used to be ResourceResolver was used for Facelets
17:00 pdurbin now it all comes from one place
17:00 pdurbin now on to File Upload Component
17:01 pdurbin file uploaded supported in Servlet 3.0
17:01 pdurbin only does single file, not multiple
17:01 pdurbin <h:inputFile>
17:02 pdurbin type that you get back is a "part"
17:02 pdurbin you define in the web.xml how big of files you accept
17:03 pdurbin no limit by default
17:03 pdurbin now on to Resource Library Contracts (multi-templating)
17:04 pdurbin allows you to template site elements (header, sidebar, content ara, footer, banner, css, images, etc.)
17:04 pdurbin packaged as jar files (defines a contract)
17:04 pdurbin allows you to change global layout (useful for apps with per-client customization)
17:05 pdurbin could provide facelets templates per client
17:05 pdurbin META-INF/contracts/siteLayo​ut/javax.faces.contract.xml
17:05 pdurbin META-INF/contracts/siteLay​out/topNav_template.xhtml
17:06 pdurbin by default, the contract is global
17:06 pdurbin can control it in faces-config.xml
17:07 pdurbin contract-mapping
17:07 pdurbin or
17:07 pdurbin <f:view contracts:"#{clientManager.clientLayout}"
17:12 pdurbin can add the jar (for acme co.) in faces-config.xml
17:12 pdurbin <contracts>acme-layout
17:13 pdurbin under resource-library-contracts/contracts-mapping
17:16 pdurbin now on to some medium-sized features
17:16 pdurbin components/renderers (component managed el context, ClientWindow)
17:17 pdurbin FaceletFactoryAPI
17:17 pdurbin View Actions
17:17 pdurbin vs. prerendered view
17:18 pdurbin <f:viewAction actionListener=
17:19 pdurbin could use action to navigate to a different page
17:20 pdurbin basically a newer version of <f:event type="preRenderView"
17:21 pdurbin more features:
17:21 pdurbin almost all artifacts are injectable, PhaseListeners, factories, etc.
17:21 pdurbin CDI @ViewScoped annotation # new in JSF 2.2
17:22 pdurbin UIData now works with Collections instead of just Lists
17:23 pdurbin new events for Flash Scope
17:23 pdurbin JSF 2.3 has begun, will be part of Java EE 8, will depend on Java SE 8
17:24 pdurbin managed beans will probably be deprecated
17:24 pdurbin @Inject FacesContext (maybe)
17:24 pdurbin multi-field validataion
17:25 pdurbin ajax method invocation
17:25 pdurbin talk by Ian Levitz (?) tonight about integration with JS frameworks
17:51 pdurbin ---
17:51 pdurbin next session: Programming with Lambda Expressions in Java [CON1770] https://oracleus.activeevents.com/2014/connect/sessionDetail.ww?SESSION_ID=1770
17:51 pdurbin with Venkat Subramaniam (@venkat_s) | Twitter - https://twitter.com/venkat_s
17:51 pdurbin this guy was very entertaining last year
18:01 pdurbin code and slides will be available at http://agiledeveloper.com
18:02 pdurbin lambdas as an alternative to objects
18:02 pdurbin object composition vs. function composition
18:04 pdurbin the "self inflicted wound pattern" # when you have to pause and think if you're doing the right thing :)
18:05 pdurbin familiar doesn't mean you're comfortable with it
18:05 pdurbin maybe you'd never like to see it again :)
18:06 pdurbin i.e. external iterators # like having a rude dog at home, you have to move it every step of the way
18:07 pdurbin better to use an internal iterator... focus on communicating your intent
18:09 pdurbin java.util.function.Consumer
18:11 pdurbin *could* use an anonymous inner class but bleh
18:11 pdurbin numbers.forEach(new Consumer<Integer>() { ... # bleh
18:12 pdurbin instead:
18:12 pdurbin numbers.forEach( (Integer value) -> sout(value) );
18:13 pdurbin parameter list to the left of the arrow
18:13 pdurbin body to the right of the arrow
18:15 pdurbin "for the first time in a long time, Java is actually intelligent" :)
18:15 pdurbin numbers.forEach( (value) -> sout(value) );
18:16 pdurbin or even:
18:16 pdurbin numbers.forEach( value -> sout(value) );
18:16 pdurbin that is, java can do some type inference. it knows we're operating on integers
18:17 pdurbin the office space pattern # take the thing and give it to the next guy
18:18 pdurbin numbers.forEach( System.out::println ); # method reference
18:19 pdurbin http://docs.oracle.com/javase/tutorial/java/javaOO/methodreferences.html
18:22 pdurbin numbers.stream().map(e -> e *2).reduce(0, (c, e) -> c + e)); # c for carryover
18:23 pdurbin all this is passed to sout
18:28 pdurbin / find first number greater than three that's even and double it
18:28 pdurbin numbers.stream()
18:28 pdurbin .filter(e -> e > 3)
18:29 semiosis how do you match a method with different signatures?  i.e. foo(String) vs foo(Long)
18:29 pdurbin .filter(e -> e %2 == 0)
18:29 pdurbin .map(e -> e *2)
18:29 pdurbin .findFirst();
18:31 pdurbin heh. from the crowd; "that looks complicated"
18:31 pdurbin the speaker: "the word you are looking for is *unfamiliar*" :)
18:32 pdurbin a better question than "how do I debug that?" is "how do I test that?"
18:36 semiosis <3 this System.out::println stuff.  now Java can finally catch up to PHP and have its own T_PAAMAYIM_NEKUDOTAYIM errors
18:37 semiosis http://en.wikipedia.org/wiki/Scope_resolution_operator#PHP
18:37 pdurbin streams: intermediate vs. terminal operations
18:38 pdurbin fusion of three operations
18:39 pdurbin showing how the stream version is just as efficient as the iterative versin. same number of operations
18:39 pdurbin laziness is built into streams
18:40 pdurbin interesting to see him replace some of those lines:
18:41 pdurbin .filter(Foo::isGreaterThanThree)
18:41 pdurbin .map(Foo::doubleIt)
18:42 pdurbin next problem statement: display largest stock in a list which has a value less than $500
18:45 pdurbin talking about how stocksLessThan500 returns a Predicte
18:45 pdurbin Predicate*
18:50 pdurbin symbols.map(StockUtil::getPrice)
18:50 pdurbin .filter(StockUtil.isPriceLessThan(500))
18:51 pdurbin .reduce(dummyInitialValue, StockUtil::pickHigh)
18:52 pdurbin less code, more expressive
18:53 pdurbin supports concurrency
18:55 pdurbin "while debugging threaded code at your last job, you applied for your next job. That's called concurrency, right?" :)
18:56 pdurbin findFunctional(Tickers.symbols.parallelStream()) # was stream
18:57 pdurbin you decide when you want concurrency
18:59 pdurbin "the biggest change in Java 8 is still in the minds of the programmers"
19:06 aditsu joined #sourcefu
19:37 pdurbin ---
19:37 pdurbin next session: Reactive Streams with Rx [CON5749] https://oracleus.activeevents.com/2014/connect/sessionDetail.ww?SESSION_ID=5749
19:37 pdurbin with Ben Christensen (@benjchristensen) | Twitter - https://twitter.com/benjchristensen
19:37 pdurbin talking about Observable pattern. hot vs. cold. cold is like a file on your disk
19:38 pdurbin https://github.com/ReactiveX/RxJava is what he's talking about, I assume
19:41 pdurbin finite, infinite, and distributed streams
19:43 pdurbin uses this on the front end: https://github.com/Reactive-Extensions/RxJS
19:44 pdurbin chose reactive because they wanted fewer network calls
19:45 pdurbin they use groovy in production
19:45 pdurbin oh, at netflix, that is :)
19:46 pdurbin flatmap transforms from T to Observable<R>
19:47 pdurbin list of list of movies = lolomo :)
19:50 pdurbin an observable api: treat everything like a stream (finite)
19:52 pdurbin now he's talking about infinite streams
19:58 pdurbin no backpressure needed when sychronous on the same thread
19:58 pdurbin backpressure needed if asynchronous (queuing)
19:59 pdurbin as soon as you have queues, you can fill them up, blow them up ... need to have a way to control the rate at which data is flowing
20:00 pdurbin could block, but that sucks
20:00 pdurbin (by definition blocking is what they are trying to avoid)
20:03 pdurbin talking about sampling data from a busy stream
20:04 pdurbin talking about reactive pull (dynamic push-pull)
20:05 pdurbin push when consumer keeps up with producer. switch to pull when consumer is slow. bound all quees (vertically, not horizontally)
20:20 pdurbin mention of mantis: http://qconsf.com/presentation/mantis-netflixs-event-stream-processing-system
20:25 pdurbin https://github.com/ReactiveX/RxJava/wiki/Backpressure
20:30 pdurbin looking at nashorn for use by their javascript devs
21:31 pdurbin ---
21:31 pdurbin next session: Java EE 7 Recipes [CON2038] https://oracleus.activeevents.com/2014/connect/sessionDetail.ww?SESSION_ID=2038
21:31 pdurbin by Josh Juneau (@javajuneau) | Twitter - https://twitter.com/javajuneau
21:35 pdurbin code will be at https://github.com/juneau001
21:35 pdurbin previous version from earlier talk: https://github.com/juneau001/AcmeWorld
21:36 pdurbin problem 1. invoke an action, navigate
21:36 pdurbin solution: ViewAction
21:37 pdurbin <f:viewAction action="#{parkReservationCon​troller.loadReservation}"/>
21:37 pdurbin https://github.com/juneau001/AcmeWorld/blob/master/src/main/webapp/parkReservation.xhtml
21:39 pdurbin calls action on GET requests
21:39 pdurbin problem 2. admin should see different color background
21:39 pdurbin solution: contracts
21:40 pdurbin https://github.com/juneau001/AcmeWorld/tree/master/src/main/webapp/contracts
21:41 pdurbin problem 3. want to use html5 and jsf
21:43 pdurbin solution: passthrough
21:43 pdurbin https://github.com/juneau001/AcmeWorld/blob/master/src/main/webapp/admin/addRestaurant.xhtml
21:44 pdurbin jsf:value=
21:45 pdurbin https://github.com/juneau001/AcmeWorld/blob/master/src/main/webapp/restaurantReservation.xhtml
21:45 pdurbin jsf:value="#{restaurantReservation​Controller.current.restaurantId}" (in a nomal <select> element)
21:46 pdurbin problem 4. you want validation for an entity bean
21:46 pdurbin solution: bean validation
21:47 pdurbin i.e. @NotNull at https://github.com/juneau001/AcmeWorld/blob/master/src/main/java/org/javaee7/entity/ParkReservation.java
21:47 semiosis can it validate an email address?
21:48 pdurbin problem 5. validate parameters
21:48 pdurbin solution parameter contraints
21:49 pdurbin semiosis: we use an email checker from hibernate
21:50 pdurbin problem 6. display currently entered value within bean validation error message
21:50 semiosis i used apache commons recently.  noticed guava can do it too.  my problem was hostname validation, a subproblem of email validation.
21:50 pdurbin solution: put expression language in bean validation error message
21:50 semiosis a hard problem because they keep making more TLDs
21:51 pdurbin @Min(value=1, message="You've selected ${validatedValue} for your reservation, you must book at least one day")
21:51 pdurbin https://github.com/juneau001/AcmeWorld/blob/master/src/main/java/org/javaee7/entity/ParkReservation.java
21:51 pdurbin so many (stupid) TLDs now
21:51 semiosis +1
21:51 pdurbin problem 7. access managed bean from another bean (controller)
21:52 pdurbin solution: use @Inject
21:52 pdurbin https://github.com/juneau001/AcmeWorld/blob/master/src/main/java/org/javaee7/interceptor/NewReservationLogger.java
21:53 pdurbin @ManagedBean and the javax.faces.bean will be deprecated
21:53 pdurbin problem: have CDI ignore something, not be injectable
21:54 pdurbin solution: @Vetoed
21:54 pdurbin problem 9. specity ordering of Interceptor bindings
21:55 pdurbin solution: @Priority
21:56 pdurbin @Priority(200)
21:56 pdurbin https://github.com/juneau001/AcmeWorld/blob/master/src/main/java/org/javaee7/interceptor/NewReservationLogger.java
21:57 pdurbin problem 10. execute a process in the background
21:57 pdurbin solution: ManagedExecutorService
21:57 pdurbin import javax.enterprise.concurren​t.ManagedExecutorService;
21:58 pdurbin https://github.com/juneau001/AcmeWorld/blob/master/src/main/java/org/javaee7/jsf/ParkReservationController.java
22:00 pdurbin AcmeParkReservation implements Callable
22:00 pdurbin https://github.com/juneau001/AcmeWorld/blob/master/src/main/java/org/javaee7/reports/AcmeParkReservation.java
22:00 pdurbin javax.enterprise.concurrent.ManagedTask
22:01 pdurbin return a Future object
22:01 pdurbin problem 11. spawn a thread to periodically execute in the background
22:01 pdurbin solution: ManagedThreadFactory
22:02 pdurbin https://github.com/juneau001/AcmeWorld/blob/master/src/main/java/org/javaee7/jsf/ParkReservationController.java
22:05 pdurbin problem 12. mark @PostConstruct as transactional
22:05 pdurbin solution: @TransactionAttribute
22:05 pdurbin @TransactionAttribute(Transact​ionAttributeType.REQUIRES_NEW)
22:05 pdurbin https://github.com/juneau001/AcmeWorld/blob/master/src/main/java/org/javaee7/session/ReservationBookingBean.java
22:06 pdurbin problem 13. return all active timers
22:06 pdurbin soultion: TimerService.getAllTimers()
22:06 pdurbin https://github.com/juneau001/AcmeWorld/blob/master/src/main/java/org/javaee7/session/NotificationTimer.java
22:08 pdurbin problem 14. call database stored procedure
22:08 pdurbin solution: StoredProcedureQuery
22:09 pdurbin http://docs.oracle.com/javaee/7/api/javax/persistence/NamedStoredProcedureQuery.html
22:09 pdurbin problem 15. want lifecycle callback methods
22:09 pdurbin solution: @PostPersist, @PreUpdate
22:10 pdurbin @PrePersist
22:10 pdurbin https://github.com/juneau001/AcmeWorld/blob/master/src/main/java/org/javaee7/entity/listener/ParkReservationListener.java
22:11 pdurbin problem 16. build a JSON object
22:12 pdurbin solution: JsonObjectBuilder
22:12 pdurbin https://github.com/juneau001/AcmeWorld/blob/master/src/main/java/org/javaee7/jsf/JsonController.java
22:15 pdurbin problem 17. write JSON to a file
22:15 pdurbin solution: JsonWriter
22:15 pdurbin https://github.com/juneau001/AcmeWorld/blob/master/src/main/java/org/javaee7/jsf/JsonController.java
22:16 pdurbin problem 18. want to parse some json
22:16 semiosis JsonReader?
22:17 pdurbin solution: JsonParser :)
22:17 semiosis WAT?!?!
22:17 pdurbin https://github.com/juneau001/AcmeWorld/blob/master/src/main/java/org/javaee7/jsf/JsonController.java
22:18 pdurbin heh
22:18 pdurbin JsonParser parser = Json.createParser(inputStream)
22:19 pdurbin problem 19. create websocket enpoint to recieve msgs async
22:19 pdurbin solution: @ServerEndpoint, @OnMessage
22:19 pdurbin https://github.com/juneau001/AcmeWorld/blob/master/src/main/java/org/javaee7/ws/ChatEndpoint.java
22:20 pdurbin @OnOpen also
22:21 pdurbin problem 20. want to send a message to your websocket endpoint
22:24 pdurbin solution: js client invokes OnOpen
22:24 pdurbin connectToChatserver() https://github.com/juneau001/AcmeWorld/blob/master/src/main/webapp/contracts/standard/acmeWorldTemplate.xhtml
22:26 pdurbin problem 21. send notification to user
22:27 pdurbin solution: JMS, JMSContext
22:27 pdurbin https://github.com/juneau001/AcmeWorld/blob/master/src/main/java/org/javaee7/jms/QueueMessageProducer.java
22:28 pdurbin problem 22. consume message from queue
22:28 pdurbin solution jms message consumer
22:28 pdurbin JMSConsumer to inbound queue
22:28 semiosis pfft. give me json in a simple string message queue
22:28 * semiosis is so over jms
22:28 pdurbin problem 23. send message after a delay
22:29 pdurbin setDeliveryDelay on JMSContext
22:29 pdurbin semiosis: someone just asked if JMS is still used :)
22:29 semiosis literally LOL
22:29 pdurbin problem 24. ??? do something with response
22:29 pdurbin solution: jax-rs client
22:29 pdurbin ClientBuilder.newClient
22:30 pdurbin WebTarget
22:31 pdurbin problem 25: ???
22:31 pdurbin solution: AsyncResponse
22:31 pdurbin asnyc.resume
22:32 pdurbin these last slides are a little rushed :)
22:47 semiosis spent too much time on JsonWriter & JsonParser
22:47 pdurbin semiosis: what do you use instead of JMS?
22:47 semiosis Amazon SQS
22:48 pdurbin you use everything Amazon :)
22:48 semiosis one of the design goals of our new system was not having to run our own message broker.  old system was JMS using ActiveMQ
22:48 pdurbin undifferentiated heavy lifting
22:48 semiosis right!
22:48 pdurbin searchbot: lucky undifferentiated heavy lifting
22:48 searchbot pdurbin: http://www.cio.co.nz/article/466635/amazon_cto_stop_spending_money_undifferentiated_heavy_lifting_/
22:50 semiosis aside from not wanting to run a broker, i also believe that one huge benefit of an ESB is loose coupling between components and JMS gets in the way
22:51 semiosis if i wanted to inspect the queue i had to write a java application & load our message classes :(
22:51 semiosis couldn't just curl it
22:52 pdurbin that's how I feel about Lucene vs. Solr
22:52 semiosis interesting
22:52 pdurbin you can curl Solr
22:52 semiosis ah right, solr wraps lucene & gives it a http/json rest api
22:52 pdurbin yeah, like elasticsearch
22:52 semiosis thats the way to go!
22:55 semiosis jms was in true java style, overengineered & handling use cases most people had never considered, much less encountered.  there wasn't much alternative back then, but now there's plenty of other choices... i think redis is what most people are using these days
22:55 semiosis rabbitmq/AMQP
22:56 semiosis or rabbitmq/AMQP
22:57 pdurbin yeah
22:57 pdurbin the JMS examples he showed seemed pretty simple though. seem to "just work"
23:01 pdurbin ---
23:01 pdurbin next session: Faster Object Arrays [CON5659] https://oracleus.activeevents.com/2014/connect/sessionDetail.ww?SESSION_ID=5659
23:02 semiosis brb
23:03 pdurbin with Gil Tene (@giltene) | Twitter - https://twitter.com/giltene
23:04 pdurbin and https://www.linkedin.com/in/johncuthbertson
23:04 pdurbin org.ObjectLayout: An optimised memory layout package http://objectlayout.org
23:04 pdurbin https://github.com/ObjectLayout/ObjectLayout
23:05 pdurbin one of the last inherent speed gaps of Java vs. C
23:06 pdurbin depends on memory layout
23:07 pdurbin not trying to save memory
23:07 pdurbin going for better performance
23:08 pdurbin focus: speed for java objects on the heap
23:09 pdurbin discussing goal overlap between value types and packed objects
23:10 pdurbin no overlap with either project
23:10 pdurbin doesn't conflict with either
23:12 pdurbin 'If we succeed, the user experince with value types can be summed up as, “Codes like a class, works like an int!”' http://cr.openjdk.java.net/~jrose/values/values-0.html
23:13 pdurbin more on packed objects at http://www.slideshare.net/mmitran/ibm-java-packed-objects-mmit-20121120 via http://duimovich.blogspot.com/2012/11/packed-objects-in-java.html
23:14 pdurbin arguing that we do crazy things in Java for performance: unsafe direct access stuff using flyweights over buffers or byte arrays
23:15 pdurbin speed comes from the semantic limitations of the type
23:15 pdurbin C's layout speed benefits:
23:16 pdurbin - dead reckoning: data address derived from containing object address
23:16 pdurbin - streaming: sequential access through multiple members
23:19 pdurbin mutability and non-uniform member size force de-referencing and breaks streaming
23:22 pdurbin want to support
23:22 pdurbin - array of structs... struct foo[];
23:22 pdurbin - struct with struct inside
23:22 pdurbin - struct with array at end (header + payload)
23:22 pdurbin all expressable in Java today but without the speed
23:25 pdurbin modeled after java.util.concurrent which came from outside Sun and Oracle
23:28 pdurbin StructuredArray<T>
23:28 pdurbin https://github.com/ObjectLayout/ObjectLayout/blob/master/ObjectLayout/src/test/java/org/ObjectLayout/StructuredArrayTest.java

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

http://sourcefu.com