607 Commits

Author SHA1 Message Date
hillct
6d98b19c67 Dwitched to an older style git call, to get the repo URL 2016-11-30 20:04:27 -05:00
hillct
967bc972f7 Alpine based Docker image, metadata labels & Autobuild hooks 2016-11-30 19:02:28 -05:00
hillct
cb397aeb8b Merge pull request #3 from amark/0.5
0.5 catchup
2016-11-29 19:20:06 -05:00
Mark Nadal
bd960b4d67 thanks to @Stefdv #284 2016-11-29 11:35:20 -08:00
Mark Nadal
ce32d8414b ahem, thank you d3x0r 2016-11-28 20:31:27 -08:00
Mark Nadal
71f15e21c6 Merge branch '0.5' of https://github.com/amark/gun into 0.5 2016-11-28 19:41:11 -08:00
Mark Nadal
3e2bf996fa final touches 2016-11-28 19:40:39 -08:00
Mark Nadal
9abe3fb75f fix for d3x0r and Stefdv 2016-11-28 17:57:20 -08:00
Mark Nadal
dff24e2578 Merge pull request #283 from hillct/feature/withBuildMinified
Minify Gun at package publish-time
2016-11-28 11:07:53 -07:00
Mark Nadal
4526ffda52 Merge pull request #281 from PsychoLlama/0.5
Add envelope-system server sync
2016-11-28 10:59:43 -07:00
hillct
7c0c7f3605 Minify Gun at package publish-time 2016-11-27 13:04:37 -05:00
Jesse Gibson
4848493530 Add envelope-system server sync
Using gun's new envelope system (where routing and de-duplication happen
inside gun core), server-to-server synchronization has been
implemented.
However, it comes with this warning: the chain isn't yet ready and
you'll have difficulty reading or writing data via the chain.
2016-11-25 14:42:44 -07:00
Jesse Gibson
9d9dea2553 Add envelope plugin system
@amark made these changes, I'm just committing them.
2016-11-25 09:49:48 -07:00
Mark Nadal
c8e919f287 fix chain 2016-11-22 18:07:49 -08:00
Mark Nadal
42003cb82f Merge pull request #276 from PsychoLlama/s2s-sync
Optimistically open client sockets
2016-11-18 13:09:29 -07:00
Jesse Gibson
6a63b46d2b Add max reconnect backoff
Sockets will try to reconnect upon disconnection with an exponentially
rising backoff (configurable). However, if it's unbounded, at a certain
point does it need to even try? Probably not. Instead there's now a
`max` option that defaults to a minute, and the backoff will never
exceed that time.
2016-11-18 12:49:58 -07:00
Jesse Gibson
2696b4cf88 Merge branch '0.5' into s2s-sync 2016-11-18 11:57:06 -07:00
Jesse Gibson
70698112e4 Merge branch '0.5' of https://github.com/amark/gun into 0.5 2016-11-18 11:50:24 -07:00
Jesse Gibson
e402e3966e Optimistically open client sockets
Changes behavior from only opening sockets when absolutely necessary to
keeping them open for as long as possible. Key differences:
- Much higher success rate for messages sent from the connected server.
- Process no longer shuts down if nothing is done with gun, instead
  listens for incoming messages on client sockets.
