IRC Chat : 2012-05-07 - OpenMRS

00:26:06 *** nwilkie has joined #openmrs
00:26:43 <nwilkie> anybody around that knows a bit about the status of Webservices.REST dev?
00:27:57 <nwilkie> I found a bug but noticed that there haven't been any commits for a while, wasn't sure if the project had moved
00:40:34 *** harshadura has quit IRC
01:02:22 <r_friedman> nwilkie: i know about webservices.rest dev
01:07:35 *** r0bby has quit IRC
01:18:30 <nwilkie> r_friedman: hey there
01:18:44 <r_friedman> hey nwilkie
01:19:15 <r_friedman> we just went through a sprint on webservices.rest
01:19:26 <nwilkie> r_friedman: I'm using the Webservices.REST module, and I saw that you had put up several patches dealing with LocationTag handling
01:19:38 <r_friedman> nwilkie: yes
01:20:24 <r_friedman> basically we are trying to get to a 1.0 release
01:20:24 <nwilkie> r_friedman: This is me not knowing a lot about collaborative programming, but do I need to apply these patches manually for the change to take effect?
01:20:57 <nwilkie> r_friedman: I thought I had found a new bug with Location objects being broken, but it turns out it was just the LocationTag that was broken underneath it
01:20:58 <r_friedman> they haven't been merged into trunk yet,
01:21:27 <r_friedman> there may actually be a larger issue
01:21:33 <nwilkie> r_friedman: ah OK, so then I'm not missing out on some alternative repo where they're putting everything then
01:21:48 <nwilkie> r_friedman: really? It seemed like what you put in would fix it
01:21:58 <r_friedman> no, neither of us is in the cabal :(
01:22:27 <r_friedman> well, the problem is, how do you add a location tag to a location
01:22:41 *** robbyoconnor has joined #openmrs
01:22:41 *** ChanServ sets mode: +v robbyoconnor
01:22:53 <r_friedman> because the relationship is many to many, it requires a mapping table
01:23:09 <r_friedman> in most other cases, the mapping table actually carries some data about the relationship
01:23:38 <r_friedman> so it is possible to make the mapping table a subresource of one side of the relationship
01:23:57 <r_friedman> you can see this with attributes, like patient attributes
01:24:25 <r_friedman> the patient_attribute table is a mapping table which carries the value of the attribute for the patient
01:24:55 <nwilkie> r_friedman: ah I see the issue there
01:25:06 <r_friedman> so patient_attribute is a subresource of patient relying on a simple 1-many relationship with the resource patient attribute type
01:25:38 <r_friedman> but that's not the case with location tags
01:26:07 <r_friedman> the last I talked to rafa, who was doing most of the work, he wants to put off collection updates for now
01:26:22 <r_friedman> but there's no avoiding it for tags
01:26:43 <r_friedman> i've just started to try to figure out an approach myself
01:27:06 <r_friedman> here is some of my thinking https://wiki.openmrs.org/display/docs/Standard+Modelling+of+Resource+Relationship+Types
01:27:15 <r_friedman> I welcome suggestions
01:27:26 <r_friedman> there are also some hibernate issues to look out for as well
01:28:08 <r_friedman> telling hibernate to save does not mean the database is updated
01:28:16 <r_friedman> at least at that moment
01:29:06 <r_friedman> just now i was looking at LocationServiceImpl to see how it handled tags. there's some heavy duty stuff there.
01:29:35 <r_friedman> in the case of most collections, we just make sure that the children are saved before we save the parent
01:29:56 <nwilkie> r_friedman: I'm just reading what you put up on that site... it takes me a bit to wrap my mind around this stuff
01:29:57 <r_friedman> apparently this is not enough with locaiton tags
01:30:23 <r_friedman> nwilkie: well, I'm not known for the clarity of my thinking or writing
01:30:49 <nwilkie> r_friedman: no, I've just never taken a comp sci course before
01:31:04 <r_friedman> interesting, how did you get into this racket?
01:31:07 <nwilkie> r_friedman: I really need to just spend a few hours and do a modelling diagram crash course
01:31:37 <nwilkie> r_friedman: I got put in the wrong research program during a neuroscience master's
01:31:50 <nwilkie> i was supposed to do lab work, but they put me in a neuroinformatics research project
01:31:56 <r_friedman> nwilkie: ooooh, bad career move
01:32:02 <nwilkie> so I showed up and they told me to write them some MRI analysis software
01:32:33 <nwilkie> r_friedman: so I just learned how to program in Matlab and Java and went with it
01:32:33 <r_friedman> nwilkie: that's what happens when you take a fourier analysis course
01:32:51 <nwilkie> r_friedman: yes, all my knowledge of fourier transforms is pretty useless now
01:33:17 <nwilkie> r_friedman: anyway, now I'm a med student and I've wanted to work for Doctors without Borders since I was about 15
01:33:36 <r_friedman> nwilkie: well, the digital world has killed the analog world, don't have to worry about calculus or anything :)
01:34:09 <r_friedman> but you need to know your quaternions for digital rendering
01:34:38 <nwilkie> r_friedman: and the fact that I know medicine and some comp sci gives me a good way to start! I'm programming an Android client for OpenMRS for them. We're starting out with cholera.
01:34:40 <r_friedman> probably would help in reverse for mri
01:35:05 <r_friedman> either i've already heard of that project or there's another like it in the world
01:35:33 <r_friedman> wouldn't surprise me ... are you working with the Vietnamese guy in Geneva?
01:35:39 <nwilkie> r_friedman: we spoke a bit back, I think I may have been on as "nick" instead of nwilkie
01:35:45 <nwilkie> r_friemdan: yep, thang dao
01:36:01 <r_friedman> oh yes, that's it, nick nick bo bick
01:36:17 <nwilkie> r_friedman: that's what they call me
01:36:32 <r_friedman> you're probably way to young to have heard of the name game
01:36:37 <r_friedman> too
01:36:54 <nwilkie> r_friedman: ugh, hearing the term quaternion just brings back bad memories of not knowing what anybody was talking about. Tensors were the worst.
01:37:33 <r_friedman> i used to read about them in scientific american and john baez' physics blog
01:37:55 <r_friedman> but i have this really good book, 3D Math Primer for Graphics and Game Development by Dunn & Parberry
01:38:14 <r_friedman> explains how to use them and other techniques
01:40:22 <r_friedman> nwilkie: well, i gotta go finish making dinner now, be back later if you have questions
01:40:24 <nwilkie> r_friedman: so you do more than just save the world then :)
01:40:38 <r_friedman> first eat dinner, then save the world :)
01:40:52 *** r_friedman is now known as r_friedman_away
01:40:53 <nwilkie> r_friedman: take care rob bob bo bob bob...
02:06:33 *** summon has joined #openmrs
02:31:27 *** r_friedman_away is now known as r_friedman
02:31:51 <r_friedman> summon hi m
02:32:28 <summon> hi roger
02:32:46 <r_friedman> another early morning eh
02:33:30 <summon> very early :) and freeconferencing seems to be sleeping still
02:33:55 <r_friedman> i think I am about to pack it in
02:35:16 <r_friedman> summon: catch you later
02:35:33 *** r_friedman has quit IRC
03:25:09 *** summon has quit IRC
04:15:16 *** finbrein has joined #openmrs
04:27:50 *** jkeiper has quit IRC
04:27:50 *** chopin_ has quit IRC
04:29:07 *** dmexs has quit IRC
04:31:06 *** bryq has joined #openmrs
04:31:06 *** ChanServ sets mode: +v bryq
04:42:04 *** bryq has quit IRC
04:46:16 *** nwilkie has quit IRC
04:54:00 <finbrein> djazayeri: ping
04:58:53 *** upul` has joined #openmrs
04:58:53 *** ChanServ sets mode: +v upul`
05:04:01 *** finbrein has quit IRC
05:15:21 *** finbrein has joined #openmrs
06:28:40 <OpenMRSBot> Recent updates in the world of openmrs: OpenMRS Modules: OpenMRS UI Framework 1.3 uploaded to OpenMRS Module Repository <https://dev.openmrs.org/modules/view.jsp?module=uiframework&ampversion=&amp1.3>
07:00:43 <OpenMRSBot> Recent updates in the world of openmrs: OpenMRS Modules: UI Library Module 1.1 uploaded to OpenMRS Module Repository <https://dev.openmrs.org/modules/view.jsp?module=uilibrary&ampversion=&amp1.1>
07:02:01 *** summon has joined #openmrs
07:40:37 *** bryq has joined #openmrs
07:40:37 *** ChanServ sets mode: +v bryq
07:56:30 *** dkayiwa has joined #openmrs
08:01:43 *** bryq has quit IRC
08:08:59 *** rafa has joined #openmrs
08:08:59 *** ChanServ sets mode: +v rafa
08:17:05 *** bryq has joined #openmrs
08:17:05 *** ChanServ sets mode: +v bryq
08:20:05 *** summon has left #openmrs
08:37:53 *** dkayiwa has quit IRC
08:50:28 *** bryq has quit IRC
08:55:19 *** bryq has joined #openmrs
08:55:19 *** ChanServ sets mode: +v bryq
09:10:03 *** bryq has quit IRC
09:16:26 *** dkayiwa has joined #openmrs
09:22:48 *** bryq has joined #openmrs
09:22:48 *** ChanServ sets mode: +v bryq
09:28:18 <dkayiwa> hi rafa
09:28:27 <rafa> hi dkayiwa
09:28:44 <dkayiwa> rafa: did you have a good weekend? :)
09:29:01 <rafa> dkayiwa: very good thanks!
09:29:10 <dkayiwa> rafa: thats great
09:29:37 <dkayiwa> rafa: do you have any links to documentation i can read about these atom and event modules for this week's sprint?
09:30:04 <rafa> https://wiki.openmrs.org/display/docs/Event+Module
09:30:08 <rafa> https://wiki.openmrs.org/display/docs/Atom+Feed+Module
09:30:18 <rafa> that's all
09:30:23 <dkayiwa> rafa: those i have already read. they do not have much :)
09:30:31 <rafa> yes, I know
09:31:17 <rafa> dkayiwa: what are you working on?
09:31:30 <rafa> dkayiwa: do you need extra explanation?
09:31:51 <dkayiwa> rafa: just trying to understand as much of the existing code before i do a ticket :)
09:32:20 <dkayiwa> rafa: some sort of background as to why we need these modules would be a good start :)
09:33:28 <rafa> dkayiwa: I usually just start coding and things get clearer ;)
09:33:37 <dkayiwa> rafa: hahahaha :)
09:33:40 *** summon has joined #openmrs
09:33:48 <rafa> dkayiwa: but yeah, I'm not sure what is the exact use case either
09:33:57 <dkayiwa> rafa: :D
09:48:23 *** bryq has quit IRC
10:01:27 *** bryq has joined #openmrs
10:01:27 *** ChanServ sets mode: +v bryq
10:23:07 *** bryq has quit IRC
10:37:44 *** bryq has joined #openmrs
10:37:44 *** ChanServ sets mode: +v bryq
10:50:27 *** dkayiwa has quit IRC
10:57:10 *** dkayiwa has joined #openmrs
11:28:07 *** harshadura has joined #openmrs
11:28:53 *** upul` has quit IRC
11:37:31 *** dkayiwa has quit IRC
11:40:27 *** r8friedman has joined #openmrs
11:40:38 *** r8friedman is now known as r_friedman
11:41:12 <r_friedman> rafa, good morning
11:41:24 <rafa> r_friedman: morning
11:41:33 <r_friedman> do you have some time to talk collections?
11:42:36 <rafa> r_friedman: in 10 minutes?
11:42:46 <r_friedman> rafa, sure, ping me when you're ready
11:42:55 <rafa> r_friedman: ok
11:49:16 *** bryq has quit IRC
11:49:46 *** james_regen has joined #openmrs
11:49:46 *** ChanServ sets mode: +v james_regen
11:50:40 <rafa> r_friedman: ready
11:56:43 *** dkayiwa has joined #openmrs
12:03:26 <r_friedman> rafa, sorry, didn't hear the ping
12:03:41 <rafa> r_friedman: still ready :)
12:04:02 <r_friedman> rafa, tks, where are we at in creating/updating collections through rest?
12:04:57 <rafa> r_friedman: for subresources you need to add/delete elements one-by-one
12:05:13 <rafa> r_friedman: for resources you overwrite collections
12:06:00 <r_friedman> ok, are there any methods which the resource needs to support for this to work?
12:06:08 <rafa> r_friedman: for resources and subresources you can create the whole collection at once
12:07:16 <rafa> r_friedman: for resources nothing needs to be implemented
12:07:30 <rafa> r_friedman: for subresources add, remove methods
12:08:38 <r_friedman> what about the self-joins, location, concept set, concept question
12:09:34 <rafa> r_friedman: location is a resource so you'll overwrite if you decide to update locations
12:10:29 <r_friedman> but i could create a whole portion of the tree at one go?
12:11:46 <rafa> r_friedman: you can only specify uuids of resources to have them included in a collection
12:12:18 <rafa> r_friedman: subresources can be created on the fly
12:12:38 <r_friedman> rafa, so you can create new subresources as you create a resource, but you can't create new resources
12:12:53 <rafa> r_friedman: right
12:13:39 <r_friedman> what about location tags?
12:15:28 <rafa> r_friedman: I believe they should be implemented as resources
12:15:47 <r_friedman> ok
12:16:28 <rafa> r_friedman: the idea is that anything you can reuse in multiple resources is a resource
12:16:50 <r_friedman> and how do you know the name of the mapping table?
12:16:53 *** summon has quit IRC
12:17:02 *** harshadura has quit IRC
12:17:48 <rafa> r_friedman: it's all defined in hbm files
12:18:13 <r_friedman> rafa, well that's certainly clever of you
12:19:26 <r_friedman> rafa, and for purposes of this discussion, subclass handlers count as resources?
12:20:30 <rafa> r_friedman: yes, they define resources
12:20:46 <r_friedman> rafa, don't let darius hear you say that :)
12:20:55 <rafa> r_friedman: haha
12:21:42 <r_friedman> rafa, what is the best practice for collections at the service level, if you know
12:23:22 *** wyclif has quit IRC
12:23:53 <rafa> r_friedman: what do you mean?
12:24:59 <r_friedman> rafa, if you take a look at LocationServiceImpl:saveLocation, you will see a lot of horsing around with transient tags
12:25:52 <r_friedman> rafa, in most save methods for resource objects with subresources, the save method saves the subresource objects before the resource object
12:26:49 <r_friedman> rafa, so my question is, what do you have to do to stay on the right side of Hibernate
12:28:59 <rafa> r_friedman: that's a longer discussion, but try to avoid situations like in saveLocation
12:29:05 *** jkeiper has joined #openmrs
12:29:33 <rafa> r_friedman: you should try to work with objects attached to Hibernate
12:29:37 <r_friedman> rafa, haha, if I knew how it got into that situation, I might know how to avoid it
12:29:46 <rafa> r_friedman: so that it can do the trick for you :D
12:30:35 <r_friedman> rafa, both location tags and tags are hibernate objects, mark's code is looking at the unsaved tags (id=null), I assume there's some purpose behind it
12:31:31 <rafa> r_friedman: yes, if it's unsaved then we need to see if a tag with such a name exists in the db
12:31:50 <rafa> r_friedman: we don't want to have two tags with the same name
12:31:52 *** dmexs has joined #openmrs
12:31:58 <r_friedman> rafa, i don't know if there's an adjective to describe objects that have gone through the save method but not yet been propagated to the DB, I don't think he's really talking about "transient" objects
12:31:59 *** dmexs has quit IRC
12:35:42 <r_friedman> rafa, this may have to do with the funky equals issue that we've tried to get over with uuid, but not all objects have adopted it
12:40:16 *** dkayiwa has quit IRC
12:42:34 <rafa> r_friedman: it's written that way to allow for adding tags like this: location.addTag(new LocationTag("some_tag")); instead of location.addTag(locationService.getLocationTagByName("some_tag"));
12:43:24 <rafa> r_friedman: the APIException is thrown to prevent Hibernate from throwing it :)
12:43:46 *** jkeiper has quit IRC
12:44:03 *** chopin has joined #openmrs
12:44:08 <r_friedman> rafa, interesting, I will have to chew on that a while
12:44:22 <r_friedman> rafa, one last question if i might
12:44:42 *** chopin is now known as jkeiper
12:45:02 *** ChanServ sets mode: +v jkeiper
12:45:06 <r_friedman> at the pojo level, should the set<collection> method be implemented as a series of .add and .removes rather than an outright replacement?
12:47:46 <rafa> r_friedman: first thing is that you're better of not having settter for collections
12:48:06 <rafa> r_friedman: because someone can put you there a wrong implementation
12:48:22 <rafa> r_friedman: you want to control which implementation you use for your collections
12:48:29 <rafa> r_friedman: especially if they're managed by Hibernate
12:48:42 <rafa> r_friedman: so, yes it's better to have .add, .remove methods
12:48:58 <r_friedman> right, but I thought that hibernate needed getter and setter methods for all properties defined in .hbm
12:49:15 <rafa> r_friedman: not it's better to tell him to use fields directly
12:49:44 <r_friedman> him = hibernate?
12:50:15 <rafa> r_friedman: yes :)
12:50:28 *** summon has joined #openmrs
12:50:47 <r_friedman> rafa, so you would say have add and remove methods for collection properties but not set
12:51:36 <rafa> r_friedman: yes
12:52:07 <r_friedman> rafa, do we need to have a doc page or a developers discussion about this?
12:52:43 <rafa> r_friedman: I've seen plenty of discussions about this in the net :)
12:53:48 <r_friedman> rafa, i'm sure, but we use a lot of technologies, not everyone will have dived deeply on all of them
12:54:47 <r_friedman> rafa, also there is the question of seeing best practices propagate to all objects
12:55:08 <r_friedman> rafa, maybe that's what tickets are for :)
12:56:08 *** finbrein has joined #openmrs
12:56:42 <r_friedman> rafa, it seems so long ago that we decided not to use hash or equals, but maybe my memory fails me, was that a 1.8 thing or a 1.9 thing?
12:57:24 <rafa> r_friedman: we've changed them in 1.9
12:58:18 <r_friedman> rafa, ok, since i've been working with 1.8, maybe that's why I'm encountering this
12:59:16 <rafa> r_friedman: in earlier version you should definitely override them if you extend BaseOpenmrsObject
12:59:49 <rafa> r_friedman: you can just copy implementations from 1.9
12:59:54 <r_friedman> rafa, ok, just use the new methodology
13:00:06 *** mvorobey has joined #openmrs
13:01:07 <mvorobey> hi all
13:01:16 <rafa> hi mvorobey
13:01:19 <r_friedman> rafa, thanks for all the time, it's been very helpful
13:01:33 <rafa> r_friedman: you're welcome
13:12:15 *** jriley has joined #openmrs
13:19:32 *** wyclif has joined #openmrs
13:20:08 *** bwolfe has joined #openmrs
13:20:09 *** ChanServ sets mode: +o bwolfe
13:26:22 *** sgithens has joined #openmrs
13:37:17 *** dkayiwa has joined #openmrs
13:43:06 <mvorobey> bwolfe, hi
13:43:48 <bwolfe> hey
13:44:29 <mvorobey> bwolfe, I've a question on ATOM-7
13:45:23 <mvorobey> bwolfe, It's about performance of AtomFeedUtil.getAtomFeedStream() method. I've implemented it in a way that it takes up to 10 sec to filter about 500 000 of feeds by updated date. Is such delay acceptable?
13:46:07 *** summon_ has joined #openmrs
13:46:18 <bwolfe> mvorobey, that shoudl be fine. does it stop processing once it finds a lower date?
13:46:31 <bwolfe> mvorobey, because you can assume the feeds are sorted by updatedDate
13:46:32 <mvorobey> bwolfe, not yet
13:47:02 <bwolfe> so as soon as you find one that is not after the given date you can stop
13:48:12 <mvorobey> bwolfe, ok, will start looking for entries from end of the entries list and stop if find one that is not after the given date
13:48:40 <bwolfe> yep, perfect
13:49:10 *** summon has quit IRC
13:51:36 *** dawn_ has joined #openmrs
13:52:16 <finbrein> mvorobey: How do you performance test?.thanks.
13:54:19 <mvorobey> finbrein, I just ran the test method couple of times and get average time (also I used temporary sysouts to measure time stamps)
13:54:28 <mvorobey> get = got
13:54:54 <finbrein> mvorobey; ok
13:55:07 <mvorobey> finbrein, np :)
13:55:54 *** dawn_ has quit IRC
14:01:24 <djazayeri> bwolfe: scrum time?
14:01:33 <bwolfe> yes
14:01:40 <bwolfe> dawn asked me to lead it because she has a meeting
14:01:45 <bwolfe> sooo:
14:01:49 <bwolfe> !scrumon bwolfe
14:01:49 * OpenMRSBot says the DAILY SCRUM MEETING is STARTING. This meeting should not last longer than 15 minutes. Please hold other comments until the end of the meeting, or message someone privately. Thank you! ScrumMaster bwolfe- you may begin when ready.
14:02:24 <bwolfe> today's order: rafa, djazayeri, dkayiwa, mvorobey, finbrein, wyclif, bwolfe
14:02:27 <bwolfe> anyone I'm missing?
14:02:32 <rafa> hi
14:02:58 <bwolfe> sgithens, r_friedman, jkeiper, jriley? anyone of you sprint this week?
14:03:01 <wyclif> whew, finally nearly last
14:03:13 <jriley> bwolfe, sorry no
14:03:42 <rafa> Today:
14:03:42 <rafa> * Committed EVNT-8: Fix new/updated object detection
14:03:42 <rafa> https://tickets.openmrs.org/browse/EVNT-8
14:03:42 <rafa> * Started with EVNT-6: Finish void/purge section of GeneralEventAfterAdvice
14:03:42 <rafa> https://tickets.openmrs.org/browse/EVNT-6
14:03:43 <rafa> Blockers: tried to figure out how to test EVNT, it's tricky
14:04:01 <bwolfe> jriley, 2 demerits for you then. luckily you gain 2 bonus points for hanging out in irc anyway so it comes out even. :-)
14:04:37 <bwolfe> why don't I get emails when you do "committed code" ?
14:04:43 <bwolfe> :-(
14:04:43 <jriley> I heard it's where all the cool kids are
14:04:56 <djazayeri> My report
14:05:00 <bwolfe> rafa, yes, it is tricky
14:05:01 <djazayeri> Friday 4-May-2012
14:05:01 <djazayeri> * Work on ITECH project
14:05:01 <djazayeri> * Email about next week's sprint
14:05:01 <djazayeri> * UIFR-22 - Add the ability to do complex initialization of a controller/action method parameter by calling another method
14:05:01 <djazayeri> * Followup fix on UIFR-23 - Configure @Validate function to work properly with existing Openmrs validators
14:05:01 <djazayeri> * Released UI Framework 1.3
14:05:01 <djazayeri> * Released UI Library 1.1
14:05:02 <djazayeri> * Worked on creating a VM with an OpenMRS development environment. Complicated actually!
14:05:09 <djazayeri> Today
14:05:13 <djazayeri> * Work on ITECH project
14:05:24 <bwolfe> rafa, have to do it in actual unit tests probably
14:05:25 <djazayeri> * sprint stuff if asked to do anything specific
14:05:27 <djazayeri> no blockers
14:05:39 <dkayiwa> Some small 1.9 release administration
14:05:40 <dkayiwa> Committed: Use the object modified time - ATOM-2
14:05:40 <dkayiwa> Committed: Add author element in AtomFeedUtil.getEntry - ATOM-9
14:05:40 <dkayiwa> Reviewed and applied patch for: startup error in 1.9 - FACILITY-7 (in order to bribe James with a 1.9 compatible facilitydata module)
14:05:41 <dkayiwa> Applied patch for: Facility Data Module: Error when clicking Data completion and aggregate analysis - FACILITY-13 & FACILITY-11
14:05:41 <dkayiwa> Now working on: Implement ability to accept an asOfDate parameter - ATOM-6
14:05:41 <dkayiwa> No Blockers
14:05:59 *** sgithens has quit IRC
14:06:06 <bwolfe> djazayeri, are you using the vm that yaw did as a starter?
14:06:17 <bwolfe> djazayeri, he had it down to almost a one-click
14:06:26 <djazayeri> bwolfe: no, I'm using a clean Ubuntu 12.04 VM, but that's a good idea.
14:06:31 *** jkeiper has quit IRC
14:06:46 <djazayeri> bwolfe: I don't know if his was a dev VM, and the problem is eclipse and all its stupid plugins.
14:07:11 <bwolfe> djazayeri, his was meant as an impl install option
14:07:16 <bwolfe> no eclipse afaik
14:07:20 <mvorobey> Committed code for ATOM-3
14:07:20 <mvorobey> Work in progress - ATOM-7
14:07:20 <mvorobey> Without blockers
14:07:33 <finbrein> Monday:
14:07:34 <finbrein> Started unit testing AtomFeedUtil.dateToRFC3339 in ATOM-10
14:07:34 <finbrein> !ticket ATOM-10
14:07:34 <finbrein> -- end --
14:07:35 <OpenMRSBot> finbrein: [#ATOM-10] Add unit test for dateToRFC3339 method - OpenMRS JIRA - https://tickets.openmrs.org/browse/ATOM-10
14:07:43 <djazayeri> !ticket atom-3
14:07:45 <djazayeri> !ticket atom-7
14:07:46 <OpenMRSBot> djazayeri: [#ATOM-3] Finish writing the entry to the file in AtomFeedUtil.writeToFeed - OpenMRS JIRA - https://tickets.openmrs.org/browse/atom-3
14:07:47 <OpenMRSBot> djazayeri: [#ATOM-7] Implement AtomFeedUtil.getAtomFeedStream - OpenMRS JIRA - https://tickets.openmrs.org/browse/atom-7
14:08:51 *** chopin_ has joined #openmrs
14:09:00 <djazayeri> wyclif:
14:09:01 <wyclif> friday:
14:09:01 <wyclif> * IRC chat with daniel about TRUNK-3232 - Concept search should display the name containing all word tokens when multiple words are entered
14:09:01 <wyclif> * Created TRUNK-3322, TRUNK-3324, TRUNK-3326
14:09:01 <wyclif> * Completed TRUNK-3316, TRUNK-3317, TRUNK-3315 (Making changes to Order, DrugOrder and added TestOrder to match the new design)
14:09:02 <wyclif> Today:
14:09:04 <wyclif> * EVNT-1 - Add ability for action to be null in Event.subscribe
14:09:06 <wyclif> * EVNT-2 - Finish Event.unsubscribe(Class, Action, Listener)
14:09:08 <wyclif> * Another sprint ticket
14:09:10 <wyclif> Blockers: none
14:09:44 *** jkeiper has joined #openmrs
14:09:53 <bwolfe> last week: at disney world
14:10:02 <bwolfe> Monday
14:10:02 <bwolfe> emails
14:10:02 <bwolfe> reviewed ATOM-3, writeToFeed method
14:10:02 <bwolfe> triaged RESTWS-252
14:10:02 <bwolfe> triaged TRUNK-3327
14:10:04 <bwolfe> commented TRUNK-2644, gp varchar
14:10:11 <bwolfe> more sprint ticket reviews now that I see people have committed
14:10:28 <bwolfe> (opened several ITSM tickets about bugs in our ticket workflow)
14:10:30 <bwolfe> no blockers
14:10:56 <bwolfe> oh, and have another dev interview (or 2?) this afternoon. one of the people we chose had a family emergency
14:11:31 *** bryq has joined #openmrs
14:11:31 *** ChanServ sets mode: +v bryq
14:11:38 <bwolfe> !scrumoff
14:11:38 * OpenMRSBot says the DAILY SCRUM MEETING has ENDED. This channel is now returned to normal hacking operations. Post-scrum meeting follow-up conversations may now begin.
14:11:48 <djazayeri> Discussion topic was Rafal's about how to test?
14:11:51 <bwolfe> discussion points: rafa: how to test?
14:12:29 <rafa> yeah, I've managed to set up the advice to actually execute in unit tests
14:12:56 <djazayeri> dkayiwa: are you certain there's no Committed Code button on FACILITY-7?
14:13:19 <rafa> but I have a problem with testing if the event was actually fired
14:13:21 <dkayiwa> djazayeri: yes
14:13:32 <djazayeri> dkayiwa: odd
14:13:50 <djazayeri> dkayiwa: oh, I know why. It's because it's in Code Review (Initial)
14:14:19 <djazayeri> rafa: why is that?
14:14:26 <djazayeri> Can't you just subscribe to it?
14:15:38 <rafa> djazayeri: I guess I could, but I'm not sure how to play with asserts in the eventlistener
14:15:40 <djazayeri> rafa: and then wait 5 seconds to make sure it fires?
14:16:47 <djazayeri> rafa: I can imagine writing an abstract helper class for the unit tests, such that you do something like
14:17:18 <djazayeri> new EventListenerTest() { public void doTests() throws Exception { // your code here // } }.run();
14:17:46 *** jkeiper_ has joined #openmrs
14:17:47 *** jkeiper has quit IRC
14:17:47 *** chopin_ has quit IRC
14:17:57 *** dawn_ has joined #openmrs
14:18:04 <djazayeri> rafa: that said, you should only do a few integration tests this way; the majority of testing should be actual unit testing, using mocks
14:18:21 *** dawn__ has joined #openmrs
14:18:24 *** dawn_ has quit IRC
14:18:24 *** dawn__ is now known as dawn_
14:21:36 <dkayiwa> dkayiwa: under the workflow button, there is normally a committed code menu item
14:21:42 <dkayiwa> djazayeri: :)
14:21:51 <dkayiwa> djazayeri: the above comment was meant for you
14:22:12 <dkayiwa> djazayeri: do you have the workflow button on that ticket?
14:22:20 <djazayeri> dkayiwa: it's because you're not an "approver" on the FACILITY project
14:22:30 <dkayiwa> djazayeri: oh i see
14:22:40 <dkayiwa> djazayeri: now that makes alot of sense :0
14:23:00 <djazayeri> dkayiwa: mseaton can decide whether or not to add you (and others)
14:23:29 <dkayiwa> djazayeri: no problem. i just wanted to ensure that am not doing something wrong :)
14:24:32 <djazayeri> rafa: I don't know if Andy understood that we're waiting on him for something.
14:24:49 <djazayeri> rafa: as ben says on TRUNK-3296, you should probably clarify, re-ask him the question
14:25:06 <rafa> djazayeri: ok
14:26:04 <djazayeri> brb
14:30:19 <mvorobey> bwolfe, have a minute ?
14:30:33 <bwolfe> mvorobey, maybe even 2 minutes
14:33:11 <mvorobey> bwolfe: I'd like to ask you if we can to prepend atom entries to files rather then append them, in fact we will have the freshest entries on top
14:34:19 *** chopin_ has joined #openmrs
14:34:57 <mvorobey> bwolfe, also it would allow us to use buffered reader for AtomFeedUtil.getAtomFeedStream() method, which seems to me more faster approach then reading whole file into memory and then iterating over it from the end
14:43:28 *** lh has quit IRC
14:43:49 <mvorobey> bwolfe, ... but, from the other hand, it would make entry prepend operations will be slowed down with increasing of the file size
14:44:04 <mvorobey> bwolfe, what can you say on this ?
14:44:10 *** lh has joined #openmrs
14:44:10 *** lh has joined #openmrs
14:44:43 <bwolfe> mvorobey, is it not possible to read from the end?
14:44:45 <djazayeri> bwolfe, mvorobey: I haven't looked at the ticket, code, or design, but do we really want to store the stream in single file?
14:45:16 <mvorobey> bwolfe, it's possible but it's a bit slow
14:45:21 <djazayeri> as opposed to writing each entry as its own file, and indexing them in memory? (and being able to rebuild the index at restart just by scanning the files)
14:45:23 <bwolfe> mvorobey, I think atom feeds are supposed to be stored "most recent entry first"
14:45:48 <bwolfe> djazayeri, define "indexing them"
14:46:02 <bwolfe> djazayeri, I'd rather have 1 file per day instead of 1 file per entry
14:46:24 <bwolfe> but yes, I think I wrote a ticket about separating it somehow (or did I just think of that and then never write it...)
14:46:37 <mvorobey> bwolfe, I agree with this, having something like daily rolling appender is good solution
14:47:01 <djazayeri> bwolfe: Haven't looked at the ticket, code, or design, so if my comment is not helpful, ignore it. :-)
14:48:49 *** dkayiwa has quit IRC
14:49:51 <mvorobey> bwolfe, so, what I'm supposed to do with this ?
14:57:05 <bwolfe> mvorobey, we def want to reverse the feed so that the latest is on top
14:57:22 <bwolfe> mvorobey, and keep entries in their own files per day is a separate ticket
14:57:41 <bwolfe> mvorobey, do you want to create that other ticket, or would you like me to?
14:58:51 <mvorobey> bwolfe, :) go ahead, it would be faster if you'll do it
14:59:22 <bwolfe> ok
14:59:49 <mvorobey> bwolfe, can I change writeToFeed() method now to prepend entries to beginning of the atomfeedfile ?
15:01:15 <bwolfe> yes
15:01:18 <bwolfe> please do
15:02:15 *** jriley has quit IRC
15:03:05 <mvorobey> bwolfe, thanks, can you, please, add me as watcher for new ticket which you is gonna create ?
15:05:56 <bwolfe> sure thing
15:14:14 *** dkayiwa has joined #openmrs
15:23:15 <r_friedman> djazayeri: Darius, should I address a question about BaseDelegatingSubclassHandler to you?
15:28:21 * r_friedman is testing his connection
15:32:19 <bwolfe> r_friedman, your connection is good
15:32:25 *** suranga has joined #openmrs
15:32:25 *** ChanServ sets mode: +v suranga
15:32:30 <bwolfe> but djazayeri said he was going afk a while ago
15:33:21 <r_friedman> tks bwolfe
15:34:04 <djazayeri> r_friedman: you can address it to whomever you want. :-) I'm happy to listen and try to respond
15:34:34 <r_friedman> hey darius, djazayeri
15:34:56 *** finbrein has quit IRC
15:35:00 <r_friedman> when LabOrder extended BaseDelegatingResource, I could do
15:35:04 <r_friedman> Descri.addProperty("auditInfo",findMethod("getAuditInfo"));
15:35:19 <r_friedman> but now findMethod is unfound
15:39:02 <suranga> wellcome back bwolfe !
15:39:10 <suranga> IRC isnt the same without you :)
15:39:23 <wyclif> hi bwolfe
15:40:02 <wyclif> bwolfe, am still not sure how we want to write unit tests in the event module
15:40:18 <wyclif> bwolfe, may be i should look into that a write the first
15:41:10 <r_friedman> wyclif: ooh ooh, multi-threaded test routines!!
15:41:13 <djazayeri> r_friedman: can you use a @PropertyGetter?
15:41:14 <mvorobey> bwolfe, I do believe that https://tickets.openmrs.org/browse/EVNT-13 should be created for atomfeed module rather then for event module :) so it should be called ATOM-X
15:42:35 <r_friedman> djazayeri: i don't know, i'd hate to break whatever convention getAuditInfo is using
15:43:01 <wyclif> r_friedman, it might be a pain to write tests for the event module
15:43:07 <djazayeri> r_friedman: oh, right, that's a method you're not writing...
15:45:24 <djazayeri> r_friedman: in this case you actually want to use the method from the owning resource, right?
15:45:35 <r_friedman> djazayeri: right
15:45:53 <r_friedman> djazayeri: although it should be the same, all my audit functions are delegated to the superclass
15:47:45 <djazayeri> r_friedman: without any code changes to RESTWS, you could do something like the following:
15:48:20 <djazayeri> r_friedman: ((BaseDelegatingResource) getResource()).findMethod("getAuditInfo")
15:49:00 <djazayeri> r_friedman: ideally we'd add findMethod and findMethodOnResource to BaseDelegatingSubclassHandler
15:49:08 <djazayeri> r_friedman: can you create a ticket for that?
15:49:45 <r_friedman> sure. what is getResource(), does that return the superclass resource for a subclass?
15:50:04 *** summon_ has quit IRC
15:50:13 <djazayeri> r_friedman: yes
15:50:14 <djazayeri> /**
15:50:14 <djazayeri> * @return the resource this handler works with
15:50:14 <djazayeri> */
15:50:14 <djazayeri> @SuppressWarnings("unchecked")
15:50:14 <djazayeri> public DelegatingCrudResource<Superclass> getResource() {
15:50:22 <djazayeri> on BaseDelegatingSubclassHandler.
15:50:29 <djazayeri> r_friedman: actually you don't even need to cast
15:50:41 <djazayeri> just getResource().findMethod("getAuditInfo")
15:50:58 <r_friedman> cool
15:50:59 *** dawn_ has quit IRC
15:52:06 <r_friedman> djazayeri: `whoops, findMethod is not public
15:52:15 <mvorobey> bwolfe: have a minute or two ?
15:52:58 <djazayeri> r_friedman: doh!
15:54:44 <djazayeri> r_friedman: the quick-fix from your perspective is to copy the code from findMethod into your own class
15:54:59 <djazayeri> r_friedman: you can put it in a static utility method if you want.
15:55:15 <bwolfe> mvorobey, whats up?
15:55:37 <djazayeri> r_friedman: and the better solution is for the abstract base class to support this
15:56:03 <mvorobey> bwolfe, how can I verify that AtomFeedUtil.getAtomFeedStream() method has worked correctly ? to which things shall I apply assertions ?
15:56:06 <r_friedman> djazayeri: which goes on the ticket
15:56:50 <djazayeri> r_friedman: yes, ticket that, but the workaround is basically:
15:57:06 <djazayeri> Method m = ReflectionUtils.findMethod(getResource().getClass(), "getAuditInfo", (Class<?>[]) null);
15:57:28 <mvorobey> bwolfe, I actually can check that Content Length of mock response is not 0
15:58:17 <bwolfe> mvorobey, test that the header file gets put in
15:58:23 <bwolfe> and that the /feed is there
15:58:36 <bwolfe> and if you can get some entries in and make sure they're there, great!
15:58:57 <mvorobey> bwolfe, ok, will do in this way
15:59:05 <mvorobey> bwolfe, thanks
16:02:19 *** dawn_ has joined #openmrs
16:05:41 *** dkayiwa has quit IRC
16:29:25 <r_friedman> djazayeri: got a minute?
16:29:33 <djazayeri> for you, always
16:29:38 <r_friedman> djazayeri: :))
16:29:41 <djazayeri> well, unless I'm busy
16:29:58 <djazayeri> which I'm not now, so what's up?
16:30:04 <r_friedman> djazayeri: I've been thinking about a generalized query by example capability for rest
16:30:21 <r_friedman> djazayeri: like the many-variabled search functions in the api
16:30:27 <r_friedman> but maybe even hotter
16:30:46 <r_friedman> is it possible to send a body along with a GET?
16:32:20 <djazayeri> r_friedman: as far as I know it's possible, offhand I assume it's bad style, but that's just a guess
16:33:25 <r_friedman> djazayeri: so the basic thought is that you would have a parameter (qbx) and the body would contain statements like <fieldname>: <value> and it would search for equals or starts with
16:33:58 <r_friedman> djazayeri: the advanced thought is to have the body look like query criteria
16:35:13 <rafa> bwolfe: djazayeri do you mind if I make Event less static so that it can be properly mocked for tests?
16:36:21 <djazayeri> rafa: I approve on principle, but I haven't looked at the code
16:36:48 <djazayeri> r_friedman: any reason not to put those in the GET parameters?
16:37:08 <rafa> bwolfe: either a spring bean or a singleton would be much easier to test
16:37:45 <r_friedman> djazayeri: because you have to build a multi-variable search method into the service when it would be easier just to build whatever criteria (or data to build a criteria) are sent
16:41:58 <djazayeri> r_friedman: Any particular reason not to send (escaped) json in a get query parameter though?
16:43:06 <r_friedman> you mean like qbx={[{<variable>,<value>],...}
16:43:18 <djazayeri> r_friedman: yeah.
16:43:42 <djazayeri> r_friedman: I mean: do a google search and see whether GET with body is allowed, and whether it's frowned upon
16:44:01 <djazayeri> if it's okay, fine, but if not, we could always use a query param instead of the body
16:44:07 <r_friedman> ok
16:51:54 <bwolfe> rafa, go for it.
16:57:59 *** finbrein has joined #openmrs
17:05:04 <wyclif> bwolfe, isn't Event.subscribe(Clazz class, ....) supposed to be static?
17:05:23 <bwolfe> unless rafa just changed it ;-)
17:06:00 <wyclif> bwolfe, there are 2 and one is static and the other isn't it
17:07:05 <rafa> bwolfe: wyclif I haven't changed anything yet
17:07:21 <wyclif> rafa, ok
17:07:30 <wyclif> then i will change it to be static
17:07:43 <r_friedman> djazayeri:
17:07:55 <rafa> wyclif: it's fine, I'll change them all to be non static later ;)
17:08:25 <r_friedman> it seems the recommended way is to create a url like /search (compare /catalog) and POST a request to it which results in the creation of a document that can be returned
17:08:54 <wyclif> rafa, ok, thanks
17:09:01 <r_friedman> djazayeri: there is also standard metadata for describing the search, OpenSearch
17:14:56 <mvorobey> !seen mseaton
17:14:56 <OpenMRSBot> mvorobey: mseaton was last seen in #openmrs 4 days, 21 hours, 39 minutes, and 16 seconds ago: <mseaton> jkeiper, i think you can just tag it and move on in trunk. not sure if this module was ever released or not.
17:18:39 *** dawn_ has joined #openmrs
17:27:41 <djazayeri> r_friedman: about LabOrder and getAuditInfo, you can also look at what I did in DrugOrderSubclassHandler, where I actually start from the resource's description, and add to that
17:31:30 <mvorobey> bwolfe: the fastest way to insert a line at the beginning of the text file in java is to create temporary file where to add new line and copy other content from target file. This is what I exactly done there.
17:31:50 <bwolfe> mvorobey, did you google around for that?
17:32:06 <bwolfe> to make sure there isn't some library that does it in a special way thats faster?
17:32:47 <mvorobey> bwolfe, yep, it was the fastest solution that i ever found on google
17:33:15 <bwolfe> interesting. I guess thats the downside of using files. no prepending. :-/
17:33:50 <mvorobey> bwolfe, I measured performance for 3mb sized file and it took only 80 ms to prepend entry
17:34:39 <bwolfe> hmm, ok. I guess thats fast enough. :-p
17:35:04 <mvorobey> bwolfe, :D
17:35:29 *** dawn_ has quit IRC
17:40:37 <r_friedman> djazayeri: yes, i saw that, but I was concerned about order of output
17:41:02 <djazayeri> r_friedman: order of properties? okay...
17:41:14 <djazayeri> r_friedman: anyway, just had the thought, wanted to pass it along
17:41:31 *** r0bby has joined #openmrs
17:41:31 *** ChanServ sets mode: +v r0bby
17:45:04 *** robbyoconnor has quit IRC
17:56:35 <r_friedman> djazayeri: tks
18:24:44 <mvorobey> bwolfe: are you there ?
18:27:57 <OpenMRSBot> Recent updates in the world of openmrs: OpenMRS Modules: App Framework Module 1.0 uploaded to OpenMRS Module Repository <https://dev.openmrs.org/modules/view.jsp?module=appframework&ampversion=&amp1.0>
18:33:50 <finbrein> bwolfe: ping
18:37:31 <r_friedman> !polishsausage bwolfe
18:37:32 <OpenMRSBot> r_friedman: Error: "polishsausage" is not a valid command.
18:37:54 <r_friedman> !kielbasa bwolfe
18:37:55 <OpenMRSBot> r_friedman: Error: "kielbasa" is not a valid command.
18:37:55 <finbrein> djazayeri: Are the two definitions in ATOM-10, the only ones that need to be unit tested? Or is it arbitrary? Added a comment to the page.
18:38:21 <djazayeri> finbrein: ask bwolfe, he's leading the sprint
18:38:44 <r_friedman> djazayeri: subclass handler can't have a subresource
18:38:58 <r_friedman> subresource requires inheritance from resource
18:39:06 <finbrein> djazayeri: I don't think he is in or around right now.
18:40:48 <djazayeri> finbrein: okay, well, if he doesn't reply in an hour, ask rafa or wyclif
18:41:00 <finbrein> ok
18:41:55 <djazayeri> r_friedman: can you email and/or create a ticket with the URIs and methods you want to support?
18:42:51 <finbrein> wyclif, rafa: What do you think? The tests are ready just want to clarify. If you can take a look right now.
18:43:25 <wyclif> finbrein, which ticket?
18:43:49 <finbrein> ATOM-10
18:43:49 <finbrein> !ticket ATOM-10
18:43:50 <OpenMRSBot> finbrein: [#ATOM-10] Add unit test for dateToRFC3339 method - OpenMRS JIRA - https://tickets.openmrs.org/browse/ATOM-10
18:50:52 *** bob___ has joined #openmrs
19:06:45 *** summon has joined #openmrs
19:08:30 *** mvorobey has quit IRC
19:14:44 *** sgithens has joined #openmrs
19:14:47 *** jkeiper_ has quit IRC
19:17:37 *** chopin_ has quit IRC
19:19:05 *** summon_ has joined #openmrs
19:19:11 <bwolfe> finbrein, was on a call.
19:19:15 * bwolfe looks now
19:19:43 *** james_regen has quit IRC
19:21:31 *** summon has quit IRC
19:42:25 *** rafa has quit IRC
19:56:51 *** summon__ has joined #openmrs
19:57:31 *** summon__ is now known as summon
20:00:05 *** summon_ has quit IRC
20:00:30 *** summon has quit IRC
20:19:06 *** bryq has quit IRC
20:24:58 *** Mkop has quit IRC
20:35:32 *** suranga has quit IRC
20:41:20 <wyclif> hi bwolfe
20:47:32 *** Mkop has joined #openmrs
20:47:32 *** ChanServ sets mode: +v Mkop
20:47:33 <bwolfe> hi wyclif
20:48:16 <wyclif> for EVNT-3, do you an idea of how we want to implement this? Seems like that is no direct way to unsubscribe a non durable subscriber
20:56:48 *** downey has joined #openmrs
20:56:48 *** ChanServ sets mode: +o downey
20:56:48 *** OpenMRSBot sets mode: +o downey
20:59:38 <bwolfe> !ticket EVNT-3
20:59:39 <OpenMRSBot> bwolfe: [#EVNT-3] Finish EVNT.unsubscribe(String, EventListener) - OpenMRS JIRA - https://tickets.openmrs.org/browse/EVNT-3
21:00:35 <bwolfe> wyclif, are there no calls to unsubscribe? or do you have to iterate over all subscribers and find the one that matches?
21:00:48 <bwolfe> (match on package+class name is fine)
21:03:20 <wyclif> bwolfe, i can't believe there is no single method for unsubscribing, and i dont see to see a way to get all subcriptions
21:03:37 <bwolfe> wyclif, there is always a way
21:03:54 <bwolfe> google for it. "jms unsubscribe" or "jms get all subscribers"
21:05:02 *** sgithens has quit IRC
21:05:32 <wyclif> bwolfe, i have googling for ways and dont seem to see any, looks like we have to maintain our own list of subscriptions and then call close on it
21:05:50 <wyclif> on the one we wish to remove
21:23:06 <bwolfe> wyclif, perhaps this? http://activemq.apache.org/advisory-message.html
21:23:10 <OpenMRSBot> <http://ln-s.net/$9qF> (at activemq.apache.org)
21:25:32 <wyclif> will look at, thanks
21:25:39 *** downey has quit IRC
21:27:35 *** dawn_ has joined #openmrs
21:28:33 *** dawn_ has quit IRC
21:29:57 *** wyclif has quit IRC
21:33:01 *** downey has joined #openmrs
21:33:01 *** OpenMRSBot sets mode: +o downey
21:33:20 *** ChanServ sets mode: +o downey
21:57:23 *** r_friedman has quit IRC
22:04:57 *** downey has quit IRC
22:12:55 *** downey has joined #openmrs
22:12:55 *** ChanServ sets mode: +o downey
22:12:55 *** OpenMRSBot sets mode: +o downey
22:23:02 <r0bby> Hey All!
22:45:44 *** wyclif has joined #openmrs
22:46:59 *** downey has quit IRC
22:55:07 *** r0bby is now known as robbyoconnor