Discussion:
[tw] Tool to configure multi-user using Cloudant and NoteSelf
(too old to reply)
Danielo Rodríguez
2017-05-16 14:20:44 UTC
Permalink
Raw Message
Hello to everyone,

After several days reading CouchDB documentation, Cloudant documentation
and a couple of tickets to Cloudant support I found
the way to configure ONE SINGLE cloudant account for several users.
However *the process is tough, *and requires technical knowledge. Because
of that I'm proud to present:

NoteSelf-Cloudant configurator
<https://noteself.github.io/cloudant-configurator/>

It is a small ad-hoc tool designed to make this process easy (or at least
easier). It is a bit rough, and the UI must be polished, but I expect it to
work for most users.
Pre requisites should be obvious:

- Being familiar with NoteSelf
- Have a Cloudant account
- Have that account configured to be used along with NoteSelf

What does this tool do?

- Configure Cloudant with the required parameters to activate multi-user
scenario
- Allows the creation of new users
- Allows to grant access to each database (AKA notebook) individually to
each user


Users are created globally and then each user should be granted to each
database individually. Except your main user, which is added as admin to
every database.

NoteSelf will work just fine with any user you create, however it does not
sets the logged in user as author automatically. This will come in a future
release.

Hope this makes this kind of configuration easier for those that want to
try it out.
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/8066d98e-aba8-4c5b-9e1b-87eefc034f63%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Arlen Beiler
2017-05-16 21:05:02 UTC
Permalink
Raw Message
Thank you Danielo, this looks promising. One thing that I wish Noteself
(and TiddlyWiki for that matter) would do would be to immediately notify
all open instances of any new changes instead of waiting 60 seconds. Also
wondering what to do about edit conflicts. Nevertheless, this looks great :)
Post by Danielo Rodríguez
Hello to everyone,
After several days reading CouchDB documentation, Cloudant documentation
and a couple of tickets to Cloudant support I found
the way to configure ONE SINGLE cloudant account for several users.
However *the process is tough, *and requires technical knowledge.
NoteSelf-Cloudant configurator
<https://noteself.github.io/cloudant-configurator/>
It is a small ad-hoc tool designed to make this process easy (or at least
easier). It is a bit rough, and the UI must be polished, but I expect it to
work for most users.
- Being familiar with NoteSelf
- Have a Cloudant account
- Have that account configured to be used along with NoteSelf
What does this tool do?
- Configure Cloudant with the required parameters to activate
multi-user scenario
- Allows the creation of new users
- Allows to grant access to each database (AKA notebook) individually
to each user
Users are created globally and then each user should be granted to each
database individually. Except your main user, which is added as admin to
every database.
NoteSelf will work just fine with any user you create, however it does not
sets the logged in user as author automatically. This will come in a future
release.
Hope this makes this kind of configuration easier for those that want to
try it out.
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/ms
gid/tiddlywiki/8066d98e-aba8-4c5b-9e1b-87eefc034f63%40googlegroups.com
<https://groups.google.com/d/msgid/tiddlywiki/8066d98e-aba8-4c5b-9e1b-87eefc034f63%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/CAJ1vdST2qf0RcHsdjv42eBsHjH3Xc8Rk3%2Bwg_ntpT8EdQSBMZw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Danielo Rodríguez
2017-05-17 08:36:34 UTC
Permalink
Raw Message
Hello Arlen

One thing that I wish Noteself (and TiddlyWiki for that matter) would do
would be to immediately notify all open instances of any new changes
instead of waiting 60 seconds.
NoteSelf (Pouch + Couch) does exactly that. Changes are notified more or
less instantly, but we have to wait until tiddlywiki ask us for new
tiddlers, which happens each 60 seconds. Of course I could push the tiddler
to tiddlywiki at the moment it arrives, but this will trigger the sync
mechanism of tiddlywiki, which in turn will send the tiddler back to the
sync-adaptor (TiddlyPouch) potentially producing unexpected behaviors.
I opened an issue on github to improve this behavior:

https://github.com/Jermolene/TiddlyWiki5/issues/2698

If you want to contribute or track the resolution of this go an give the
issue a thumbs up.
Also wondering what to do about edit conflicts. Nevertheless, this looks
great :)
Pouchdb tries to resolve conflicts automatically, and it usually succeeds.
Take a look here for technical details

