12 ms·
Messages via JSON
- Andrew_nenakhov 7y agoWhat's the point? Why not just forward a message to XMPP, Telegram, WhatsApp or email? You know, to the app users actually use. Why make them install one more quasi-messenger?
- teko_ji 7y agoBecause they don't work directly with web services. Read the author's article: https://medium.com/@re_dmitriy/what-is-refl-me-67e6eb151f27 https://medium.com/@re_dmitriy/what-is-refl-me-67e6eb151f27
- Andrew_nenakhov 7y ago> The application with the required frequency directly checks JSON on the web service side How charming.
- teko_ji 7y agoWhat's wrong with that?
- Leace 7y agoNot the poster but it may be useful to know that Andrew_nenakhov is a CEO of company that provides a Jabber messanger (Xabber).
- teko_ji 7y agoI'm glad.
- Andrew_nenakhov 7y agoMy occupation is not really relevant here, but yes, such service could be coded in maybe 60 minutes tops to accept a JSON and forward it to XMPP, and it would be way more efficient. Don't like XMPP? Ok, make a Telegram bot and receive notification with it.
- Andrew_nenakhov 7y agoBecause it is the most inefficient approach possible. You either have potentially long delays before receiving a notification (if you poll service once an hour, average delay would be 30 minutes), or you do LOTS of polling, draining the battery/abusing the service. If you have 20 notifications / day and you check service every minute, in a day you'll make 24*60 poll requests, only 1,38% of which would yield some meaningful payload.
- nicolas314 7y agoAnd yet, this is exactly how push notifications are implemented on mobile phones. You have the illusion to push a message from server to device while in fact you also push a message onto a queue that is polled at regular intervals by the mobile. No way around it, mobile devices don't have guaranteed connectivity as servers do.
- Andrew_nenakhov 7y agoNo. That's not how it works. From the Apple Developers Documentation [1], "On initial launch of your app on a user’s device, the system automatically establishes an accredited, encrypted, and persistent IP connection between your app and APNs." This persistent connection is, in fact, an XMPP session (likely, a modified one) [2]. Google's FCM too uses XMPP [3]. [1] https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/APNSOverview.html https://developer.apple.com/library/archive/documentation/Ne... [2] https://www.quora.com/What-technology-does-the-iOS-Apple-Push-Notification-Service-APNS-use-to-maintain-a-persistent-connection-with-each-device-to-receive-such-fast-push-notifications https://www.quora.com/What-technology-does-the-iOS-Apple-Pus... [3] https://firebase.google.com/docs/cloud-messaging/xmpp-server-ref https://firebase.google.com/docs/cloud-messaging/xmpp-server...
- icedchai 7y agoIf you look at the format of APNS messages, they are nothing like XMPP. It seems very unlikely Apple uses it. That link you post does not confirm it.
- amelius 7y ago> Because they don't work directly with web services. Then why not make a relay, i.e. a server that forwards messages from a webclient to Whatsapp, email, etc.?
- kissgyorgy 7y agoDo you realize that's the opposite direction of this? In that case you SEND something to a chat app, but this app can RECEIVE data from a web service. Way simpler architecture.
- hk__2 7y ago> Do you realize that's the opposite direction of this? In that case you SEND something to a chat app, but this app can RECEIVE data from a web service. Way simpler architecture. Well, it receives data by hitting a specific endpoint with a specific protocol. It’s “simpler” in that it may be easier to implement, but you still have to modify your service to get that to work. And if you must modify your service, you may want to implement something that’s better supported and doesn’t require users to install (and configure) yet another app.
- geoah 7y agoThis would be nice for websites and services users want to get push notifications from. I get that html5 notifications should be able to do this at some point but there is still merit in having another way of getting stuff to your phone and possibly desktop.
- deleted 7y ago[deleted]
- Andrew_nenakhov 7y agoThing is, it does not offer push notifications. It's very opposite of that - the app seems to just poll the service with regular intervals.
- re_dmitriy 7y agoYes, but the interval is set in JSON, which is convenient. Besides, there is a manual mode.
- joan453 7y agoSimple and interesting idea!
- re_dmitriy 7y agoThank!
- beefhash 7y ago> Request signature format(crc): [time_stamp]_[md5(time_stamp+secret_key)] This should probably be an HMAC construction at the very least, and MD5 in general just should be discarded entirely in favor of BLAKE2b, SHA-2 or SHA-3. And ideally, it'd actually validate the rest of the contents as well.
- teko_ji 7y agoI think the author has made it as simple as possible for users and developers with basic skills.
- beefhash 7y agoWhile I agree with the notion of making things simple, security theater is worse than no security at all because it makes you feel safe when you may not be.
- teko_ji 7y agoMaybe so.)
- enedil 7y agoQuick and honest question: are you the author? You respond to lots of comments in the name of author, that's a rather surprising level of care about a niche piece of software.
- bradhe 7y agoDamn this is _such_ a good idea. Great job team.
- MuffinFlavored 7y agoI agree, just a weird name. Why REFL?
- greyskull 7y ago> short for "reflection" https://medium.com/@re_dmitriy/what-is-refl-me-67e6eb151f27 https://medium.com/@re_dmitriy/what-is-refl-me-67e6eb151f27
- MuffinFlavored 7y agoi do not think “reflection” when i think “text me JSON events”
- greyskull 7y agoFWIW I agree.
- tantalor 7y agoIt's pretty close to REPL (read eval print loop) so maybe the F stands for something else?
- re_dmitriy 7y ago"reflection me" :)
- poyu 7y agoWhat's the difference between this and [Pushover](https://pushover.net https://pushover.net)?
- noahster11 7y agoPushover also handles a server, which you can make requests to, that sends push notifications to your phone. It looks like this project just scrapes JSON from a URL for changes, and notifies from that. Pushover is push based, while this looks to be pull based.
- deleted 7y ago[deleted]
- stevekemp 7y agoYou self-host the source of the messages in this case. (I use pushover, and it rocks. But there you POST the message to pushover, here you host them on your own machine(s))
- codegladiator 7y agoWhat exactly is new in this ? Isn't this what Android and iOS notification services do ? And all messaging services ? What did I miss
- DevKoala 7y agoAny web service can integrate with it as long as it responds with a JSON object that adheres to the specification. It is genius.
- codegladiator 7y agoStill didn't get the genius part,... This simply keeps polling a list of endpoint and if a new message Id comes, flashes it and stores in the list of flashed messages ? That's all right ?
- greyskull 7y agoIt's a mobile app that polls an endpoint for json, after the user configures it (seemingly with a QR code), that's all. There's no middle-man server, and it's also not push. Neat idea, low barrier to entry. Can't tell from docs how authz/authn are handled.
- codegladiator 7y agoAnd who maintains the message queue until the client pools next(the service provided by these middle-man servers) ? And what about message by user identifier ? And client app will eat my battery because one more service is constantly polling now ?
- screaminghawk 7y agoYou can configure the refresh interval in the service response: https://refl.me/docs https://refl.me/docs Would be nice if you could override this client side as well.
- nicolas314 7y ago
- IshKebab 7y agoNice idea. Does it poll though? How do you prevent receiving the same message twice? I would have done it using server-sent events instead.
- fredifrum 7y agoI think it does poll, and it's just looking for a diff in the previous message.
- jrockway 7y agoI think this is basically Slack webhooks without Slack. Not a bad idea, actually.
- ramenmeal 7y agoCurious, what are some examples of public json files I would "subscribe" to?
- SamBam 7y agoMy understanding is that you would be making your own. E.g. if you had a site that people could comment on, make a url that serializes those comments as JSON and then point this at that.
- shantly 7y agoAs pointed out elsewhere by Andrew_nenakhov, we have that already—it's RSS. Or Atom. Or JSON Feed if you really must have JSON for some reason.
- ignoranceprior 7y agoRelevant xkcd: https://xkcd.com/927/ https://xkcd.com/927/
- re_dmitriy 7y agoThere's no simplicity. REFL.ME is easier. Try it.
- wolco 7y agoWhy isn't my device compatible with this version? What versions are they targeting?
- sixplusone 7y agoAlso, this could be just a html page with a few lines of XMLHttpRequest/WebSocket code no?
- Andrew_nenakhov 7y agoOh, I finally understand it! It is just an RSS (but with JSON instead of XML)!
- Aaronn 7y agoI guess but that already exists https://jsonfeed.org/version/1 https://jsonfeed.org/version/1
- Semiapies 7y agoAs far as I can tell, that's it. It's a reinvention of RSS without any notable advantages and no compatibility with existing systems. So, a reinvented wheel that doesn't work on roads.
- semiotagonal 7y agoIt's like re-inventing the wheel after everyone stopped using the wheel. It might meet with some success. To people who don't know about RSS, it's a new thing.
- CharlesW 7y ago> It's like re-inventing the wheel after everyone stopped using the wheel. 32% of Americans use RSS every month just for podcasts alone.
- core-questions 7y agoWe can all thank Adam Curry for that!
- Semiapies 7y agoI think everybody using Feedbin, Feedly, Newsblur, The Old Reader, Inoreader, etc. would wonder who your "everybody" really is.
- 7y ago
- DevKoala 7y agoAmazing idea. For my job, I have all sorts of instrumentations on my web services for monitoring sake. However, I have none for my pet projects, and this is just the right amount of monitoring I need. Now, I can wait for the iOS version or perhaps just roll my own app; It is a very neat idea, which I can see helping me in tons of scenarios.
- firefoxd 7y agoI think this is a simple and neat tool. Thank you for building it, and congratulations for launching.
- re_dmitriy 7y agoThanks!
- somebodythere 7y agoAwesome! I had been doing this via signal-cli, but their aren't great tools for working with Signal's API programatially and my solution was quite hacky. (I used a Google Voice number to register Signal, and parsed the output from `signal-cli --daemon` to recieve messages, and used Python's os.system to call the binary to send messages.)
- slugiscool99 7y agoIt would be cool to see a directory of public JSON feeds you can subscribe to - weather notifications, sports data, transit delays, etc. You could also have premium feeds that require a subscription.
- sixplusone 7y ago$json_array = array('reflapp'=>true,'message'=>'test'); shouldn't that be $json_array = array('refl.me'=>true,'message'=>'test');
- teko_ji 7y agoIt's already been fixed. Thank you.
- duxup 7y agoHelp me out because sometimes my reading comprehension is wonky. So is this just polling an api that responds in JSON and then updating your phone if something in the response changes?
- purple_ducks 7y ago> The "refl.me" key must always be true, otherwise an error will be called. Why?
- ValueNull 7y agoWish this wasn’t the case, would love to integrate services I don’t control into this.
- joshstrange 7y agoI won't pretend it's "so easy" or anything like that but could you just proxy those requests and add the key yourself? AWS Lambda comes to mind as a cheap/free way to accomplish this with the benefit of letting you modify the data if needed on the fly (or even check against a DynamoDB for history/other rules).
- ValueNull 7y agoWouldn’t this defeat one of the benefits of this software, the need to not host your own server (or any backend infrastructure)?
- joshstrange 7y agoI think the value-add with this service is the notification sending just by exposing an endpoint. I don't see any mention of not needing backend infrastructure (they even call out "connect your web service"). I think this is aimed at people who already are or can expose data via an HTTP endpoint and want notifications when that changes/updates. This includes the wide array of software developers who work on large OS projects that support sending notifications via services like PushBullet/Pushover/etc. Also, presumably, web services would just add a new endpoint with some auth token to easily send push notifications to their users without managing an app and everything else needed (push tokens, certs, GCM/FCM, apns, it can be a headache, trust me). Personally I see pushover-type services (I use pushover so I'm only speaking from that experience) as more useful since I can "push" out of my networks much easier than a service can "poll" me. That said pushover has always been a little clunky IMHO with trying to get a service to send me notifications. So a simple "Paste this url into the refl.me app to get notifications from us" is a pretty attractive alternative for certain use cases.
- Krasnol 7y agoIs this thing russian just for me? Couldn't find a way to change the language.
- ignoranceprior 7y agoClick the "RU" link in the top corner, then click "English". Or just go here: https://refl.me/?lang=en https://refl.me/?lang=en
- Krasnol 7y agoNo, I mean the app itself.
- re_dmitriy 7y agoUpdate the app. Error corrected.
- Krasnol 7y agoThank you! :)
- ActorNightly 7y agoIm not getting notifications with the test_crc endpoint. Key is correct, Pixel 2 Android 10 latest version.
- miki123211 7y agoIf you need something like that, go for a Telegram bot. It's really simple to make, the API is very nice and developer friendly. It's not oAuth, just a simple secret. It even accepts parameters via GET, so writing a bash script that check something and sends a message via Curl is pretty easy. There are few APIs simpler than this one. This is also more efficient, as your app only sends data out when it needs to, instead of being polled every n minutes. Everything goes through a real push service, which your phone has a persistent connection to, so the messages are delivered instantly. It also saves battery life, as there's no polling. I don't think this app will ever work on iOS, due to Apple's policies.
- NickBusey 7y agoI created a Telegram bot for one of my apps, but had to remove Telegram from my phone/computer after their terrible handling of Facebook linking. I made the mistake of linking my Telegram account to my Facebook account, which gave me the wonderful 'feature' of getting a notification any time one of my (due to the linked account being promotional) thousands of friends joined Telegram. These notifications play at any time of the day or night, and there is no way to disable them. Removing the app was my only recourse as a chat app without notifications is pretty useless.
- orasis 7y agoTurn off contact sync in Telegram and delete your uploaded contacts.
- tngranados 7y agoYou can also turn off new contacts notifications which is something I also hated and discovered recently that you can do.
- teko_ji 7y agoThank!
- xg15 7y ago