69 points · by audiotron · 15y ago · 30 comments
Then how about writing some documentation. Your half-page README, half of which is spent making big claims, but then barely scratching a hello-world, left me rather underwhelmed.
Here's a simple question: How do you handle errors? (exceptions, transport errors, timeouts)
You'll have to be way more specific about what you mean by "handle errors". Do you mean node to node connection errors? Node to node messaging errors? Errors localized in a custom Hook?
I suggest just reading through the codebase, it's not that big. The entire philosophy is crash only processes which are supervised by Forever. In the current early version of hook.io we usually get let things crash and restart. This isn't idea for guaranteeing delivery of messages, but it's a good start.
> we usually get let things crash and restart.
>This isn't idea for guaranteeing delivery of messages
That is not Erlang.
From: http://en.wikipedia.org/wiki/Crash-only_software
Erlang is a computer language originally built by Ericsson for fault-tolerant telephone switches. Programs are structured as modules that can be replaced (hot swapped) without having to restart the entire program. If a module crashes or needs to be updated it can be restarted or replaced without affecting any other part of the program. Within the Open Telecom Platform, which often is used together with Erlang, there exist frameworks to simplify and automate this task.
If anyone is looking for a fun hack, it looks like creating a CouchDB _changes hook would take only a few lines of code, as the hard work is already done: https://github.com/iriscouch/follow
Wrapping existing libraries in a Hook, is very very simple ( by design ). :-)
What is hook.io all about? Is it mainly a framework for sending/receiving events (messages) between different processes?
As for personal use, Hook.io is amazing since it is like a mesh network and IPC event bus put together. I create modules, a way of using deamons supporting features through hooks makes life easier and allows them to be services kept alive out of my process.
for a simple examples there is station. https://github.com/Marak/station
disclosure, I work @ nodejitsu.
>nodejitsu
No.
Syntax can be fairly easily replaced - any good undergrad CS student should be competent enough to write a parser/translator. It's the semantics and runtime that really matter.