https://pouchdb.com/guides/conflicts.html
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/4def8df1-9215-4d7a-baaa-368afabe782b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Mat
2017-05-17 10:11:11 UTC
Permalink
Raw Message
Really cool you're pushing on with what can be a new paradigm for TW.

When I try to log into Chrome, it gets stuck (first picture here below),
i.e nothing happens when I click the green button.
I do use the correct username/password because I do succeed in logging in
to Cloudant outside of the NS context.

In FF, I get to the next step but the second picture here comes up. Do I
need a db explicitly titled "_users"?

Win10.

<:-)
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/7891d9f9-9601-4f00-8494-ad36ee95bbd5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Mat
2017-05-17 10:13:55 UTC
Permalink
Raw Message
Oh, and in FF, after clicking "create _users" I get
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/45eb8f26-6cc5-4a8b-8f14-7c168e6a29d4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
@TiddlyTweeter
2017-05-17 11:32:48 UTC
Permalink
Raw Message
Mat wrote...
Really cool you're pushing on with what can be a new paradigm for TW.
Dead right.

NoteSelf is already a working app. Its also already a very strong proof of
concept. The approach solves several issues simultaneously. And the
multi-user direction will add even more power to that.

Danielo is just one smart dude doing this. He's demonstrated the underlying
architecture of NoteSelf has great practical potential for TW.

My 2 cents
Josiah
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/c218a285-ea37-4bd7-9e8e-95d299609380%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Danielo Rodríguez
2017-05-17 13:36:09 UTC
Permalink
Raw Message
Hello Mat
Post by Mat
Really cool you're pushing on with what can be a new paradigm for TW.
Thank for your kind words and for trying the tool. It really helps
Post by Mat
When I try to log into Chrome, it gets stuck (first picture here below),
i.e nothing happens when I click the green button.
That's weird, but can be due to the more strict cross-domain rules chrome
has, but I think that is not the problem (read below)
Post by Mat
I do use the correct username/password because I do succeed in logging in
to Cloudant outside of the NS context.
Usually, the first point of failure. If you log into Cloudant, and after
that you open or refresh the page, does it log in automatically?
Post by Mat
In FF, I get to the next step but the second picture here comes up.
That is the expected behavior.
Post by Mat
Do I need a db explicitly titled "_users"?
That is exactly what the message says. Is it not clear? I thought it was.
Having such database is mandatory for this to work properly

Oh, and in FF, after clicking "create _users" I get


That is also very weird. It may be another error that is not being properly
captured and that other error message is displayed instead. Have you
followed the instructions on the linked video? This tool requires CORS to
be enabled on your cloudant account. BUT if NoteSelf works with your
cloudant account this should work too.


It will really help me if you can open your chrome developer tools, try to
login and provide an screenshot of the console tab and the network tab.
Many thanks.
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/9e9cb283-70a2-4cdf-b021-7b2aa42a08f2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Mat
2017-05-19 12:45:44 UTC
Permalink
Raw Message
@Danielo

I may have found my mistake, or at least one! In your video you point to a
few databases but I had assumed that "one db = one notebook", i.e that the
databases you point to were mere examples of notebooks you had installed.

But, if I now understand right, both _replicator and _users are required!

If this insight is correct, I suggest a test in the NoteSelf-Cloudant
configurator for _replicator similar to _users, and if _replicator is
missing then this is created also.

So, now I get the setup to work with Firefox!
Post by Mat
Do I need a db explicitly titled "_users"?
That is exactly what the message says. Is it not clear? I thought it was.
Having such database is mandatory for this to work properly
Well that message is clear *per se* - but in your first post here you typed
very clear prerequisite instructions where this was not mentioned. So when
I don't succeed it made me think that maybe this "_users" requirement means
something is wrong.


It will really help me if you can open your chrome developer tools, try to
Post by Mat
login and provide an screenshot of the console tab and the network tab.
E-mailing you a few shots.


