Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/artemeff/pipe
pipe mq; unfinished application for customer; just for inspect, not for use
https://github.com/artemeff/pipe
Last synced: 12 days ago
JSON representation
pipe mq; unfinished application for customer; just for inspect, not for use
- Host: GitHub
- URL: https://github.com/artemeff/pipe
- Owner: artemeff
- Created: 2013-07-17T07:18:08.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-09-12T18:31:07.000Z (over 11 years ago)
- Last Synced: 2024-11-05T12:12:45.055Z (about 2 months ago)
- Language: Elixir
- Homepage:
- Size: 273 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### pipe mq; unfinished application for client; just for inspect, not for use
---
### Usage
__Users__
```elixir
# send message to user process, process id stored in redis
:gen_server.call :users, { :notify, user_id, message }# store process id by user id
:gen_server.call :users, { :subscribe, user_id, pid }# drop process id
:gen_server.call :users, { :unsubscribe, user_id }# get user PID by user_id, whet it not exists
# we spawn new process and return new PID
:gen_server.call :users, { :pid, 123 }# get all user sessions by his user_id
# returns false if session doesn't exist
# or return user_id when it exist
:gen_server.call :users, { :session, "session_id" }# get all user sessions by his user_id
# returns empty array ([]) when user hasn't
# any sessions, or return his sessions array
:gen_server.call :users, { :sessions, 123 }# get user online state by user_id
# returns only false or true
:gen_server.call :users, { :online, 123 }# set user online state by user_id
:gen_server.call :users, { :online, 123, state }
```__WebSockets__
`http://0.0.0.0:8080`
By default it attaching to `http://0.0.0.0:8080` and anyone allow to get this page.
__Internal API__
`tcp://127.0.0.1:1234`
ZeroMQ listens on tcp://127.0.0.1:1234, API doesn't implement at now.