Active Topics

 



Notices


Reply
Thread Tools
Posts: 356 | Thanked: 123 times | Joined on Dec 2008
#191
Originally Posted by uvatbc View Post
Yes. Its the most convenient, cross language way.


The Ubuntu server is the "default" usage - as in most people will initially do that. What I would prefer is if there were a way to run the publisher on my n810 - or even on my dd-wrt router.
The requirement is because I want to keep my energy costs as low as possible, which means that if I can have most of my publishers/server apps running on those devices that are "always on" then it would be a better utilization than starting my desktop and being forced to keep it on all the time.


I found mqtt, but all my searches for mosquito resulted in the nuisance insect rather than the mail server.

Is mosquito able to poll gmail / yahoo / exchange and when there is a new email, publish the results?

Is it possible for JPush (or its replacement) to do an imap4 client implementation that can lookup gmail or any other standards compliant imap server for new email?

Here is what I was planning for JPush:
1. Install Easy debian on n810, so that I have Java
2. Then install davmail so that I have an imap, ldap, caldav server that can read from Exchange
3. Use some email client that will regularly poll gmail and davmail imap for new messages. This email client will inform JPush about new messages
4. JPush will push a message to n900 to refresh email.

The n810 will sit at home and be permanently connected to the Internet as well as to power.
The n900 will travel with me and use much less battery power because of the push model.

This design can be extended to whatever else needs to have a push update: qgvdial, TOR, DC, eff, etc.
http://mosquitto.org/ is the software that I am talking about. It does not have the ability to poll gmail, or other email services built in. MQTT is a pub/sub system where you can subscribe to topics from the server. The device then receives updates whenever the server posts a new message in one of the topics. My plan was to have the device (n900) subscribe to topics based on what types of notifications it wants to receive from the server (email, google voice, etc).

The server then receives emails when it needs to notify the n900 (for google voice sms messages), or it polls a server to determine when to push the information to the device (for facebook messages, etc).

Email can either be handled by forwarding your email to the server (an option in gmail), or by polling the server for new messages).

I played around with creating an imap4 client on the server that could check for new messages, and notify the n900, but it was a lot harder than I thought (noticing that there is a new email is difficult without storing all of the email so you can tell when there is a new one), so this would require some more work.
 
Posts: 1,048 | Thanked: 979 times | Joined on Mar 2008 @ SF Bay Area
#192
Originally Posted by xur17 View Post
http://mosquitto.org/ is the software that I am talking about. It does not have the ability to poll gmail, or other email services built in. MQTT is a pub/sub system where you can subscribe to topics from the server. The device then receives updates whenever the server posts a new message in one of the topics. My plan was to have the device (n900) subscribe to topics based on what types of notifications it wants to receive from the server (email, google voice, etc).

The server then receives emails when it needs to notify the n900 (for google voice sms messages), or it polls a server to determine when to push the information to the device (for facebook messages, etc).

Email can either be handled by forwarding your email to the server (an option in gmail), or by polling the server for new messages).

I played around with creating an imap4 client on the server that could check for new messages, and notify the n900, but it was a lot harder than I thought (noticing that there is a new email is difficult without storing all of the email so you can tell when there is a new one), so this would require some more work.
First, thanks for the link.
Second, I'm really impressed by this and more so because of this video.
I'll need to read up more on this topic and try it out.
__________________
qgvdial: Google Voice client. All downloads
qgvtp: Phone integration for the n900 that dials out and sends texts using qgvdial.
mosquitto: message broker that implements the MQ Telemetry Transport protocol version 3.
qgvnotify: Google voice and contacts notifier for diablo and maemo.

If you want to thank me, click the Thanks button.
If you'd like to thank my applications, vote to move them to extras.
 
Posts: 356 | Thanked: 123 times | Joined on Dec 2008
#193
Originally Posted by uvatbc View Post
First, thanks for the link.
Second, I'm really impressed by this and more so because of this video.
I'll need to read up more on this topic and try it out.
I watched that same video a few hours ago too. Very interesting.
 
Posts: 2 | Thanked: 3 times | Joined on Dec 2010
#194
Hi there,

I'm the author of mosquitto. I'd just like to point out that some of the MQTT features you might want to use aren't in mosquitto yet - specifically client authentication and access control lists as added in v3.1 of the MQTT spec. They'll be in the next release, but if you can't wait that long they are supported in the IBM "free for evaluation" broker, rsmb. Mosquitto uses the same config file format as rsmb, so you'll be able to swap between them.

I'm also keen on making sure mosquitto can run on more restricted/unusual devices - so if you need help getting it on a dd-wrt router or similar then feel free to get in touch.

It's good to hear interest in MQTT for this kind of application - it's exactly the situation its suited for.

Best of luck!

Cheers,

Roger
 

The Following 3 Users Say Thank You to ralight For This Useful Post:
Posts: 356 | Thanked: 123 times | Joined on Dec 2008
#195
Originally Posted by ralight View Post
Hi there,

I'm the author of mosquitto. I'd just like to point out that some of the MQTT features you might want to use aren't in mosquitto yet - specifically client authentication and access control lists as added in v3.1 of the MQTT spec. They'll be in the next release, but if you can't wait that long they are supported in the IBM "free for evaluation" broker, rsmb. Mosquitto uses the same config file format as rsmb, so you'll be able to swap between them.

