11 ms·
Feathers 2.0 – a minimalist real-time JavaScript framework
- niallobrien 11y agoI started playing with this recently and so far I'm loving it. Here's a Vue.js component example I wrote that interacts (CRUD operations) with a Feathers message service over websockets: https://gist.github.com/niallobrien/7eb51d17c977c46babb8 https://gist.github.com/niallobrien/7eb51d17c977c46babb8
- cmpb 11y agoJust wondering, how are you using ES2015 imports in the browser? Does Feathers come with a built-in module loader parser, or is this a feature of using Vue, or are you doing some other magic?
- bradstewart 11y agoThe .vue files are compiled with webpack using vue-loader (and Babel).
- daffl 11y agoFeathers doesn't assume much on the client. You can use a module loader or the bundled Feathers client which works right out of the box. To be able to use ES imports in the browser I personally use http://stealjs.com http://stealjs.com
- ekryski 11y agoYup and I use Webpack. The beauty is you get to take your pick. The downer is it's not set up for you. Tradeoffs for now...
- niallobrien 11y agoVue.js has a scaffolding tool called Vue-CLI which makes it super simple to get started as it has all of this stuff setup for you.
- siquick 11y agoWanted to comment on how inviting the documentation makes this look. I'll give it a whirl.
- ekryski 11y agoLet us know how you fair and if you run into any issues. The best way is in slack.feathersjs.com.
- dangoor 11y agoThe title (which is not the title of the original article) makes it sound as if Meteor is not open source. Meteor is open source, and MIT-licensed at that.
- DanielDent 11y agoThere are many valid criticisms of Meteor. As someone who has submitted patches & signed their contributor agreement, I agree - Meteor's licensing terms are not an issue.
- mortenjorck 11y agoI think a much more interesting title would be "An alternative to Meteor supporting 15+ databases and 4 ORMs." I'd imagine a lot of people (myself included) have cooled somewhat on Meteor as SQL support has failed to materialize, so Feather's DB flexibility seems like a standout feature.
- wolframhempel 11y agoGood point. Also have a look at https://deepstream.io https://deepstream.io , a realtime server that follows the same plug-in design philosophy
- sebak 11y agoOnly: there's no real-time db support like what Meteor with livequery does. The term 'real-time' is abused a lot here. Not only does neither Meteor, nor feathers offer real-time in the real meaning of the word. A better word is 'reactive'. But feathers just provides the very basic infrastructure (basically just websockets). Meteor also supports any type of DB, but only Mongo comes with reactivity... (Although their 'apollo' project is looking to change this).
- ekryski 11y agoDisclosure, I'm one of the creators of Feathers. You are right Feathers is MIT and so is Meteor. They both do real-time, albeit a bit differently, so we like to consider Meteor an alternative to Feathers and vice-versa. We are trying to be as transparent as possible and because we don't currently have any formal support from anyone except for the contributor's time and energy, we rely heavily on the community and need to remain as open as possible. Personally, I think Meteor has done some amazing stuff and some not so amazing things. I respect a lot of what they have achieved but we are making a different attempt at similar problems. Nothing more to it than that really. We've tried to put up objective comparisons between Feathers and many of the real-time solutions out there http://docs.feathersjs.com/why/vs/readme.html http://docs.feathersjs.com/why/vs/readme.html. There is no silver bullet for all situations and all people.
- avidas 11y agoWe have used Feathers to build http://www.zeek.ai/ http://www.zeek.ai/ and have been really happy with it so far. The consistency between the client and server libraries makes developing with Feathers fast.
- ekryski 11y agoGlad to hear you are liking it!
- Luyt 11y agoDespite reading that webpage I still have difficulty understanding what the actual product of zeek.ai is. Has it something to do with converting Twitter followers to customers?
- somecallitblues 11y agoI think it's automated following and message sending to Twitter users. Maybe...
- mbil 11y ago'proprietary' in the Targeting section is misspelled fyi
- redindian75 11y agofor those wondering the difference between this and Meteor. Here is the blurb Feather vs Meteor http://docs.feathersjs.com/why/vs/meteor.html http://docs.feathersjs.com/why/vs/meteor.html
- aioprisan 11y agoThe usage of NPM packages without needing to roll my own Meteor NPM bindings for each one is huge.
- desireco42 11y agoPretty interesting. A little overwhelmed with amount of choices. Also not sure what to think, I will have to do example app and see for myself. It does look very promising. I really like that it builds on the work of others instead of reinventing the wheel. Also, mentioning Meteor, totally not needed.
- ekryski 11y agoThanks for that feedback! What are you finding overwhelming? We're always looking to improve.
- desireco42 11y agoIt is cool that I can use 3 different engines to talk to sql db's, but maybe don't tell me that right away. I think it is more interesting that your architecture is so flexible and maybe show me how simple it is to get started.
- ekryski 11y agoSounds good. Really appreciate that feedback. Seriously. I have felt a bit like we are throwing a lot at people at the beginning of the docs.
- Gratsby 11y agoDoes Feathers support SAML authentication? I don't see it in the docs, but I figured I would ask. It says it's built on top of express, and express has SAML support... is it possible to leverage that?
- ekryski 11y agoWe haven't tried it ourselves but Feathers just uses passport for auth underneath so any passport auth strategy will work. For SAML, to make it feel "Feathersy" might take a bit more work (ie. wrapping it up as a Service) but definitely open to creating an issue for it and for PRs. A quick and dirty way is to just use it Express style and call the official Feathers auth services from your own Express routes. Feathers really is just Express, so you can use any Express middleware like https://github.com/bergie/passport-saml https://github.com/bergie/passport-saml.
- Gratsby 11y agoExcellent. That was my one barrier to giving it a try. If I make it far enough, I'll definitely send a PR.
- dustinlakin 11y agoGreat Documentation, excited to try things out.
- nailer 11y ago> exposes both a RESTful and real-time API automatically through HTTP/HTTPS and over websockets. Why not both at once with HTML5 SSE?
- Matthias247 11y agoI think SSE has two limitations that might not make it too useful for some scenarios: - Each SSE channel would require a separate TCP connection. And as the connections for a browser are limited, you can not support a lot of of different SSE channels. This is mainly a HTTP/1.1 problem, HTTP/2 fixes this. But as browser and server support for HTTP/2 is still limited you might not bet on it. - SSE can only send chunks of text in each notification, where the possible payload is additionally limited by the SSE encoding (you can't send text with \n\n in it). So if you need binary or abritrary (JSON?) text objects you would need some additional encoding. Like object -> json string -> byte-array representation -> base64 string. This works, but the overhead for your application (must do the encoding) and the browser (must to all the decoding and look for the \n\n) is not ideal. I'm currently experimenting with using HTTP/2 and fetch API with readable streams to stream arbitrary objects on a bigger number of parallel channels from server to client. This seems to work and looks quite promising for the future, but due to missing browser and partly also missing server support the solution is definitely in it's infancy. So the current safe bet for enabling lots of notification channels or enabling realtime queries would still be websockets.
- daffl 11y agoThat sounds like something worth keeping track of. Do you want to create an issue at https://github.com/feathersjs/feathers/issues https://github.com/feathersjs/feathers/issues for it? The nice thing is that you most likely won't have to change your services when adding a new transport layer.
- bryanlarsen 11y agoWhat jumped out at me was that feathers can be added to an existing express.js application. That says a lot about feathers' modularity and design, definitely easing concerns about lock in or making the wrong choices at the beginning.
- mhd 11y ago> A minimalist real-time framework for tomorrow’s apps > Feathers has adapters for 15+ data sources and 4 different ORMs out of the box. More than any other real-time framework! Huh?
- manojlds 11y agoOut of the box maybe the wrong way to describe it. You install additional plugins for the different data sources support.
- aioprisan 11y agoOut of the box is an appropriate way to describe it if it's a plugin that's been developed, tested, and guaranteed to work by the core team. Just because it's not installed/enabled by default is a good thing IMO.
- kough 11y agoThe trick is that there is no actual definition of minimal, so you can always add it to your list of adjectives and sound more hip as a result. Another good one is "clean". All my code is bloated and messy, tbh.
- ekryski 11y agoWe try and help you keep it clean. Check out https://github.com/feathersjs/feathers-chat https://github.com/feathersjs/feathers-chat to see what our idea of an app should look like. Obviously, different strokes for different folks, but that's the kind of code we like.
- daffl 11y agoExpress claims to be a "Fast, unopinionated, minimalist web framework for Node.js" so we decided that minimal fits well because Feathers at it's core is just a very small extension to and in the spirit (or so we'd like to think ;) of Express.
- dcwca 11y ago
- amelius 11y agoThe term "real-time" means that you can guarantee certain timing constraints. It can only work on a substrate (OS) that supports real-time processing. So I am sure that "real-time" is not what this package is offering.
- tyingq 11y agoMy guess is that they are pulling that from Socket.IO's use of the same "real time" term. Which I suppose is to denote that it's not ajax polling (though I understand that Socket.IO does poll in some situations...)
- andybak 11y agoSorry to tell you this but the term now has a different meaning within the web development community. If that bothers you then regain your composure by remembering that 'computer' once referred the operators of calculating machines - not the machines themselves: https://en.wikipedia.org/wiki/Computer#Etymology https://en.wikipedia.org/wiki/Computer#Etymology Language changes.
- braythwayt 11y agoThe parallel to "computers" does not fit in this case, because that change came to the entire world at the same time, via the same mechanism: computer -> electronic computer -> computer (when human computers became obsolete). In this case, the existing meaning of "real time" is not obsolete, so the analogy does not work. --- Next, just because language inexorably changes over decades, generations, and centuries, does not mean that a subculture deciding to use an existing word in a different way is "The language changing." It's just a subculture deciding to use a word in a different way. When they go forth and use that word outside of their niche, and there is confusion because they mean one thing and the rest of the world means another, the subculture does not get to shrug and say, "language changes." When you use words, it is your responsibility to know your audience and use the words your audience understands, in the way that they understand it. And so it is with technical terms that have established meanings in the computer science and programming community. By all means redefine what "class" or "type" or "realtime" means. Use your definitions within your subculture with abandon. But be aware that when straying outside of your community, it is your responsibility to use terms that your audience understands, not your audience's responsibility to presume that all bets are off, and any word might mean anything. --- Finally, I question the tone of "sorry." Perhaps you didn't mean it that way, but it has an air of the arrogance of a pop culture programmer. "We're inventing new stuff here, no time for your old ideas, daddy."
- dalailambda 11y agoFrom a glance what makes this appealing to me is the fact that there's less magic than with Meteor, which means I can use my own build process, and I can use any compile to js language.
- aioprisan 11y ago+1. One of the main reasons why I'm considering this for future projects is how much easier it is to understand the magic components, support for many more databases out of the box, like MySQL, etc.
- aioprisan 11y agoJWT support is awesome to see and makes transitions or parallel construction with something like Laravel sessions via JWT a possibility.
- cubano 11y agoPerhaps you could help me...I am currently looking for a framework to work with a Cordova project I've been hired to create. Is there any reason why this wouldn't work with Cordova?
- nissimk 11y agoHow does the realtime work when there are multiple node processes or servers? If my client is connected to server A and an update occurs on server B, will my client get the event on the web socket? If so, how does server A know about the event that occurred on server B?
- daffl 11y agoTo handle the real-time event syncing we created https://github.com/feathersjs/feathers-sync https://github.com/feathersjs/feathers-sync. It uses a central Redis DB or a MongoDB tailable collection to to synchronize service events between different application instances. Another option is to use your websocket libraries' clustering library, for Socket.io for example there is https://github.com/socketio/socket.io-redis https://github.com/socketio/socket.io-redis. This is a very good question. We're definitely planning on adding a section about performance and scaling to the documentation very soon.
- ekryski 11y agoI'll quickly add to what daffl said. That there is one more manual method outline here (https://github.com/feathersjs/feathers/issues/265#issuecomment-197449569 https://github.com/feathersjs/feathers/issues/265#issuecomme...) that doesn't require running another non-feathers server.
- beernutz 11y agoThe site is linking to expressjs.org instead of expressjs.com. Is this intentional?
- ekryski 11y agoNope. Not intentional. Looks like we had the old URL. Thanks for pointing that out. I've updated the website and the docs.
- VOYD 11y agowhat does it do?
- ptasci67 11y agoI love feathers. Simple and easy to use. The concept of services and hooks is an awesome abstraction that strips out more code than it adds. I just wish the authentication was a little more robust. I like that they realize stateless auth is the way to go but how about we get rid of those passwords too!
- ekryski 11y agoGlad you are liking it. Yes auth needs a bit more love. I'm working on it right now actually. It's getting close to a 1.0. As far as passwords go, I assume you are referring to passwordless auth? We are working on that right now :). https://github.com/feathersjs/feathers-authentication/issues/7 https://github.com/feathersjs/feathers-authentication/issues...
- deleted 11y ago[deleted]
- ptasci67 11y agoI just saw! That is awesome. Keep up the great work!