<:-)
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/4d1a9e7c-2784-4a7c-a55a-e53dc151dc3b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Danielo Rodríguez
2017-05-19 13:03:08 UTC
Permalink
Raw Message
Post by Mat
@Danielo
I may have found my mistake, or at least one! In your video you point to a
few databases but I had assumed that "one db = one notebook", i.e that the
databases you point to were mere examples of notebooks you had installed.
That is correct. Right now one "db = one notebook". The _users db is just
one exception.
Post by Mat
But, if I now understand right, both _replicator and _users are required!
Never heard about the _replicator db. Should not be necessary, I don't have
such db.
Post by Mat
If this insight is correct, I suggest a test in the NoteSelf-Cloudant
configurator for _replicator similar to _users, and if _replicator is
missing then this is created also.
So, now I get the setup to work with Firefox!
That is exactly what the message says. Is it not clear? I thought it was.
Post by Danielo Rodríguez
Having such database is mandatory for this to work properly
Well that message is clear *per se* - but in your first post here you
typed very clear prerequisite instructions where this was not mentioned. So
when I don't succeed it made me think that maybe this "_users" requirement
means something is wrong.
That detail is not included on the pre-requisites intentionally. The target
of the tool is to help you configure your cloudant account. Creating the
required _users database is one of the things the tool is made for. For
that reason, if it does not exist we warn the user and offer one solution,
which is clicking the button that creates that database. This should be
something like a wizard (like windows installers)
Ej: You need an _users db, click here to fix this problem - click - done.
Next step. You need to enable this database, click here to fix this problem
- click - done. Next step.

If you feel confused about any of those messages/situations maybe the
message should be more clear. I don't want to create the database silently
because I want to give the user the choice.
Post by Mat
E-mailing you a few shots.
Thanks I'll take a look. Have you tried with the latest version ? I just
fixed one stupid bug.

Thanks Mat
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/a5b334d0-d44f-4baf-b861-98bd9a935995%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Stephen Wilson
2017-05-19 13:11:10 UTC
Permalink
Raw Message
Works like a charm. New user set up.
Post by Danielo Rodríguez
Post by Mat
@Danielo
I may have found my mistake, or at least one! In your video you point to
a few databases but I had assumed that "one db = one notebook", i.e that
the databases you point to were mere examples of notebooks you had
installed.
That is correct. Right now one "db = one notebook". The _users db is just
one exception.
Post by Mat
But, if I now understand right, both _replicator and _users are required!
Never heard about the _replicator db. Should not be necessary, I don't
have such db.
Post by Mat
If this insight is correct, I suggest a test in the NoteSelf-Cloudant
configurator for _replicator similar to _users, and if _replicator is
missing then this is created also.
So, now I get the setup to work with Firefox!
That is exactly what the message says. Is it not clear? I thought it was.
Post by Danielo Rodríguez
Having such database is mandatory for this to work properly
Well that message is clear *per se* - but in your first post here you
typed very clear prerequisite instructions where this was not mentioned. So
when I don't succeed it made me think that maybe this "_users" requirement
means something is wrong.
That detail is not included on the pre-requisites intentionally. The
target of the tool is to help you configure your cloudant account. Creating
the required _users database is one of the things the tool is made for. For
that reason, if it does not exist we warn the user and offer one solution,
which is clicking the button that creates that database. This should be
something like a wizard (like windows installers)
Ej: You need an _users db, click here to fix this problem - click - done.
Next step. You need to enable this database, click here to fix this problem
- click - done. Next step.
If you feel confused about any of those messages/situations maybe the
message should be more clear. I don't want to create the database silently
because I want to give the user the choice.
Post by Mat
E-mailing you a few shots.
Thanks I'll take a look. Have you tried with the latest version ? I just
fixed one stupid bug.
Thanks Mat
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/8cc5ea96-3dde-47ab-8cb7-d4fac1f6bd96%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Mat
2017-05-19 13:56:49 UTC
Permalink
Raw Message
Post by Danielo Rodríguez
Never heard about the _replicator db. Should not be necessary, I don't
have such db.
Hm, OK but in the video you do (time 1:05 and 4:00)
Post by Danielo Rodríguez
"_users"
That detail is not included on the pre-requisites intentionally. The
target of the tool is to help you configure your cloudant account. Creating
the required _users database is one of the things the tool is made for.
That makes sense. Again, it is because it didn't work for me that I was
guessing that OK, maybe that was also a prerequisite. I'm telling this not
to "justify myself" but to make a point that users can draw this erroneous
conclusion, as I did, when the setup doesn't work.
Post by Danielo Rodríguez
E-mailing you a few shots.
Thanks I'll take a look. Have you tried with the latest version ? I just
fixed one stupid bug.
Yes, the shots are from latest version.

<:-)
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/428149e6-155e-404a-a6c7-65c7388caa62%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Stephen Wilson
2017-05-18 07:51:00 UTC
Permalink
Raw Message
Interesting! I'll have to have a look at that.
Quick question, and a simple 'NO' will suffice for an answer but.....
Can I put noteself lftiddlywikis on tiddlyspot?

Stephen
Post by Danielo Rodríguez
Hello to everyone,
After several days reading CouchDB documentation, Cloudant documentation
and a couple of tickets to Cloudant support I found
the way to configure ONE SINGLE cloudant account for several users.
However *the process is tough, *and requires technical knowledge.
NoteSelf-Cloudant configurator
<https://noteself.github.io/cloudant-configurator/>
It is a small ad-hoc tool designed to make this process easy (or at least
easier). It is a bit rough, and the UI must be polished, but I expect it to
work for most users.
- Being familiar with NoteSelf
- Have a Cloudant account
- Have that account configured to be used along with NoteSelf
What does this tool do?
- Configure Cloudant with the required parameters to activate
multi-user scenario
- Allows the creation of new users
- Allows to grant access to each database (AKA notebook) individually
to each user
Users are created globally and then each user should be granted to each
database individually. Except your main user, which is added as admin to
every database.
NoteSelf will work just fine with any user you create, however it does not
sets the logged in user as author automatically. This will come in a future
release.
Hope this makes this kind of configuration easier for those that want to
try it out.
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/e072f63c-7519-43f3-a2d9-42d21cbb4277%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Danielo Rodríguez
2017-05-18 11:07:03 UTC
Permalink
Raw Message
Hello Stephen
Post by Stephen Wilson
Interesting! I'll have to have a look at that.
Quick question, and a simple 'NO' will suffice for an answer but.....
Can I put noteself lftiddlywikis on tiddlyspot?
The empty edition of NoteSelf is nothing but an HTML file. You can serve it
from any host provider, this includes tiddlyspot, yes.

Regards
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/7668e0aa-1bfe-4e7b-a911-953e393e5989%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Stephen Wilson
2017-05-19 08:23:16 UTC
Permalink
Raw Message
Hello Danielo,

I have run into the same problem as Mat on both FF and Chrome, 'Server
Admin access is required for this request'. I have tried logging into to
cloudant and refreshing but get the same result. I have created a _users
datbase as well but still get told I need don't have one. CORS is on.

Console Tab:

<Loading Image...>

Network Tab


<Loading Image...>




I have also attempted to upload a blank noteself to a tiddlyspot using the
tiddlyspot save mechanism and get:

<Loading Image...>

This happens if I drag the pouch plugin over as well.


Stephen
Post by Danielo Rodríguez
Hello Stephen
Post by Stephen Wilson
Interesting! I'll have to have a look at that.
Quick question, and a simple 'NO' will suffice for an answer but.....
Can I put noteself lftiddlywikis on tiddlyspot?
The empty edition of NoteSelf is nothing but an HTML file. You can serve
it from any host provider, this includes tiddlyspot, yes.
Regards
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/14d3cd2a-fe1b-4c70-8fd8-5d2ce81b35a5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Danielo Rodríguez
2017-05-19 12:01:03 UTC
Permalink
Raw Message
Hello to everyone that has tested the library.
There was a bug where every login attempt and petition to the cloudant
service was using my personal username/account. Very convenient for me, but
some kind of problem for everyone else.
It should be fixed now.
Hope you can give it a second try
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/3c2564ca-aaa2-460c-b8d1-8f8a8f7a4002%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Mat
2017-05-19 12:55:06 UTC
Permalink
Raw Message
@Danielo
My post here above was written before I read Ste's and your post just above.

However, as noted, I still (now) don't get it to work on Chrome. See
personal email with screendumps.

<:-)
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/e02597d3-b3f8-4c91-a37c-90e415ed1a4e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...