weblocks clsql demo current status (not working)

85 views
Skip to first unread message

Metacraft

unread,
Apr 4, 2012, 7:12:47 PM4/4/12
to weblocks
I need to know the current status of weblocks + clsql status as of
March/April 2012 with respect to fluid/multi-threading?

I can partially run weblocks-clsql-demo only by removing the fluid
reference and direct clsql connect (although I do run into internal
error when adding employees or companies on the web demo). With the
original source (clsql+fluid) I get defmethod missing error on
database-type(clsql-sys:conn-pool). Direct CLSQL works (can create
database tables etc).

I have read about all of the dozens of the forum articles and page
that I could search on this topic. But there is no clear conclusion
(the discussion about clsql vs fluid regarding thread safety is one or
two years old). Then there are recommendations from CLSQL site about
not using fluid. Is there a version of weblocks mysql store that is
thread-safe and works (with or without fluid)?

I have tried weblocks-clsql-demo both on MacOS and on linux centos 5
using quicklisp downloads (that installed
weblocks-20120305-git clsql-20120305-git and clsql-fluid-20110730-
darcs - at least that is the name of its installed directories).
Running SBCL 1.0.51 compiled with threading enabled.

I really want to use weblocks for a production site, but need to use a
legacy mysql database. Any comments or suggestions will be greatly
appreciated. Is there any unfinished or TO-DO work in this area that
volunteers can help?


Thanks,

Scott L. Burson

unread,
Apr 4, 2012, 8:27:14 PM4/4/12
to webl...@googlegroups.com
On Wed, Apr 4, 2012 at 4:12 PM, Metacraft <an9...@gmail.com> wrote:
I need to know the current status of weblocks + clsql status as of
March/April 2012 with respect to fluid/multi-threading?

I am using Weblocks and CLSQL in an app that is... well, not quite in production use yet, but will be in a few weeks.  I haven't tried the demo in a long time, and don't recall what state it's in, but my app seems to be working fine.

There are some useful patches in my public Weblocks repo, which I don't think have been merged into the official one yet.  Take a look: https://github.com/slburson/weblocks
 
I have read about all of the dozens of the forum articles and page
that I could search on this topic. But there is no clear conclusion
(the discussion about clsql vs fluid regarding thread safety is one or
two years old). Then there are recommendations from CLSQL site about
not using fluid. Is there a version of weblocks mysql store that is
thread-safe and works (with or without fluid)?

I've only tested my app under light load yet, but as far as I can tell, it is thread-safe (I am using CLSQL-Fluid).  It definitely was not thread-safe when I was not using CLSQL-Fluid -- I thought I had an alternative approach that would work, but it didn't.  I definitely recommend using CLSQL-Fluid. I think the objections to it are mistaken.

Oh, I am using Postgres rather than MySQL, so I can't be so sure the latter works, but I don't know any reason it wouldn't.

-- Scott

Leslie P. Polzer

unread,
Apr 5, 2012, 2:23:22 AM4/5/12
to webl...@googlegroups.com
I can confirm that these patches are still unmerged as of yet, unfortunately.

Volunteer work that tests these patches in their environment and reviews some of the code would speed up the process.

Leslie

ashar

unread,
Apr 5, 2012, 4:18:34 AM4/5/12
to webl...@googlegroups.com


On Wednesday, April 4, 2012 5:27:14 PM UTC-7, Scott L. Burson wrote:


There are some useful patches in my public Weblocks repo, which I don't think have been merged into the official one yet.  Take a look: https://github.com/slburson/weblocks
 

Using the code from the above branch, I get the same generic function argument error (#2 below).

1) Error: Undefined hunchentoot log-message  in server.lisp
Commented it out.

2)
weblocks-clsql-demo with  MySQL 

There is no applicable method for the generic function
  #<STANDARD-GENERIC-FUNCTION CLSQL-SYS:DATABASE-TYPE (3)>