Socket reconnect handle by Peer instances, meaning better handling for
deferred messages and predictable backoff.
The client.js logic has been significantly refactored. Among the
improvements, GET/PUT requests now respect the `peers` option for each
gun instance, only sending requests to the URLs listed.
2016-11-18 11:42:24 -07:00
Mark Nadal
2f0ecef341 Merge pull request #275 from eschapp/patch-1
Update README.md
2016-11-18 10:35:19 -07:00
Eric Schapp
186b237ea5 Update README.md
Just a quick typo fix.
2016-11-18 10:53:00 -06:00
Jesse Gibson
e8f8047cb6 Expose websocket events
The Peer "class" now extends EventEmitter. Listening to any websocket
events (e.g., "message", "close", "open", etc.) will not only subscribe
to the current websocket, but all future websockets. This provides a
much needed abstraction, since reconnection replaces the socket, which
would typically destroy your listeners.
2016-11-17 14:07:26 -07:00
Mark Nadal
bb2a49c088 Merge pull request #272 from colealbon/0.5
#271 one liner fix to console assign error
2016-11-16 19:52:56 -07:00
Cole Albon
1960d44598 Merge pull request #1 from colealbon/colealbon-patch-1
#271 one liner fix error while assigning console
2016-11-16 19:15:07 -07:00
Cole Albon
86a5abd550 #271 one liner fix error while assigning console 2016-11-16 19:14:31 -07:00
Jesse Gibson
37696e1ada Prevent most broadcast storms
Better de-duplication on messages sent for GET and PUT requests,
allowing full circular connections without blowing up your computer.
Sadly, this broke some things against the previous version, so per
@amark's request I'm publishing so he can debug.
2016-11-16 16:40:14 -07:00
Jesse Gibson
2317a54d45 Merge pull request #270 from PsychoLlama/allow-file-json-opt-out
Reliably check file.js options
2016-11-15 17:24:34 -07:00
Jesse Gibson
f999e5f2ea Fix chain option search
If you're reading this commit history, please avert your eyes. 3
commits to fix this admittedly simple problem is more than my pride can handle.
The `gun.Back()` function was only searching for `opt`, not
`opt.file`. It would stop at the first mention of `opt` even if it
didn't have settings for `file`. Now it won't.
2016-11-15 16:20:18 -07:00
Mark Nadal
126a668bf3 Update gun.js 2016-11-15 14:39:24 -08:00
Jesse Gibson
e7162aa098 Reliably check file.js options
The FileJS module can be passed options in two ways, and this commit
ensures they're treated in the right way.
Previously, options passed as .put or .get parameters would be favored
over those used on the chain, even if `file` wasn't specified. Now, the
module will only use the method options if `file` is mentioned, falling
back to the chain options.
This was a mistake on my part with the first PR (#268), I failed to notice notice that edge case.
2016-11-15 13:10:00 -07:00
Jesse Gibson
a4b64feef0 Merge pull request #269 from PsychoLlama/0.5
Allow greeting messages to be opt-out
2016-11-14 17:01:49 -07:00
Jesse Gibson
ddf272bbb0 Allow greeting messages to be opt-out
If you use gun a bunch, you've probably noticed the messages like "Hello
wonderful person :)" and "WARNING: This file.js module...".
This PR allows you to silence them.
Use `Gun.log.off = true` to bring peace back to your workflow.
> **Note:** great when used with file watchers like nodemon."
2016-11-14 17:00:06 -07:00
Jesse Gibson
406276739a Merge pull request #268 from PsychoLlama/allow-file-json-opt-out
Allow opting out of file.json
2016-11-14 16:39:24 -07:00
Jesse Gibson
3e66aff985 Allow opting out of file.json
If the most recent gun options disable the file module, then it
won't try to read/write from the json. Previously it would. Also, now
you can override the behavior by passing `{ file: false }` as the
options in `gun.put`.
2016-11-14 16:31:45 -07:00
Mark Nadal
14482abf0c Merge pull request #267 from PsychoLlama/s2s-sync
Add server-to-server sync
2016-11-14 15:45:13 -07:00
Jesse Gibson
ba43dcac17 Add server push
Pushes graph updates to connected clients, listening for
acknowledgements.
2016-11-14 13:40:55 -07:00
Mark Nadal
e39eda74f4 Merge pull request #262 from hillct/feature/onboarding
Examples Cleanup & Quick deployments with Heroku, Docker etc.
2016-11-13 10:58:51 -08:00
hillct
d1e5f93239 Added documentation for Now.sh deployment 2016-11-12 19:03:16 -05:00
hillct
d47f47baec Add Deployment documentation for Heroku & Docker 2016-11-12 17:59:15 -05:00
hillct
ded9a468c4 * Sanitized /examples dependency management
* Added Docker deployment support files
2016-11-12 16:43:47 -05:00
Jesse Gibson
e8194887e0 Add basic server get handling
Servers now dispatch requests to clients and listen for responses,
plugging them into gun.
2016-11-11 17:48:56 -07:00
Mark Nadal
24a6c858a2 Merge pull request #254 from alancnet/off-0.5
.off for .on, and .map. (0.5)
2016-11-10 16:39:45 -08:00
Mark Nadal
6e8f1e0028 Merge pull request #255 from alancnet/set-usability-0.5
Enable .set with node, or new soul. (0.5)
2016-11-10 16:30:24 -08:00
Jesse Gibson
4cd2d434d1 Add websocket backoff/retry logic
New library handles websocket reconnection logic and queues messages
that were sent while offline.
2016-11-10 10:11:01 -07:00
Jesse Gibson
e36e78f532 Isolate websocket logic
WebSocket logic has it's own folder now, `wsp`.
2016-11-10 10:09:18 -07:00
Jesse Gibson
adbea08120 Add basic websocket logic
Servers will now try to initiate a connection using websockets if the
`peers` option is set. Currently, it'll either start throwing errors,
or generate a broadcasting storm. Still work to be done...
This marks a milestone of getting the servers to connect to each
other. Now to have those messages make sense. Committing so I
have an easy rollback point.
2016-10-26 14:52:28 -06:00
Alan Colon
281a56292e .off for .on, and .map. (0.5) 2016-10-23 20:02:28 -06:00
Alan Colon
74b0242682 Enable .set with node, or new soul. (0.5) 2016-10-23 16:45:39 -06:00
Mark Nadal
e509912fa2 Merge pull request #248 from PsychoLlama/0.5
Fix /gun.js route
2016-10-18 14:32:56 -06:00
Jesse Gibson
6f8c99ccf1 Fix /gun.js route
The `wsp.server` logic was never making it to the /gun.js route. If the
browser is just sending a GET request for a the js file, it won't set
the upgrade property, and the server logic wouldn't let the request pass
if it didn't have that header.
I've simply moved the check below the file serving logic.
2016-10-18 13:54:59 -06:00