Hacker Newsnew | past | comments | ask | show | jobs | submit | apage43's commentslogin

Except that's always the case. You mean if Clojure crashes before it queues up 50 docs and sends them, the docs in the queue are lost.

Durability is a concern when it means the integrity of your data is unknown. You'd probably be doing something like this in a bulk load, in which case you'd know where it crashed.

If this were queuing and batching inserts from many users it might be more of an issue (a user thinks something happened and it didn't), but realize that the at a queue size of 50 this performs at about ~5500 inserts/second. (And you can reduce this queue size if you don't need to insert that fast) This would affect users who happen to make their request within a roughly 0.18 millisecond window. If confirmation is still absolutely important, the post also links a version at the end that -does- wait for and return the IDs of the inserted documents from couchdb, guaranteeing the inserts have happened, and it still performs quite well.


I had tried using SBCL to generate excutables before myself, using SDL as an external lib. Worked, but they were ENORMOUS (20mb). Not sure what I did wrong.


Well, it's basically a memory dump. Disk space is cheap.


Actually AdBlock+'s element hiding rules can filter facebook ads. In fact I think a recent version has a subscription for filters that include facebook ad blocking.


If you use -any- sort of DRM, it will be extremely restrictive to the end user. Personally, I think really what is needed is for it to be convenient for the end user. This is what keeps me buying music from Amazon MP3. I don't even need any software other than a browser if I'm buying a single song. There's nothing to stop me from sharing my files with a few friends but Amazon MP3 probably makes up for whatever sales that would be lost this way because I like the service so much I recommend it to people all the time. Just give the user a raw, non-drm PDF file. If you really need to do -something-, dynamically insert a unique user ID on the last page of the book, just on the page, no steganography, write "Purchased by user #12345." PDF is pretty much a read-only format, so this wouldn't be easy to remove.

This probably won't keep people from casually sharing the book with their friends but will probably effectively put them off of sharing it publicly on the internet or p2p.


That approach -- making paying more convenient than not -- only works for adults, ie people who have an surfeit of money and a lack of time. High school students are the opposite.


I'm personally fresh out of high school, still 18 in fact. If your price point is so high that your target audience will actually -look- for a pirated version before they even consider a purchase, you are not going to have very good sales. The rule of thumb for DRM is pretty much if anyone can view the content, then the content can be cracked and distributed. Any significantly good, well-known product will be available for free somewhere, it's just a question of how hard it is to find.

Consider that many high school students can't purchase things online anyway, lacking credit cards, which means no matter what, "stealing" the product is more convenient for them.


The thing is, greater anonymity via encryption etc. is not easy to use for the general public. Sure, you can hack around it but not everyone is a hacker. And of course, darknets etc. won't get around the Permission to Shut Down The Internet bit.


If it becomes a big enough issue, people will write software and protocols that are as easy to use as the rest of the internet. As an example take https: since it was decided that sending credit cards in cleartext was unacceptable, browsers updated to seamlessly use it. The end user sees nothing except an extra character in their URL, but the technology is entirely different.

To extend it to this case, we might see email clients that default to dealing with the messy business of darknets, etc., while providing essentially the same user interface.


Unless a future step is to require every computer to be registered with the authorities, or go through some central ISP gateway in order to access the New Internet, which gives authorities greater control. Who knows where this kind of stuff can lead.


"The more you tighten your grip, Tarkin, the more star systems will slip through your fingers."


Wow. I've been trying to justify buying a dev G1 for a while now and this -seriously- isn't helping.


To fix constantly re-logging in to ssh: - set up key authentication and run ssh user@host with your favorite parameters in a loop (shell script) so it reconnects when disconnected. - in fact, have it run screen when connected, so you get right back to where you were effortlessy.

