Tag Archives: blogging

I Finally Got My Patent

Official Patent

My database patent finally has been granted after a long and expensive ordeal. While this is better than not having it granted after a long and expensive ordeal, it still was a truly pathetic reflection on the state of the American patent system. My perception (and, from what I can gather, that of most sensible individuals) is that the American intellectual property system as a whole is broken beyond repair and is one of the primary impediments to real innovation in this country. The system only serves large corporations with deep pockets and large teams of lawyers — and they mostly use it to troll smaller companies or build defensive portfolios to deter competitor lawsuits.

But enough about the sewage dump known as the US Patent system; my thoughts on it are unambiguously expressed here. Instead, this is a happy post about happy things. And what makes people happier than a stream database?

My patent is for a type of stream database that can be used to efficiently manage and scan messages, business transactions, stock data, news, or myriad other types of events. It is the database I wish I had when I was doing high-frequency statistical arbitrage on Wall Street, and which I subsequently developed and refined.

I’ll post a more detailed discussion of it shortly, but here is the basic gist. The idea is based on a sort of indexed multiply-linked-list structure. Ok, maybe that’s too basic a gist, so I’ll elaborate a little.

To use a common example from stock trading, we may wish to query something like the last quote before a trade in a stock. As an individual query, this is easy enough to accomplish in any type of database. However, doing it efficiently and in high volume becomes more challenging. Standard relational and object databases quickly prove unsuitable. Even stream databases prove inadequate. They either require scanning lots of irrelevant events to arrive at the desired one or waste lots of space through sparse storage and/or are constrained to data at fixed intervals. But real data doesn’t work that way. Some stocks have lots of trades and few quotes, others have few quotes and lots of trades. Events happen sporadically and often in clusters.

My approach is to employ a type of multiply-linked list. Each entry has a time stamp, a set of linkages, and a payload. In the stock example, an event would link to the previous and next events overall, the previous and next events in the same stock, and the previous and next events of the same type and stock (ex. quote in IBM or trade in Microsoft). To speed the initial query, an index points to events at periodic intervals in each stock.

For example, to find the last quote before the first trade in IBM after 3:15:08 PM on a given day, we would use the index hash to locate (in logarithmic time) the latest trade prior to 3:15PM in IBM. Then we would scan trades-in-IBM forward (linkage 3) until 3:15:08 to pick the latest. Then we would scan IBM backward (linkage 2) from that latest trade until we encounter a quote.

We also could simulate a trading strategy by playing back historical data in IBM (linkage 2) or all stock data (linkage 1) over some period. This could be done across stocks, for individual stocks, or based on other specific criteria. If there are types of events (example limitbooks) which we do not need for a specific application, they cost us no time since we simply scan the types we care about instead.

This description is vastly oversimplified, and there are other components to the patent as well (such as a flow manager). But more on these another time.

If you’re curious, the patent is US 11593357 B2, titled “Databases And Methods Of Storing, Retrieving, And Processing Data” (originally submitted in 2014). Since the new US Patent Search site is completely unuseable (and they don’t provide permalinks), I’ve attached the relevant document here.

Official Patent

The Art of Writing Circa 2019 in 44 Easy Steps

1. 1 minute: Come up with interesting observation or creative idea regarding a recent experience.

2. 10 minutes: Compose concise, eloquent, and impactful written expression of said idea in 6 lines.

3. 10 minutes: It’s too pompous. Remove 2 lines.

4. 10 minutes: It’s too vertiginous. Remove 2 lines.

5. 10 minutes: 2 lines is less pithy than one. Remove 1 line.

6. 10 minutes: It isn’t accessible to a broad audience. Remove all words over 3 letters, adjectives, adverbs, and any verbs of latinate origin.

7. 10 minutes: That one semicolon really should be a colon. People don’t like semicolons.

8. 40 minutes: It could be misinterpreted by the far left, the far right, the Koala anti-defamation league, or Mothers Against Mothers. Reword it.

9. 1 hour: Properly format the blog post. Italics? No, bold. No, italics. Maybe small-caps? That font really doesn’t look right.

