Page 13 of 55 - Previous page
Creating redirects for query string parameters in AWS S3
01/03/13 00:00:00
Important Update
There is a hard limit of 20 for the number of Routing Rules allowed for a given static website on S3. This means that, while the method used at the end of this article does indeed work, it does not solve the problem if you have more than 20 links to rewrite. AWS is checking on a solution but as of January 16 I have no additional information.
Part of what I'm doing with this blog reboot is figuring out how to turn what was a dynamic website powered by Wordpress, and thus PHP, into a static site running on S3. There are several reasons why I wanted to do this:
1) Static sites are inherently more secure. I just got fed up with keeping both Wordpress and PHP up to date when what I really wanted to do was just write.
2) I wanted to eat the Rails dogfood a bit more
3) Its cheaper and faster. A hell of a lot faster.
The problem is that much of what I had done with the Wordpress blog was based on query parameters. I'd never really bothered with the permalink parameters (i.e. an article link is foo.com/?p=4 vs foo.com/article4.html). So even though its fairly easy to import the old Wordpress articles into Middleman and to put the comments into Discus, none of the old links would work. And that's bad for SEO and just a bad user experience.
So how do you mimic Wordpress' permalink feature where foo.com/?p=4 redirects to an actual link on S3? Its just a 301 redirect so why not create an S3 object and set the objects metadata to force a redirect. So I created an object with the name “?p=4” (which S3 diligently let me do). But you couldn't access it because S3 converted it into escaped form “%3Fp%3D4”. So that doesn't work.
But after digging I found that each bucket configured for serving static websites has a customizable routing policy section in its base configuration. The cool thing is that these policies accept anything and don't attemp to do encoding. So something like this is possible:
Go ahead try clicking on this URL: http://rocketforge.org/?p-4. It should cause a 301 redirect to an actual article. All based on S3. Not a single line of PHP anywhere.
<RoutingRules>
<RoutingRule>
<Condition>
<KeyPrefixEquals>?p=4</KeyPrefixEquals>
</Condition>
<Redirect>
<ReplaceKeyPrefixWith>
2013/01/02/predictions-for-2013.html
</ReplaceKeyPrefixWith>
</Redirect>
</RoutingRule>
</RoutingRules>
Comments
Predictions for 2013
01/02/13 00:00:00
I posted this on Facebook on New Years Day but this version is more complete and typo free. There's nothing really earth shattering about these. But then again, progress looks awfully linear in the short term but is surprisingly exponential in the long term. Enjoy:
1) The Supreme Court will declare gay marriage bans unconstitutional in late 2013 or early 2014 because they violate the full faith and credit clause. This may precipitate Waco/Ruby Ridge style confrontations in certain parts of the country.
2) The economy will continue to sputter along but the labor force participation rate will continue sideways as the move to long term social security disability continues. Don't expect non-government components of GDP to break 2.5%.
3) SpaceX will continue to deliver cargo to the ISS. Grasshopper will fly a full profile. Falcon Heavy will roll out but first flight is delayed until 1st half of 2014.
4) Planetary Resources completes its first spacecraft but launch won't be until 2014. Orbital Sciences launches its first COTS demo flight. It reaches orbit but fails approach tests. Someone announces a Cubesat to Mars mission.
4) Both Apple and Google will come out with wristwatch form factor devices. Google Glass will come out but will be a yawn until people start hacking them. Camera based gestures (i.e. Leap Motion) gets the full hypecycle treatment.
6) Google Plus releases an API. Depending on the details this may kill app.net and could begin a slow move of users from Facebook to Google+. It won't be enough to save Google+, though.
7) Democrats will propose a new version of the assault weapons ban but it won't go anywhere in the House or Senate. The Supreme Court will continue to refine the Heller decision.
8) The 2014 mid term election campaign starts on January 1, 2013.
9) Federalism begins to be actively discussed again as a solution to America's ungovernability. OK. That last one isn't a prediction so much as a personal wish of mine. If something like this doesn't happen then expect Permanent Tourist consultancies to become more popular.
Comments
An Article Every Day
01/01/13 00:00:00
Today is January 1, 2013. The first day of a new year and that seems as good a time as any to reflect on 2012 and plan for 2013. While 2012 was an interesting year, I think its time to be a bit more proactive about 2013. Time for some blade sharpening. This blog reboot will be part of that since I plan on following David Cummings example and posting at least one new blog entry every single day of 2013. That's 365 articles.
My other blade sharpening tasks will include some coaching, recommitting to (Getting Things Done)[http://www.gtdtimes.com/], strategically closing some doors, and spending more time with my awesome wife.
On a technical note I a rebooting the blog by dropping Wordpress and PHP entirely and going to a static site hosted on S3. I'm using Middleman as the framework and Twitter Bootstrap for layout. The result is that the site is completely static HTML served by Amazon's AWS infrastructure. I.e. no web spam hackers putting Viagra ads into insecure PHP.
Reboot tasks to be completed: setup Discus, import/convert all of the old articles, setup redirects from the old URLs (gotta keep the link juice flowing!), and import old comments into Discus. I'm not 100% happy with the theme either so expect some tweaking.
Comments
On The Nature of Compromise
10/31/12 00:00:00
Compromise is something you do when you are negotiating around an agreed upon goal. If I want to buy something from you and you want $2 for it and I only want to pay $1 then $1.50 can be called a compromise. If both sides agree then both sides win.
But when the goals aren't the same that can't be called a compromise. Asking me to buy something at $2 when I don't want it at any price but then forcing me to pay $1 for it instead is not a compromise. That $1 is not some mutually agreed upon middle ground of sane policy making. It creates perverse incentives and deep seated resentment that after repeated “compromises” turns into hatred and violence.
You can't call it a compromise if one side loses. And, as some like to say, you think that good compromise is when both sides lose, if all you do is keep losing eventually you will refuse to play.
Comments
Decelerating Lunar Gravity Assists To Return From BEO
03/27/11 00:00:00
So I asked this one twitter a few minutes ago:
bq. so why can't you use decelerating lunar gravity assists to go from BEO trajectories into circular LEO orbits? Why do we need aerobraking?
There are many references to using gravity assists to decelerate spacecraft. I've found one reference to using it to enter into a circular earth orbit using the moon at Mark Prado's PERMANENT site. I guess I'm still thinking there has to be a solution to Rand's Decoupling problem that doesn't require aerobraking.
Comments
Moon Firsters
12/15/10 00:00:00
A thread on SpacePolitics.com had to be cutoff before I could respond to a few questions so I thought I'd bring it here. While the intent of the original post by Jeff was lost, the context of my comment was the “Moon Uber Alles” view held by some on the thread. As a former Moon Society Chairman and co-founder of an RLV company I thought I had something useful to add: This was my original comment: bq. I spent several years helping the Moon Society and eventually became its chairman. I helped run business tracks at the Space Frontier Foundation's lunar conferences. No need to convince me that the moon has a lot to offer.
But I left the Society when I finally realized that low cost access to space was necessary for anything other than watching a few government employees planting flags. I said then and I say it now: it has absolutely zero to do with technology and hardware and absolutely everything to do with business models.
That's why I'm out here trying to build a suborbital RLV company.
The only way to get to the moon to stay is by developing free cash flow from each and every step on the way to getting there. And yes, I think that does mean an NEO mission before you try to for the lunar surface again. But that's the beauty of business models, there are so many to chose from. If you feel differently and can find the investors then go for it.
If you truly are a “moon firster” then your best best is GLXP teams on a SpaceX vehicle, not recreating Apollo expecting to get different results.
After that a few people asked some question but the comments were closed before I could respond. Those responses are here:
bq. Bill White wrote @ December 13th, 2010 at 6:29 pm
@ Michael Mealling
How will a NEO mission generate cash flow?
To be clear, I very much agree with this:
I said then and I say it now: it has absolutely zero to do with technology and hardware and absolutely everything to do with business models. * * * The only way to get to the moon to stay is by developing free cash flow from each and every step on the way to getting there.
Persuade me there will be cash flow coming from a NEO mission and I will advocate for NEO missions. But right now, I just don't see how revenue will flow from NASA doing a NEO mission.
The art of making each mission (version) pay is in defining a minimally viable product. The idea I have is to find a very small NEO (2 cubic meters at most), grab it with a net-like grappling system, and then bring it back to LEO to dock with the ISS. Sell research access to it, cut off slices and bring 'em back for collectors, etc. Be a little careful about which NEO you pick (by makeup and orbital elements) and you can make it profitable. Use the cash flow from operations for that mission to pay for the next one where you go after a different type. Each version/mission creates the base funding for the next one.
bq. Bill White wrote @ December 13th, 2010 at 6:33 pm
IMHO, GLXP teams should also push the “co-brand with Google” meme when seeking sponsors.
For example, “Acme Corporation is proud to partner with Google to send XYZ Team to the lunar surface” - even if Acme doesn't give a flying fig about space exploration, being a Google partner is brand value platinum.
Maybe some GLXP teams are doing this and I just haven't seen it.
But this is an example of making money from aspirations and inspiration rather than tangible lunar resources.
Bill, I know that they can use the GLXP brand in limited ways. I'm just not sure about the boundary conditions. Making money from sponsorships based on aspirations and inspiration is all part of branding and is a valid part of the way ventures make money. Some our country's most successful companies are successful because of the aspirational nature of their brands.
Comments
Obama's Conservative Plan for American Leadership in Space
02/01/10 00:00:00
or “How a Democrat out-Republicaned George Bush on Space Policy
Two links that help with the background:
Just to get it out of the way early: I'm a conservative leaning libertarian with the street cred to prove it. I helped organize the first Tea Parties in Atlanta. I helped Harry Browne around Atlanta during his Libertarian Party campaign for president and was even one of his electors for Georgia. I left the Libertarian Party after 9/11. I'm not sure how involved in the GOP I want to be but that seems to be a general issue with all conservatives these days.
The point of all that is to say this:
President Obama's new policy for NASA is the most fiscally conservative and downright capitalist policy to come along since the agency was founded.
What the President is proposing is that NASA follow with the Augustine Commission called "Flexible Path”. The commission made several observations that are key to understanding why what the President is doing is so important to NASA's future:
- We explore to reach goals, not destinations. It is in the definition of our goals that decision-making for human spaceflight should begin. With goals established, questions about destinations, exploration strategies and transportation architectures can follow in a logical order. While there are certainly some aspects of the transportation system that are common to all exploration missions (e.g. crew access and heavy lift to low-Earth orbit), there is a danger of choosing destinations and architectures first. This runs the risk of getting stuck at a destination without a clear understanding of why it was chosen, which in turn can lead to uncertainty about when it is time to move on.
- After a list of things that space exploration returns such as spinoffs and science, the Committee had this to say, “… human exploration also should advance us as a civilization towards our ultimate goal: charting a path for human expansion into the solar system. It is too early to know how and when humans will first learn to live on another planet, but we should be guided by that long-term goal.”
- Commercial involvement in exploration: NASA has considerable flexibility in its acquisition activities due to special provisions of the Space Act. NASA should exploit these provisions whenever appropriate, and in general encourage more engagement by commercial providers, allocating to them tasks and responsibilities that are consistent with their strengths.
What the rumors and leaks are suggesting is that President Obama has embraced the committee's findings and is redirecting NASA to implement the Flexible Path option, including the use of commercial providers for manned launch to Low Earth Orbit (LEO).
What is Flexible Path exactly and why is it preferable to NASA going back to the moon using its own rockets? The gist is that Flexible Path is about building up the capability to go anywhere and do it without going broke. Flexible Path is about going to Venus, Phobos, Near Earth Asteroids (NEAs), Lagrange Points, and yes, even the Moon and Mars when you can figure out how to do it without killing yourself from radiation poisoning. So no, we're not abandoning the Moon, we're not abandoning manned spaceflight, and we're not turning it over to the Chinese. Here's one example of what a Phobos landing might look like.
- Multi-vendor This means that there is no one critical path vendor for launch and possibly on orbit assembly and fueling. One of the problems with Shuttle and even Russian launchers is that if there is a problem the entire line is shutdown while the problem is fixed. With multiple launch providers you can keep flying even if one is having problems.
- Multi-capable This means that you're not stuck with one design that can only do a few things well. Shuttle does a few things well but it can't stay on orbit very long and it is monstrously expensive to fly when all you want to do is deliver water.
- Multi-destinational This means your launch architecture is flexible enough that you use the same systems, people, and infrastructure to go to ISS, an NEA, or Phobos. Each new destination doesn't need a custom designed one-off system (what in business we call a silo).
The easiest way to answer that is to compare what is being done commercially and what NASA has done lately. First lets take NASA. What many people don't realize is that NASA hasn't designed a rocket in over 30 years. The people who did that are long gone. NASA has built the International Space Station, though. That means it has a lot of current knowledge on how to do in space assembly of very complex hardware. The Constellation program which is NASA's plan for building its own system of rockets is WAY over budget and behind schedule. This partly due to Congress limiting its budget but also due to NASA not designing the system to be operationally efficient. With rockets about 80% of your operational costs are fixed before you ever bend a single piece of metal. NASA simply has no incentive or desire to design something for operational efficiency.
Now lets look at the commercial side. There are numerous companies who have been or are about to fly new rockets:
- Boeing - Delta IV, including the Delta IV Heavy which can lift 28.5 metric tonnes to LEO - 11 flights to date
- Lockheed - Atlas V, 29.4 metric tonnes to LEO - 18 flights to date
- SpaceX - Falcon 9, 10.4 to 29.6 metric tonnes to LEO, designed to be human rated - still in development. First flight expected in March.
- Orbital Sciences - Taurus II, 5.5 metric tonnes to LEO, still in development
- Bigelow Aerospace - Sundancer, an inflatable space station habitat. Gensis I and II already on orbit
_The final point of all this is to encourage all of my friends on the “right” to take this gift from Obama and run with it. We may not agree with the President on much but on this we can. _
If you're curious what you can do about this you can call your elected representatives about it. There are parochial interests out there that are looking to derail this effort because it threatens politically connected jobs in certain districts. Some of even Republicans who twist themselves into the most contorted kind of logic in order to justify spending billions of taxpayer money on a big government program. Yes, I'm talking about you Senator Shelby.
Comments
Low Cost/Low Energy NEO Mission?
09/19/09 00:00:00
Thought experiment: Are their Near Earth Asteroids you can get to with what you can fit as a secondary payload in a PPOD?
Comments
The more Congress is involved in space the more it becomes made of FAIL
09/15/09 00:00:00
I'm watching the House Committee on Science and Technology's hearing on the Augustine Committee's summary report. This committee hearing is a complete cluster fuck. Mr. Augustine has repeatedly said that Constellation would make a good program if it had the extra $3 billion. He even said that Ares I is safe. He is simply not defending his Committee's own findings. Even our ally Dana Rohrabacher ripped the findings apart. h2. I'll state it here now: if this continues then our national space program will never go anywhere ever again. I think we just lost our space program. The ONLY option left for an American lead expansion into space is for the private industry to route around this steaming pile of shit.
Comments
Augustine Commission Summary Report: Now What?
09/08/09 00:00:00
So the Augustine Commission published their Summary Report today. At this point the food fight is beginning. ATK and other contractors are starting to spew FUD faster and harder than Microsoft ever did. The question we have to address now is how to make sure the Obama Administration picks the Flexible Path option. Ideally it would pick the Flexible Path option with an EELV for the heavy lift component. But I suspect that either Ares V Lite or Not Shuttle C will be the bone thrown to Northern Alabama in order to buy Senator Shelby's silence. The important thing is to make sure commercial crew, suborbital science, and fuel depots stays in.
There are several key findings: bq. “Commercial crew launch to low-Earth orbit: Commercial services to deliver crew to low-Earth orbit are within reach. While this presents some risk, it could provide an earlier capability at lower initial and lifecycle costs than government could achieve1. A new competition with adequate incentives should be open to all U.S. aerospace companies. This would allow NASA to focus on more challenging roles, including human exploration beyond low-Earth orbit, based on the continued development of the current or modified Orion spacecraft.†[Page 16] Commercial crew is faster and cheaper: bq. “The United States needs a way to launch astronauts to low-Earth orbit, but it does not necessarily have to be provided by the government. As we move from the complex, reusable Shuttle back to a simpler, smaller capsule, it is an appropriate time to consider turning this transport service over to the commercial sector. This approach is not without technical and programmatic risks, but it creates the possibility of lower operating costs for the system and potentially accelerates the availability of U.S. access to low-Earth orbit by about a year. The Committee suggests establishing a new competition for this service, in which both large and small companies could participate.†[Page 9] Are there other ways commercial industry should participate? bq. “The cost of exploration is dominated by the costs of launch to low-Earth orbit and of the in-space systems. It seems improbable that significant reductions in launch costs will be realized in the short term until launch rates increase substantially—perhaps through expanded commercial activity in space. How can the nation stimulate such activity? In the 1920s, the federal government awarded a series of guaranteed contracts for carrying airmail, stimulating the growth of the airline industry. The Committee concludes that an architecture for exploration employing a similar policy of guaranteed contracts has the potential to stimulate a vigorous and competitive commercial space industry. Such commercial ventures could include supply of cargo to the ISS (already underway), transport of crew to orbit and transport of fuel to orbit. Establishing these commercial opportunities could increase launch volume and potentially lower costs to NASA and all other launch-services customers.
This would have the additional benefit of focusing NASA on a more challenging role, permitting it to concentrate its efforts where its inherent capability resides: for example, developing cutting-edge technologies and concepts, and defining program and overseeing the development and operation of exploration systems, particularly those beyond low-Earth orbit.†[Pages 9-10] One why to do this: bq. How will we explore to deliver the greatest benefit to the nation? *Planning for a human spaceflight program should begin with a choice about its goals—rather than a choice of possible destinations. *Destinations should derive from goals, and alternative architectures may be weighed against those goals. There is now a strong consensus in the United States that the next step in human spaceflight is to travel beyond low-Earth orbit. This should carry important benefits to society, including: driving technological innovation; developing commercial industries and important national capabilities; and contributing to our expertise in further exploration. Human exploration can contribute appropriately to the expansion of scientific knowledge, particularly in areas such as field geology, and it is in the interest of both science and human spaceflight that a credible and well-rationalized strategy of coordination between them be developed. Crucially, human spaceflight objectives should broadly align with key national objectives.
These more tangible benefits exist within a larger context. Exploration provides an opportunity to demonstrate space leadership while deeply engaging international partners; to inspire the next generation of scientists and engineers; and to shape human perceptions of our place in the universe. The Committee concluded that the ultimate goal of human exploration is to chart a path for human expansion into the solar system. This is an ambitious goal, but one worthy of U.S. leadership in concert with a broad range of international partners.
Comments