Re: [Evolution-hackers] Address book merging
On Thu, 2015-02-19 at 12:49 -0300, Renato Araujo wrote: > I have a small backend[1] with only the constructor function > implemented where I try to start a view from others sources to > confirm the problem. Should I report a bug or I am doing something > wrong on my code? Hi, please do not top-post, and trim the reply as appropriate here. Thanks. I briefly read your e-book-backend-aggregator.c and I do not see anything obviously odd there. The best step forward would be to install debuginfo package for evolution-data-server and reproduce the block of the e_book_client_view_start(), then get a backtrace of the running (currently blocked) evolution-addressbook-factory process, to see where it got stock and eventually figure out why. One way of getting the backtrace is for example with this command: $ gdb --batch --ex "t a a bt" -pid=PID &>bt.txt where PID can be `pidof evolution-addressbook-factory` Bye, Milan ___ evolution-hackers mailing list evolution-hackers@gnome.org To change your list options or unsubscribe, visit ... https://mail.gnome.org/mailman/listinfo/evolution-hackers
Re: [Evolution-hackers] Address book merging
Hi Milan, Thanks for the information, the e-cal-backend-contactsc.c looks very similar to what I am trying to implement. I tried the approach used on it to load contacts sources but did not work very well with my Addressbook source. After click in source on evolution, all others sources stop to work, looks like it is blocking the EDS main thread but I am not able to find a way to avoid that. What I can say is that, the block only happen if I call "e_book_client_view_start" if I comment this call out the others address books works nice. I tried call it from a thread like the calendar backend does but I got the same problem. Maybe because I am implementing a AddressBook backend and the "Birthdays & Anniversaries " is a calendar backend (just a guess). I have tried a lot of different ways to call "e_book_client_view_start" (idle functions, threads, timeout functions) none of that works, and I do not find another way to check for contacts changes without use a view, and I am not sure how I can use this function inside of my backend implementation. I have a small backend[1] with only the constructor function implemented where I try to start a view from others sources to confirm the problem. Should I report a bug or I am doing something wrong on my code? Thanks again Renato [1] https://github.com/renatofilho/evolution-source/tree/master/src Renato Araujo Oliveira Filho On Thu, Feb 19, 2015 at 4:00 AM, Milan Crha wrote: > On Wed, 2015-02-18 at 16:30 -0300, Renato Araujo wrote: > > Could you guys help me with that? > > Hi, > I wasn't sure what kind of merge you have on mind. I can think of a > real contact merge, like when adding a new contact to an address book > and searching for a similar contact (like based on e-mail) and > eventually ask a user to merge the newly added contact with an already > existing. Or, the other merge kind, is to gather contacts from > multiple books and show them all in one long list (I have configured > really many books, and some contains thousands of contacts, thus your > application should count with it; there are also company books with > hundreds of thousands of contacts). > > I then realized, after reading your email, that you most likely need > to do the second kind of the merge, provide contacts from multiple > books in once source. > > > Is this idea too crazy? > > No, it isn't. > > > Do you have any other idea to have contact from different address- > > book merged in EDS? > > It's what the ENameSelector from evolution does. It's used for auto- > completion and it picks all books configured to be part of the auto- > completion and searches for available contacts in all these books at > once. Check the ENameSelectorEntry [1] and EContactStore [2], the > later is that what gathers contacts from the books. > > > Is possible to use client API inside of the backend implementation? > > (How?) > > Yes, it is. Check the Birthdays & Anniversaries calendar code [3], it > also uses books. It can be a little issue to ask for clients in the > server side which provides those clients (you ask to open a book in a > book backend, which wants to talk to the book factory, thus to > itself). You might be also careful which thread you block with your > client open. If you block the main thread of the factory, then any > attempt to contact it, by any client, will cause timeouts. > > > Which is the best solution to get access to others addressbook from > > my backend implemation? > > > > See the answer for the previous question. > > Hope it helps, > Milan > > [1] > https://git.gnome.org/browse/evolution/tree/e-util/e-name-selector-entry.c > [2] https://git.gnome.org/browse/evolution/tree/e-util/e-contact-store.c > [3] > https://git.gnome.org/browse/evolution-data-server/tree/calendar/backends/contacts/e-cal-backend-contacts.c > ___ > evolution-hackers mailing list > evolution-hackers@gnome.org > To change your list options or unsubscribe, visit ... > https://mail.gnome.org/mailman/listinfo/evolution-hackers > ___ evolution-hackers mailing list evolution-hackers@gnome.org To change your list options or unsubscribe, visit ... https://mail.gnome.org/mailman/listinfo/evolution-hackers
Re: [Evolution-hackers] Address book merging
On Wed, 2015-02-18 at 16:30 -0300, Renato Araujo wrote: > Could you guys help me with that? Hi, I wasn't sure what kind of merge you have on mind. I can think of a real contact merge, like when adding a new contact to an address book and searching for a similar contact (like based on e-mail) and eventually ask a user to merge the newly added contact with an already existing. Or, the other merge kind, is to gather contacts from multiple books and show them all in one long list (I have configured really many books, and some contains thousands of contacts, thus your application should count with it; there are also company books with hundreds of thousands of contacts). I then realized, after reading your email, that you most likely need to do the second kind of the merge, provide contacts from multiple books in once source. > Is this idea too crazy? No, it isn't. > Do you have any other idea to have contact from different address- > book merged in EDS? It's what the ENameSelector from evolution does. It's used for auto- completion and it picks all books configured to be part of the auto- completion and searches for available contacts in all these books at once. Check the ENameSelectorEntry [1] and EContactStore [2], the later is that what gathers contacts from the books. > Is possible to use client API inside of the backend implementation? > (How?) Yes, it is. Check the Birthdays & Anniversaries calendar code [3], it also uses books. It can be a little issue to ask for clients in the server side which provides those clients (you ask to open a book in a book backend, which wants to talk to the book factory, thus to itself). You might be also careful which thread you block with your client open. If you block the main thread of the factory, then any attempt to contact it, by any client, will cause timeouts. > Which is the best solution to get access to others addressbook from > my backend implemation? > See the answer for the previous question. Hope it helps, Milan [1] https://git.gnome.org/browse/evolution/tree/e-util/e-name-selector-entry.c [2] https://git.gnome.org/browse/evolution/tree/e-util/e-contact-store.c [3] https://git.gnome.org/browse/evolution-data-server/tree/calendar/backends/contacts/e-cal-backend-contacts.c ___ evolution-hackers mailing list evolution-hackers@gnome.org To change your list options or unsubscribe, visit ... https://mail.gnome.org/mailman/listinfo/evolution-hackers
[Evolution-hackers] Address book merging
Hi guys, I am using EDS as my contact/calendar data server and I am implementing QtPim plugins for it. Until now everything is working fine. We are about to start implement a new feature on our applications that is contact Merging. Our first idea was implement all contact merging logic in the QtContact plugins, but after some discussion we figured out that is not flexible (Python, DBus, Go apps, will not have access to this logic); And this can be very expensive (running contact merge in every client). Then I only see two solutions: 1- Implement a contact merge service, that will provide contacts for apps. The apps will access our server instead of EDS. 2 - Implement contact merge into EDS. The problem with option 1 is: * We will have a new server running on the device (more memory and cpu usage); * The apps that already support EDS will need to be modified to access our server if they want to get the merged contact information; * More code to fix and implement. In my point of view the option two is perfect, BUT. EDS is very complex and I do no see a easy way to do that. * Since I am not familiar with EDS core code (I have been using the client code for a while). My first idea was create a address book backend that aggregate all others backends contacts, and does the merge itself, applications can access this "meta" address-book to have the merged contacts. The good points of this approach is that, this does not change anything on EDS core, and I can maintain the code by myself. * But I found some problems trying to use eds client API inside of the backend implementation (I think this is not correct way to use it), the functions like (e_book_client_connect, e_book_client_get_view, e_bok_client_view_start) did not work as expected (they got stuck "timeout" or return errors). Could you guys help me with that? Is this idea too crazy? Do you have any other idea to have contact from different address-book merged in EDS? Is possible to use client API inside of the backend implementation? (How?) Which is the best solution to get access to others addressbook from my backend implemation? Thanks Renato Araujo Oliveira Filho ___ evolution-hackers mailing list evolution-hackers@gnome.org To change your list options or unsubscribe, visit ... https://mail.gnome.org/mailman/listinfo/evolution-hackers