I'm also keen on making sure mosquitto can run on more restricted/unusual devices - so if you need help getting it on a dd-wrt router or similar then feel free to get in touch.

It's good to hear interest in MQTT for this kind of application - it's exactly the situation its suited for.

Best of luck!

Cheers,

Roger
I tried playing around with the qos values, but I am not sure that I understand them. What is the best way to send a message, and ensure that it gets delivered, even if the client is offline?

Since this is being used for sms messages, I want the messages to be delivered when the client comes back online. What is the best way to do this?
 
Posts: 1,048 | Thanked: 979 times | Joined on Mar 2008 @ SF Bay Area
#196
Heads up on a imminent problem: qgvdial may not be able to login to google voice.

GV servers have started pushing the iPhone Google Voice app on the Google voice Webapp. I don't exactly know how to bypass / fix this.

Suggestions welcome.
__________________
qgvdial: Google Voice client. All downloads
qgvtp: Phone integration for the n900 that dials out and sends texts using qgvdial.
mosquitto: message broker that implements the MQ Telemetry Transport protocol version 3.
qgvnotify: Google voice and contacts notifier for diablo and maemo.

If you want to thank me, click the Thanks button.
If you'd like to thank my applications, vote to move them to extras.
 
Posts: 1,048 | Thanked: 979 times | Joined on Mar 2008 @ SF Bay Area
#197
Another heads up: I have a fix for the problem I found, but it will not be going to extras for a maximum 2 days. I'll post back when it's in.
__________________
qgvdial: Google Voice client. All downloads
qgvtp: Phone integration for the n900 that dials out and sends texts using qgvdial.
mosquitto: message broker that implements the MQ Telemetry Transport protocol version 3.
qgvnotify: Google voice and contacts notifier for diablo and maemo.

If you want to thank me, click the Thanks button.
If you'd like to thank my applications, vote to move them to extras.
 
epage's Avatar
Posts: 1,684 | Thanked: 1,562 times | Joined on Jun 2008 @ Austin, TX
#198
Originally Posted by uvatbc View Post
Heads up on a imminent problem: qgvdial may not be able to login to google voice.

GV servers have started pushing the iPhone Google Voice app on the Google voice Webapp. I don't exactly know how to bypass / fix this.

Suggestions welcome.
Mind sharing what was the matter in case it is something to hit DC/TOR also?

It sounds like you are using an iPhone UA? I'm guessing they changed the login page for iOS UAs and it broke how you scraped login? Were you intentionally using an iOS version of the site?

I'm using a firefox 3.5 UA and using the generic mobile site.
__________________
770, n810, n900, Ideapad S10-3t
TheOneRing, DialCentral, Gonvert, Quicknote, Multilist, ejpi, nQa, Waters of Shiloah
Programming Blog
 
Posts: 1,048 | Thanked: 979 times | Joined on Mar 2008 @ SF Bay Area
#199
Originally Posted by epage View Post
Mind sharing what was the matter in case it is something to hit DC/TOR also?

It sounds like you are using an iPhone UA? I'm guessing they changed the login page for iOS UAs and it broke how you scraped login? Were you intentionally using an iOS version of the site?

I'm using a firefox 3.5 UA and using the generic mobile site.
Yes I do use the iPhone UA - there seems to be no other way to make a direct outgoing call.
The problem was that the initial login screen shows the "You can use the Google Voice iPhone app" message and not the login screen.
That screen appears only for m.google.com/voice and not for www.google.com/voice
Both URLs used to result in the same page, but now the mobile one shows the iPhone app nag.
The fix was to use the other URL.

The reason I'm not pushing this in yet is because I've got some massive UI improvements lined up for the contacts view.
__________________
qgvdial: Google Voice client. All downloads
qgvtp: Phone integration for the n900 that dials out and sends texts using qgvdial.
mosquitto: message broker that implements the MQ Telemetry Transport protocol version 3.
qgvnotify: Google voice and contacts notifier for diablo and maemo.

If you want to thank me, click the Thanks button.
If you'd like to thank my applications, vote to move them to extras.
 
Posts: 2 | Thanked: 3 times | Joined on Dec 2010
#200
Originally Posted by xur17 View Post
I tried playing around with the qos values, but I am not sure that I understand them. What is the best way to send a message, and ensure that it gets delivered, even if the client is offline?
You'll want to use QoS 1 or 2.

QoS 0 offers no guarantees at all - it's just fire and forget.
QoS 1 means that the message will be delivered at least once - but may be delivered more than once.
QoS 2 means that the message will be delivered exactly once.

Increasing the QoS level increases the overhead and latency a bit due to the handshaking required. QoS 0 is just a single publish message, QoS 1 is a publish then an ack, and QoS 2 has a further two handshake messages.

With regards to disconnected operation, that's covered as well. You'd have your clients connecting with "clean session" set to false. This means that on disconnect, the broker will maintain its subscriptions and queue messages that come in on that subscription, but only where the subscription and messages are QoS 1 or 2.

There is a caveat - the broker won't store an unlimited amount of these messages, so there's no hard guarantee. You should look at the max_queued_messages config variable to change the maximum number of queued messages per disconnected client.
 
Reply


 
Forum Jump


All times are GMT. The time now is 17:26.