Pow with mDNS for easily sharing apps

64 views
Skip to first unread message

Samuel Cochran

unread,
Jan 9, 2012, 4:41:28 AM1/9/12
to rail...@googlegroups.com
A while ago I added mDNS support to pow so that anything.dev can be accessed at anything.bumblebee.local by other computers and devices (bumblebee being my computer's name).

A few people expressed interest in using this at railscamp—it's useful for sharing and playing with apps on devices—so my pow fork has been updated to the latest version and has mDNS reintegrated. nodejs 0.4 is currently required as all the powerful sockets support has been removed in 0.6 (which makes me very angry). Some pow from-source installation instructions are available which should still work, but install nodejs 0.4 using:


I'm happy to help people get this up and running, poke me at the camp for more info.

The old unix sockets stuff needs to be working again on nodejs 0.6 to upgrade. The node project won't merge this into the core upstream so sockets support has to be reimplemented in a separate package, potentially using unix_dgram and the nodejs 0.4 dgram module as a start—railscamp project?

Cheers,

Sam.

fresh...@gmail.com

unread,
Jan 9, 2012, 5:19:38 AM1/9/12
to rail...@googlegroups.com
Hi Samuel,

Does your fork mean that pow can now be made to work on other OS's than OS X?

Cheers,

James.

--
You received this message because you are subscribed to the Google Groups "RailsCamp" group.
To post to this group, send email to rail...@googlegroups.com.
To unsubscribe from this group, send email to railscamp+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/railscamp?hl=en.



--
James

Samuel Cochran

unread,
Jan 11, 2012, 10:17:01 PM1/11/12
to rail...@googlegroups.com, fresh...@gmail.com
On 09/01/2012, at 6:19 PM, fresh...@gmail.com wrote:

Does your fork mean that pow can now be made to work on other OS's than OS X?

That's not in the scope of this work, no.

Although that sounds like a good project!

fresh...@gmail.com

unread,
Jan 11, 2012, 10:35:40 PM1/11/12
to Samuel Cochran, rail...@googlegroups.com
Then I might build on your branch, to implement a version that doesn't depend on OS X's local DNS resolving mechanism. It should be unnecessary with mDNS support.

The only other OS X-specific piece is the plist that updates the firewall rules for port 80 forwarding; I'd need to detect the platform and install an iptables rule on Linux instead.

That should be all that's necessary, barring what you mentioned re: node version support for sockets. What is it about the mDNS patches that require Unix socket support?
--
James

Samuel Cochran

unread,
Jan 11, 2012, 10:48:00 PM1/11/12
to fresh...@gmail.com, rail...@googlegroups.com
On 12/01/2012, at 11:35 AM, fresh...@gmail.com wrote:

Then I might build on your branch, to implement a version that doesn't depend on OS X's local DNS resolving mechanism. It should be unnecessary with mDNS support.

The only other OS X-specific piece is the plist that updates the firewall rules for port 80 forwarding; I'd need to detect the platform and install an iptables rule on Linux instead.

Adding adapters for Library/Application Support/Pow vs ~/.config/pow, adding an adapter for ipfw vs. iptables and some sort of resolv.conf injection should be sufficient for linux support. These last two are going to be tricky to provide distribution-compatible implementations as each does iptables and resolv slightly differently. Perhaps using nsswitch might be easier than doing resolv, might be more ubiquitous.

That should be all that's necessary, barring what you mentioned re: node version support for sockets. What is it about the mDNS patches that require Unix socket support?

Multicast and ttl settings on sockets, decoupled from the bind process. Node's new UDP sockets create the socket and bind in a single call which prevents altering ttl and multicast memberships before binding.

fresh...@gmail.com

unread,
Jan 12, 2012, 3:13:49 AM1/12/12
to Samuel Cochran, rail...@googlegroups.com
I'll look you up at RailsCamp tomorrow, and pick your brains. I'm half-tempted to do a clean-room implementation (for the hell of it) in EventMachine, but might just settle for adding Linux support to Pow (probably the more sensible idea!).
--
James
Reply all
Reply to author
Forward
0 new messages