[Opa] Opa 9.0.1 with mongodb
Tristan Sloughter
tristan.sloughter at gmail.com
Wed May 2 15:46:44 UTC 2012
local
On Wed, May 2, 2012 at 10:39 AM, Quentin Bourgerie <
quentin.bourgerie at mlstate.com> wrote:
> **
> I just make some tests on your application.
>
> Your opado_old db3 is local or remote?
>
>
> On 05/02/2012 03:56 PM, Tristan Sloughter wrote:
>
> Now I can attempt to move all data from db3 to Mongo. I know you wrote in
> an email before that something like:
>
> /mongo <- /db3
>
> Was possible. But I couldn't get anything working. I tried like:
>
> /opado/users <- /opado_old/users
>
> Thanks,
> Tristan
>
> On Wed, May 2, 2012 at 8:36 AM, Tristan Sloughter <
> tristan.sloughter at gmail.com> wrote:
>
>> Ugh, sorry. I had Opa installed once with the .deb (an older version) and
>> again with the newest version by the runs script. It was using the old one.
>>
>> Now that I've uninstalled the .deb version everything works!
>>
>> Thanks!
>>
>>
>> On Wed, May 2, 2012 at 6:43 AM, Quentin Bourgerie <
>> quentin.bourgerie at mlstate.com> wrote:
>>
>>> Strange are you sure you use the build 1591 (opa --version)?
>>> The commit which repairs your issue is
>>> 84a2bf0e2bc24ce9aff45ac99e41fa78873c0a9d.
>>>
>>> The following code should compile since build 1531
>>>
>>> type User.t = {
>>> int a,
>>> string ref,
>>> string username,
>>> string fullname,
>>> string password,
>>> bool is_oauth,
>>> }
>>>
>>> type Todo.t = {
>>> string id,
>>> string useref,
>>> string value,
>>> bool done,
>>> string created_at
>>>
>>> }
>>>
>>> database opado_old @db3 {
>>> User.t /users[{ref}]
>>> /users[_]/is_oauth = false
>>> Todo.t /todos[{id}]
>>> /todos[_]/done = false
>>> // Default value for string is "" (empty string)
>>> }
>>>
>>> database opado @mongo {
>>> User.t /users[{ref}]
>>> /users[_]/is_oauth = false
>>> Todo.t /todos[{id}]
>>> /todos[_]/done = false
>>> // Default value for string is "" (empty string)
>>> }
>>>
>>> On 05/01/2012 01:45 AM, Tristan Sloughter wrote:
>>>
>>> I'm now trying to use opa_0.9.2s4+build1591_amd64 and the same problem
>>> still exists.
>>>
>>> I don't believe I ever got it working with an earlier version either.
>>>
>>> Any ideas?
>>>
>>> Thanks,
>>> Tristan
>>>
>>> On Fri, Mar 23, 2012 at 6:31 AM, Quentin Bourgerie <
>>> quentin.bourgerie at mlstate.com> wrote:
>>>
>>>> Hello Tristan,
>>>>
>>>> Thanks for the reporting, I just pushed a patch.
>>>> Should be built in the next nightly (>= 1520)
>>>>
>>>> Best Quentin.
>>>>
>>>> On 03/22/2012 12:43 AM, Tristan Sloughter wrote:
>>>>
>>>> Thanks. I modified type.opa in OpaDo to have a db3 database as well as
>>>> a mongo db as I show below. But compiling fails with this addition:
>>>>
>>>> *Error*
>>>> An internal error has occurred during the pass EarlyLambdaLifting
>>>> Uncaught Exception:
>>>> Failure("get_tsc: cannot find _v0_opado in gamma")
>>>> Backtrace:
>>>> Raised at file "pervasives.ml", line 22, characters 22-33
>>>> Called from file "list.ml", line 57, characters 20-23
>>>> Called from file "list.ml", line 74, characters 24-34
>>>> Called from file "list.ml", line 0, characters 0-0
>>>>
>>>> Saving the current environment for report (opatrack) ...
>>>>
>>>> *Database definitions:*
>>>>
>>>> database opado_old @db3 {
>>>> User.t /users[{ref}]
>>>> /users[_]/is_oauth = false
>>>> Todo.t /todos[{id}]
>>>> /todos[_]/done = false
>>>> // Default value for string is "" (empty string)
>>>> }
>>>>
>>>> database opado @mongo {
>>>> User.t /users[{ref}]
>>>> /users[_]/is_oauth = false
>>>> Todo.t /todos[{id}]
>>>> /todos[_]/done = false
>>>> // Default value for string is "" (empty string)
>>>> }
>>>>
>>>>
>>>> On Wed, Mar 21, 2012 at 10:48 AM, Cédric Soulas <
>>>> cedric.soulas at mlstate.com> wrote:
>>>>
>>>>> You should read Quentin's answer (12 days ago):
>>>>> http://lists.owasp.org/pipermail/opa/2012-March/000874.html
>>>>>
>>>>> On Mar 21, 2012, at 3:06 PM, Tristan Sloughter wrote:
>>>>>
>>>>> Great, it works!
>>>>>
>>>>> Now, I haven't looked yet and I'm sure this has been asked, but
>>>>> since I'm replying anyway I'm going to ask ;)
>>>>>
>>>>> Is there the ability to migrate my Opa database to MongoDB?
>>>>>
>>>>> Thanks,
>>>>> Tristan
>>>>>
>>>>> 2012/3/21 Norman Scaife <norman.scaife at mlstate.com>
>>>>>
>>>>>> Tristan,
>>>>>>
>>>>>> On Sun, 2012-03-11 at 19:34 -0500, Tristan Sloughter wrote:
>>>>>> > How do I set a username and password for a remote mongo database? I
>>>>>> > can't find it in the documentation and I'm trying to use mongolab
>>>>>> for
>>>>>> > hosting the database.
>>>>>>
>>>>>> Authentication for MongoDB has just been added to the command line
>>>>>> options:
>>>>>>
>>>>>> --db-remote:dbname user:password at host:port
>>>>>>
>>>>>> Where "user" and "password" apply to database "dbname". It should
>>>>>> appear in last night's build and should appear on github in a few
>>>>>> days.
>>>>>> The documentation has also been updated but I don't know how long it
>>>>>> takes to filter through to the opalang.org website.
>>>>>>
>>>>>> Best wishes,
>>>>>> Norman Scaife.
>>>>>> --
>>>>>> Programmer @ MLState
>>>>>>
>>>>>> > Thanks,
>>>>>> > Tristan
>>>>>> >
>>>>>> > On Sun, Mar 11, 2012 at 1:55 PM, Tristan Sloughter
>>>>>> > <tristan.sloughter at gmail.com> wrote:
>>>>>> > Sweet. can you send me a pull request for those changes?
>>>>>> >
>>>>>> >
>>>>>> > On Sun, Mar 11, 2012 at 1:50 PM, Cédric Soulas
>>>>>> > <cedric.soulas at mlstate.com> wrote:
>>>>>> > Hi,
>>>>>> >
>>>>>> >
>>>>>> > I forked OpaDo app (by Sloughter in cc) to port it
>>>>>> to
>>>>>> > the mongodb backend. It should be a good example to
>>>>>> > start with.
>>>>>> > https://github.com/cedricss/OpaDo
>>>>>> >
>>>>>> >
>>>>>> > If you need to port db codes from Opa 9.0.0 to
>>>>>> 9.0.1,
>>>>>> > check this thread: http://forum.opalang.org/#0_62
>>>>>> >
>>>>>> >
>>>>>> > --
>>>>>> > Cédric
>>>>>> >
>>>>>> >
>>>>>> >
>>>>>> >
>>>>>> > _______________________________________________
>>>>>> > Opa mailing list
>>>>>> > Opa at lists.owasp.org
>>>>>> > https://lists.owasp.org/mailman/listinfo/opa
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> Opa mailing listOpa at lists.owasp.orghttps://lists.owasp.org/mailman/listinfo/opa
>>>>
>>>>
>>>>
>>>
>>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.owasp.org/pipermail/opa/attachments/20120502/a8d46f16/attachment-0001.html>
More information about the Opa
mailing list