when called with arguments
  (#<CLSQL-SYS:CONN-POOL {1003716501}>).
   [Condition of type SIMPLE-ERROR]

Restarts:
  0: [RETRY] Retry calling the generic function.
  1: [TERMINATE-THREAD] Terminate this thread (#<THREAD "Processing action" RUNNING {10055C7741}>)

Backtrace:
  0: ((FLET SWANK-BACKEND:CALL-WITH-DEBUGGING-ENVIRONMENT) #<FUNCTION (LAMBDA #) {10038290B9}>)
  1: (SWANK::DEBUG-IN-EMACS #<SIMPLE-ERROR "~@<There is no applicable method for the generic function ~2I~_~S~\n          ~I~_when called with arguments ~2I~_~S.~:>" {1005667B31}>)
  2: (SWANK-BACKEND::CALL-WITH-BREAK-HOOK #<FUNCTION SWANK:SWANK-DEBUGGER-HOOK> #<CLOSURE (LAMBDA #) {1005667D99}>)
  3: ((FLET SWANK-BACKEND:CALL-WITH-DEBUGGER-HOOK) #<FUNCTION SWANK:SWANK-DEBUGGER-HOOK> #<CLOSURE (LAMBDA #) {1005667D99}>)
  4: (SWANK::CALL-WITH-BINDINGS ..)
  5: (SWANK:INVOKE-SLIME-DEBUGGER #<SIMPLE-ERROR "~@<There is no applicable method for the generic function ~2I~_~S~\n          ~I~_when called with arguments ~2I~_~S.~:>" {1005667B31}>)
  6: (SWANK-BACKEND::CALL-WITH-BREAK-HOOK #<FUNCTION SWANK:SWANK-DEBUGGER-HOOK> #<CLOSURE (LAMBDA #) {1005667D59}>)
  7: ((FLET SWANK-BACKEND:CALL-WITH-DEBUGGER-HOOK) #<FUNCTION SWANK:SWANK-DEBUGGER-HOOK> #<CLOSURE (LAMBDA #) {1005667D59}>)
  8: (SWANK:SWANK-DEBUGGER-HOOK ..)
  9: (SB-DEBUG::RUN-HOOK *DEBUGGER-HOOK* #<SIMPLE-ERROR "~@<There is no applicable method for the generic function ~2I~_~S~\n          ~I~_when called with arguments ~2I~_~S.~:>" {1005667B31}>)
 10: (INVOKE-DEBUGGER #<SIMPLE-ERROR "~@<There is no applicable method for the generic function ~2I~_~S~\n          ~I~_when called with arguments ~2I~_~S.~:>" {1005667B31}>)
 11: ((FLET #:LAMBDA21) #<SIMPLE-ERROR "~@<There is no applicable method for the generic function ~2I~_~S~\n          ~I~_when called with arguments ~2I~_~S.~:>" {1005667B31}>)
 12: (SIGNAL #<SIMPLE-ERROR "~@<There is no applicable method for the generic function ~2I~_~S~\n          ~I~_when called with arguments ~2I~_~S.~:>" {1005667B31}>)
 13: (ERROR ..)
 14: ((SB-PCL::FAST-METHOD NO-APPLICABLE-METHOD (T)) #<unused argument> #<unused argument> #<STANDARD-GENERIC-FUNCTION CLSQL-SYS:DATABASE-TYPE (3)> #<CLSQL-SYS:CONN-POOL {1003716501}>)
 15: (SB-PCL::CALL-NO-APPLICABLE-METHOD #<STANDARD-GENERIC-FUNCTION CLSQL-SYS:DATABASE-TYPE (3)> (#<CLSQL-SYS:CONN-POOL {1003716501}>))
 16: ((SB-PCL::FAST-METHOD CLSQL-SYS:DATABASE-ACQUIRE-FROM-CONN-POOL (T)) #<unavailable argument> #<unavailable argument> #<CLSQL-SYS:CONN-POOL {1003716501}>)
 17: (CLSQL-SYS::FLUID-SUB-DATABASE #<error printing object>)
 18: ((SB-PCL::FAST-METHOD CLSQL-SYS:DATABASE-UNDERLYING-TYPE (CLSQL-SYS:FLUID-DATABASE)) #<error printing object>)
 19: ((SB-PCL::FAST-METHOD CLSQL-SYS::OUTPUT-SQL-HASH-KEY (CLSQL-SYS:SQL-IDENT-ATTRIBUTE T)) #<error printing object>)

Metacraft

unread,
Apr 7, 2012, 11:05:01 AM4/7/12
to webl...@googlegroups.com


On Wednesday, April 4, 2012 5:27:14 PM UTC-7, Scott L. Burson wrote:
On Wed, Apr 4, 2012 at 4:12 PM, Metacraft  wrote:
I need to know the current status of weblocks + clsql status as of
March/April 2012 with respect to fluid/multi-threading?

I am using Weblocks and CLSQL in an app that is... well, not quite in production use yet, but will be in a few weeks.  I haven't tried the demo in a long time, and don't recall what state it's in, but my app seems to be working fine.

There are some useful patches in my public Weblocks repo, which I don't think have been merged into the official one yet.  Take a look: https://github.com/slburson/weblocks
  

Scott,

I get the same generic method missing error when using your latest branch of weblocks above:

There is no applicable method for the generic function
  #<STANDARD-GENERIC-FUNCTION CLSQL-SYS:DATABASE-TYPE (3)>
when called with arguments
  (#<CLSQL-SYS:CONN-POOL

Is there a private clsql-fluid you are using that may have fixed this. The repository that we get from quicklisp still has to be modified to change the function names release-to-conn-pool and acquire-from-conn-pool to database-release-to-conn-pool and database-acquire-from-conn-pool respectively in fluid.lisp

Thanks.

-ashar



Scott L. Burson

unread,
Apr 8, 2012, 11:50:37 PM4/8/12
to webl...@googlegroups.com
On Sat, Apr 7, 2012 at 8:05 AM, Metacraft <an9...@gmail.com> wrote:

Is there a private clsql-fluid you are using that may have fixed this. The repository that we get from quicklisp still has to be modified to change the function names release-to-conn-pool and acquire-from-conn-pool to database-release-to-conn-pool and database-acquire-from-conn-pool respectively in fluid.lisp


Oh right, I forgot that some small changes were needed to CLSQL-Fluid.  But the changes you describe are not exactly what I have.  I have changed RELEASE-TO-CONN-POOL to RELEASE-TO-POOL, and

  (acquire-from-conn-pool  (sub-pool fd))

to

  (acquire-from-pool nil nil (sub-pool fd))

See if that does it for you.

-- Scott

o_z

unread,
Jul 28, 2012, 3:08:50 PM7/28/12
to webl...@googlegroups.com
Here is clsql-fluid with changes submitted, hope nothing is missed, works for me 
https://github.com/html/clsql-fluid

четверг, 5 апреля 2012 г., 2:12:47 UTC+3 пользователь Metacraft написал:
Reply all
Reply to author
Forward
0 new messages