As for port forwarding, you will still be disconnected from everything on connectivity blips when ssh has to reconnect if you use ssh port forwarding. Try a VPN setup instead. You might have to fiddle with the host to keep it from sending RST's/FIN's as soon as you drop (though it shouldn't unless a packet for you comes in during the blip, I think). When you come back, if you come back soon enough, the connections should be restored without having been disconnected. (AS LONG as you have the same IP address on the VPN, so use a static IP setup)

Also, if you run your SSH -through- the VPN connection and recover quickly enough SSH shouldn't disconnect at all either.

More Edit: For long connectivity lapses (changing locations) all your TCP connections -will- drop. This is not something you can work around.


Thanks for your response. Just to clarify, I don't care if my forwarded TCP connections drop when my internet connection drops, just that they are re-established automatically. I also don't care about the actual TCP connection dropping, I just want all my SSH terminals to automatically pick up where I left off. Of course screen factors into this, but it has to be more than just screen.

Regarding the VPN, could this connection be automatically established upon joining a wireless network? (i think you see where i'm going with this question)


I don't think it's any more complex than running screen on the server, using SSH keys to allow you to connect to the server without a password, and possibly orchestrated with a small script that checks network connectivity and re-establishes your session after it's broken. Your 5 shells are running in one screen session on the server, so you don't have to restart all of them. It's just a simple "screen -D -R". If there is no existing screen session to attach to, you can have screen automatically create your sessions via the config file.

This is pretty much what I do already, except that I don't switch connections as frequently as you. But when I go to a new place, it's just connect with ssh and reattach with screen.


If you don't care about connection dropping, indeed just set up key authentication and run ssh in a loop as described above, instead of a complicated VPN, which will only really partially mitigate dropping of -forwarded- connections.

Secondly, you should be able to set scripts to trigger when a network interface comes up in most linux distros, but how to do it varies, for example /etc/network/ifup.d/ in ubuntu.


I do something of this sort. I have a shell alias called 'irc' that will connect to my remote server using the following local command, 'kepler' being an SSH connection alias defined in .ssh/config:

    ssh -t kepler bin/irc -D 1083 -L 3128:localhost:3128
This provides me with a single three-letter command to log in to the remote machine, set up appropriate port-forwarding, and automatically run a script, which itself contains:

    #!/bin/sh

    if [ -f /tmp/jreese.agent.pid -a -f /tmp/jreese.agent.sock ]; then
            echo "Socket and PID files found; loading..."

            export SSH_AGENT_PID=`cat /tmp/jreese.agent.pid`
            export SSH_AUTH_SOCK=`cat /tmp/jreese.agent.sock`
    else
            echo "Socket and PID files not found; starting SSH agent..."

            UMASK=`umask`
            umask 077

            eval `ssh-agent`;
            ssh-add $HOME/.ssh/id_rsa

            echo "Agent PID: $SSH_AGENT_PID"
            echo "Agent Socket: $SSH_AUTH_SOCK"

            echo $SSH_AGENT_PID > /tmp/jreese.agent.pid
            echo $SSH_AUTH_SOCK > /tmp/jreese.agent.sock

            umask $UMASK
    fi

    screen -Rd irssi -c ~/.screenrc.irssi -p 1
EDIT: do note that this script is not completely secure, because it relies on my knowledge that I am the only person with login access to my server. Otherwise, you should be adding some extra checks to the script to ensure that you are using files actually created by your own uid. I don't know the full potential of problem if someone created those files from a different UID knowing that you'd be using them. Anyways...

This script sets up a persistent, "secure" SSH key agent on the remote machine that can be reused for as many disconnects and reconnects as I feel like making until the server (if ever) needs a reboot. Then it starts or reconnects to a named screen session that I can continue using as if nothing ever happened.

Combine this method with a few different aliases as needed, and a local session key agent to only input your key's passphrase once, and then after a disconnect, press up-enter in each terminal as necessary, and boom, you're back in business.

--

On a related note, a drop of network connectivity should not be killing your SSH connection, especially for as short a time span as one second. SSH is designed to stay connected through at least 30 seconds of network loss; after the connection is regained, it should automatically reconnect to the SSH server and continue the session where it left off, even maintaining a buffer of unsent input during the connection loss.

I've personally suspended and then unsuspended my laptop within a one-or-two minute period without losing my SSH session, althought that's likely stretching things.

What's certain is that a 1-2 second lapse in your connection should most certainly not be dropping your SSH connection; you should definitely be investigating that to figure out what the problem is.


Is there a difference between IoC and callbacks? In any case, I don't think it can be said to be -quite- that recent.


amazon mp3, lastfm; that's about it here.


Certainly not the time to quit your day job and then try a start-up, but i don't see why you couldn't throw together your startup in your spare time. Is there a reason you need the 'time-consuming adventure' to actually consume so much time? It'll take longer to launch but on the whole, be less risky.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: