Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
Ğ Groups Home
Problem with boss_news and boss_db
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  9 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Jose Luis Gordo Romero  
View profile  
 More options Feb 9, 2:38 pm
From: Jose Luis Gordo Romero <jgor...@gmail.com>
Date: Thu, 9 Feb 2012 20:38:05 +0100
Local: Thurs, Feb 9 2012 2:38 pm
Subject: Problem with boss_news and boss_db

Hi,

I'm having problems with boss_news, I declared in the init the following:

init() ->
    {ok, Acty} = boss_news:watch("modelxs",
        fun (created, X) ->
            {ok, ActyC} = activities:add(X)
        end),
    {ok, [Acty]}.

activities:add(X) only adds a new record to a different model.

When a record is inserted in modelx, the run_after_hooks timeouts:

** exception exit: {timeout,{gen_server,call,
                                        [{global,boss_news},
                                         {created,"modelx-43",
                                                  [{id,"modelx-43"},
                                                   .....

 {created_time,{1328,815623,280614}},

 {updated_time,{1328,815623,280614}}]}]}}
     in function  gen_server:call/2 (gen_server.erl, line 180)
     in call from boss_record_lib:run_after_hooks/3
(src/boss/boss_record_lib.erl, line 11)
     in call from boss_db:save_record/1 (src/boss/boss_db.erl, line 195)

Only happens when creates a new boss_db record inside the boss_new:wath/2
fun, I'm in a multiapp setup (but started-dev from the app containing the
init watches) and working with one node (dev).

The funny thing is that the new record is created, but the timeout+restart
makes this ugly.

Any thoughts?

Thanks!

--
Jose Luis Gordo Romero
@jgordor <http://twitter.com/jgordor> - http://www.freemindsystems.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Evan Miller  
View profile  
 More options Feb 9, 3:22 pm
From: Evan Miller <emmil...@gmail.com>
Date: Thu, 9 Feb 2012 14:22:15 -0600
Local: Thurs, Feb 9 2012 3:22 pm
Subject: Re: Problem with boss_news and boss_db

I think the problem is that the boss_news process is executing the callback, but the callback then sends a message to boss_news => deadlock. This is a design flaw. We need worker processes to execute the callbacks instead

Sent from my iPhone

On Feb 9, 2012, at 13:38, Jose Luis Gordo Romero <jgor...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jose Luis Gordo Romero  
View profile  
 More options Feb 10, 2:21 am
From: Jose Luis Gordo Romero <jgor...@gmail.com>
Date: Fri, 10 Feb 2012 08:21:41 +0100
Local: Fri, Feb 10 2012 2:21 am
Subject: Re: Problem with boss_news and boss_db

Thanks Evan,

A good moment to start using https://github.com/devinus/poolboy ?

--
Jose Luis Gordo Romero
@jgordor <http://twitter.com/jgordor> - http://www.freemindsystems.com

2012/2/9 Evan Miller <emmil...@gmail.com>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
douglas  
View profile  
 More options Feb 10, 6:43 am
From: douglas <dvdou...@gmail.com>
Date: Fri, 10 Feb 2012 06:43:44 -0500
Local: Fri, Feb 10 2012 6:43 am
Subject: Re: Problem with boss_news and boss_db

On 2/10/2012 2:21 AM, Jose Luis Gordo Romero wrote:

In the spirit of ChicagoBoss , why not call the ORM dempster_diver

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Evan Miller  
View profile  
 More options Feb 10, 12:19 pm
From: Evan Miller <emmil...@gmail.com>
Date: Fri, 10 Feb 2012 11:19:01 -0600
Local: Fri, Feb 10 2012 12:19 pm
Subject: Re: Problem with boss_news and boss_db
On Fri, Feb 10, 2012 at 1:21 AM, Jose Luis Gordo Romero

<jgor...@gmail.com> wrote:
> Thanks Evan,

> A good moment to start using https://github.com/devinus/poolboy ?

Not necessarily. We might want an unlimited number of workers created
on-demand rather than a fixed pool size.

I'll try to look into fixing the process model of all of CB's services
this weekend.

Evan

--
Evan Miller
http://www.evanmiller.org/

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jose Luis Gordo Romero  
View profile  
 More options Feb 10, 1:33 pm
From: Jose Luis Gordo Romero <jgor...@gmail.com>
Date: Fri, 10 Feb 2012 19:33:08 +0100
Local: Fri, Feb 10 2012 1:33 pm
Subject: Re: Problem with boss_news and boss_db

This sounds amazing!

--
Jose Luis Gordo Romero
@jgordor <http://twitter.com/jgordor> - http://www.freemindsystems.com

2012/2/10 Evan Miller <emmil...@gmail.com>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
douglas  
View profile  
 More options Feb 10, 1:48 pm
From: douglas <dvdou...@gmail.com>
Date: Fri, 10 Feb 2012 13:48:44 -0500
Local: Fri, Feb 10 2012 1:48 pm
Subject: Re: Problem with boss_news and boss_db

On 2/10/2012 1:33 PM, Jose Luis Gordo Romero wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Evan Miller  
View profile  
 More options Feb 10, 10:26 pm
From: Evan Miller <emmil...@gmail.com>
Date: Fri, 10 Feb 2012 21:26:14 -0600
Local: Fri, Feb 10 2012 10:26 pm
Subject: Re: Problem with boss_news and boss_db
Try this

https://github.com/evanmiller/boss_db/commit/8076dda5a23bb4e174e62260...

There are also some UNTESTED poolboy commits in there, but I think the
above patch will solve the BossNews deadlock you encountered.

--
Evan Miller
http://www.evanmiller.org/

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jose Luis Gordo Romero  
View profile  
 More options Feb 11, 3:30 am
From: Jose Luis Gordo Romero <jgor...@gmail.com>
Date: Sat, 11 Feb 2012 09:30:05 +0100
Local: Sat, Feb 11 2012 3:30 am
Subject: Re: Problem with boss_news and boss_db

Hi,

I'm not tested all the app, but I can confirm that the commit solves the
deadlock.

Terrific!

--
Jose Luis Gordo Romero
@jgordor <http://twitter.com/jgordor> - http://www.freemindsystems.com

2012/2/11 Evan Miller <emmil...@gmail.com>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »