summaryrefslogtreecommitdiff
path: root/Run/Que/tutorial.md
diff options
context:
space:
mode:
Diffstat (limited to 'Run/Que/tutorial.md')
-rw-r--r--Run/Que/tutorial.md26
1 files changed, 12 insertions, 14 deletions
diff --git a/Run/Que/tutorial.md b/Run/Que/tutorial.md
index b5b258d..66ecd3c 100644
--- a/Run/Que/tutorial.md
+++ b/Run/Que/tutorial.md
@@ -8,24 +8,24 @@ are pretty much the same thing. Put some values in one end, and take
them out the other end at a different time, or in a different process.
Ques are created dynamically for every HTTP request you make. Here we
-use the `que` client to create a new que at the path `example/new-que`:
+use the `que` client to create a new que at the path `pub/new-que`:
- que example/new-que
+ que pub/new-que
The `que` client is useful, but you can use anything to make the HTTP
request, for example here's the same thing with curl:
- curl https://que.run/example/new-que
+ curl https://que.run/pub/new-que
These requests will block until a value is placed on the other
end. Let's do that now. In a separate terminal:
- echo "hello world" | que example/new-que -
+ echo "hello world" | que pub/new-que -
This tells the `que` client to read the value from `stdin` and then send
it to `example/new-que`. Or with curl:
- curl https://que.run/example/new-que -d "hello world"
+ curl https://que.run/pub/new-que -d "hello world"
This will succeed immediately and send the string "`hello world`" over
the channel, which will be received and printed by the listener in the
@@ -37,19 +37,17 @@ you want.
## Namespaces
Ques are organized into namespaces, identified by the first fragment of
-the path. In the above commands we used `example` as the namespace, but
-you can use whatever you want.
+the path. In the above commands we used `pub` as the namespace, which is
+a special publically-writable namespace. The other special namespace is
+`_` which is reserved for internal use only. You can't write to the `_`
+namespace.
-Except, there is one special namespace `_` which is reserved for
-internal use only. You can't write to the `_` namespace.
-
-Namespaces are normally public, and anyone can write and read to
-them. The `Pro` version allows you to reserve namespaces and add
-authentication.
+To use other namespaces and add authentication/access controls, you can
+[sign up for the Power package](/_/index).
## Events
Just reading and writing data isn't very exciting, so let's throw in
some events. We can very quickly put together a job processor.
- que example/new-que --then "./worker.sh '\msg'"
+ que pub/new-que --then "./worker.sh '\msg'"