I have an algorithm. I'd like to publish this in an open access journal under the creative commons license. But I'm also considering a patent. How do these processes sit together? Does publishing in this way, or in any way for that matter, essentially preclude the chance of holding on to commercial rights, however these are defined?
The Creative Commons family of licenses are copyright licenses. They license the copyrightable expression contained in your work. A creative written text can be covered by copyright, granting the author exclusive right to make copies or derivatives of the work. (That right can then be licensed to others, e.g., by a Creative Commons license.) By contrast, a novel mechanism or system can be monopolized by a patent. If you secure a patent on your system, no one else is allowed to employ the system in their device, software, etc. without your permission.
The idea-expression divide is a legal concept that separates an idea (which is not copyrightable) from its expression in a tangible form (like the text of an article, which is copyrightable). The famous case Baker v. Selden spells out this distinction in U.S. case law:
To give to the author of the book an exclusive property in the art described therein when no examination of its novelty has ever been officially made would be a surprise and a fraud upon the public. That is the province of letters patent, not of copyright. The claim to an invention or discovery of an art or manufacture must be subjected to the examination of the Patent Office before an exclusive right therein can be obtained, and it can only be secured by a patent from the government.
The copyright held on the text of a book is totally separate from a patent monopoly that may be held on a system described in the book.
Furthermore, version 4.0 of the Creative Commons Attribution license (and probably all CC licenses) says in Section 2, b(2):
Patent and trademark rights are not licensed under this Public License.
Generally, therefore, when you grant a copyright license for the text of your article, that license does not impact your ability to monopolize via patent the system described in the article.
However, you may sabotage your ability to secure a patent on your system because the publication of your article will constitute public disclosure. In the United States, you have one year from public disclosure to make a patent application before your system becomes ineligible for patent. In other jurisdictions, you may have a different amount of time or no time at all (i.e., your system becomes ineligible for patent immediately upon public disclosure). Note that public disclosure occurs whenever you make your article public, regardless of how you license your article.