10. 4.8 hours: Research current trends on google. Add the same 15 long-tail keywords to the title, description, excerpt, post metadata, twitter metadata, facebook metadata, and google+ metadata. Realize google+ doesn’t exist anymore and feel sad, as if you put out an extra place setting for that one late cousin whose name nobody remembers.

11. 6 hours: Locate a tangentially-related image with a suitable Creative Commons license. Realize the license doesn’t allow the modifications necessary to achieve an NC-17 rating. Find another image, this time with an open license on Wikimedia. Hope that nobody else had the brilliant idea to use a generic image of a college student with the word “Stock” overlaid on it.

12. 2 hours: Remove face from image to avoid any potential liability.

13. 2 hours: Thumbnail is different size than image on blog post is different size from instagram version is different size from flickr version. All involve different formats and much much smaller files than you have. Resize, reformat, and wish you weren’t using Windows.

14. 1 hour: Pick an appropriate excerpt, hashtag, and alt-image text.

15. 1 hour: Tweet, post, and instagram your idea as text, pseudo-text, image, and sentient pure-energy.

16. 2 hours: Cross-post to all 14 of your other blogs, web-pages, and social-media accounts.

16. 20 seconds: Realize that your long-tail keywords no longer are trending.

17. 20 seconds: Receive 2000 angry tweets. Realize your hashtag already refers to a far-right hate group, a far-left hate group, a Beyonce Sci-Fi fanfiction group, the political campaign of the 237th least popular Democratic candidate for President, the Lower Mystic Valley Haskell, Knitting, and Dorodango group, or all of the above.

18. 10.8 seconds: Beat Jack Dorsey’s own speed-record for deleting a tweet (which happened to be about Elon Musk tweeting about Donald Trump’s tweets).

19. 6 hours: Update long-tail keywords to reflect current trends. Realize that Beyonce Sci-Fi fanfiction is trending, and leverage your newfound accidental affiliation to comment on the irony of your newfound accidental affiliation. Then tweet Beyonce to ask if she’ll retweet you.

29. 5 seconds: Receive automated cease and desist order from Taylor Swift, who loans out her 2000 person legal team to Beyonce on the rare occasions it isn’t in use. Spot idling black limo full of tattooed lawyers outside window. One who looks suspiciously like Jennifer Pariser grins and gently drags her finger across her throat.

30. 4.2 seconds: Beat own recent world record for deletion of a tweet.

31. 28.6 minutes: Decide that social media is a waste of time. “Delete” all accounts.

32. 28.6 minutes: Decide that you need a professional presence on social media after all, and won’t be intimidated by Taylor Swift or her 2000 lawyers. “Undelete” all your accounts.

33. 1 minute: Decide original post is stupid, obsolete, and has several grammatical errors. Delete it.

34. 2 hours: Delete all variants of post on blogs, web-pages, twitter, facebook, and instagram.

35. 4 minutes: Just in case it’s really still brilliant, email idea to a friend.

36. 4.8 hours; Worry whether [insert appropriate gender normative or non-normative pronoun] likes it.

37. 1 minute: Try to interpret friend’s ambiguous single-emoticon reply.

38. 30 minutes: Decide you’re not going to let the establishment dictate what’s art, and that the post’s stupidity, obsolescence, and several grammatical errors are intentional and signs of unappreciated genius.

39. 12 minutes: Receive voicemail that you missed 2 consecutive shifts at Starbucks and are fired.

40. 30 minutes: Decide you’re not going to be an indentured servant to the establishment and will go it alone like most great artists throughout history.

41. 0.8 seconds: Realize you have no marketable skill, don’t know how to market a skill, and don’t even know what markets or skills are. Recall that most great artists throughout history had “Lord” before their name, got money from someone with “Lord” before their name, or died in penury. Consider writing a post about the injustice of this.

42. 0.2 seconds: Have panic attack that you’ll end up homeless, penniless, and forced to use the public library for internet-access. Google whether euthanasia is legal, and how many Lattes it would take.

43. 1 minute: Call manager at Starbucks, apologize profusely, and blame Taylor Swift for your absence. Hint that you have an “in” with her, and if the manager takes you back there may be sightings of Taylor Swift’s people idling in a black limo outside.

44. 6.7 hours: A sadder and a wiser man, you rise the morrow morn. You decide to share your newfound sadness and wisdom with others. Go to step 1.