Category: Programming

Even better encryption of user data

With our most recent upgrade of our codebase to PHP 7.3, we’ve also gone the extra mile in terms of making our customers’ data even safer than before.

We always want to keep our users’ sensitive data as safe as possible. For example, some Spin Rewriter users are using the “remote posting” feature of our optional WordPress License. Those users tell us the username and password they’re using with their WordPress website so we can post new high-quality & unique content to their website on their behalf.

But we want to keep this information as safe as humanly possible. That’s why we’ve now upgraded our encryption algorithms from using the mcrypt_* class of functions to the newer and even more secure openssl_encrypt_* class of functions.

When it comes to security and privacy, there is absolutely NO excuse for not doing your very best — and that’s why we’re always on the cutting-edge of technology when it comes to important things like that.

This was definitely a behind-the-scenes upgrade that is completely transparent to our users — but it makes a big difference in the long run. 😉

PHP 7.3 benchmarks

My previous post about our recent upgrade to PHP 7.3 has been incredibly well received — thank you to everyone who reached out or sent me an email with follow-up questions!

The most common question of them all, though, was this:

“What kind of performance improvements and speed-ups did you notice in your particular real-world case?”

And honestly, I’m more than happy to share our results publicly, as we’ve been running benchmarks on every new version of our codebase for years now — and this way I can put those benchmarks to an even better use. 😀

Compared to PHP 5.6 that we had been previously running for a relatively long time, the newest PHP 7.3 performs amazingly well:

  • When processing large-scale data, we can now run 1,000,000 standardized operations in 0.453 seconds where that same work-load took 0.818 seconds before. These results have been measured repeatedly over roughly 100-million-op work-loads, with averages taken. That’s an 80.5% improvement!
  • When running a really complex operation on a somewhat sizable dataset, we now get the same result in 10.48 seconds that previously took 14.84 seconds — which is another 41.5% improvement.
  • And finally, under simulated heavy website traffic load, our website can now serve 285% as many requests per second as it could before! In other words, that’s a 1.85x speed-up.

These results are mind-blowing for something that required us to rewrite a relatively small part of our codebase! Although, there is a caveat…

As soon as we started the required rewrite of the incompatible parts of our code, we decided (in true programmer fashion!) to pull off a major multi-month code-refactoring effort that touches virtually all of our existing code.

And as a final result, we’re looking to get the average performance increase somewhere into the 300-400% range… while making our code even more robust!

It’s going to be a huge win for both our customers and our dev team, and we couldn’t be more excited about it! Stay tuned! 😀

Cutting-edge PHP 7.3

This past year we’ve been working so much on back-end stuff that is silently making Spin Rewriter even better and faster that I sometimes struggle to tell you about all the updates we’ve been rolling out.

Remember my recent two posts about the Spin Rewriter website switching to HTTP/2 and about the huge code refactoring process that is currently underway?

Well, a significant part of our front-end (customer-facing) code that makes the Spin Rewriter website work is written in PHP. Yes, the same good old PHP that powers 79.1% of the web, including Wikipedia, Facebook, all WordPress websites, etc.

And recently, a new version of PHP was officially released. This brand new PHP 7.3 version makes the language more robust than ever, while — and this is equally as important! — making it incredibly fast.

Now, most times when there’s an update to an already established programming language or an interpreter (which is the software that actually takes your PHP code and runs it), the improvements are absolutely minuscule.

But this recent upgrade to PHP 7.3 is vastly different. Who better to tell you all about it than the creator of PHP, Mr Rasmus Lerdorf, himself? Here’s a short video that takes you from the beginnings of PHP to what makes the newest PHP 7.3 so special…

The takeaway is this: The PHP team worked extremely closely with Intel engineers to make the newest version of the language perform as well as it possibly can on modern CPUs, with their low-level caches, branch predictors, etc.

The results speak for themselves — just check out these benchmarks!

In most cases PHP 7.3 is 150-200% or even 300% faster than PHP 5.6 which was the standard up until very recently, and what the Spin Rewriter website was running on until last year.

And at last, this brings me to my final point: YES, if you noticed a significant speed-up when using Spin Rewriter about two months ago, that was because we’ve now been running the newest PHP 7.3 on our live (production) servers for quite some time!

It’s this sort of behind-the-scenes work that makes a HUGE difference in the final user experience. And we’re happy to keep up with the times for our amazing customers — which is you guys! 😀

Our API just got a speed boost!

You know how Spin Rewriter comes with a super powerful API that lets you use the full power of our ENL Semantic Spinning technology from within other apps, and other software tools?

Well, we just rewrote and optimized some core parts of our API endpoint service, which means — in practice — that your API requests will now process even more quickly. I’m sure that for some of our heaviest users, this will be quite a game-changer! 😀

(Even) better parsing of HTML tags

It’s no secret that Spin Rewriter is an absolute champ when it comes to parsing HTML code that your texts have been wrapped into.

In other words, Spin Rewriter doesn’t play nice just with simple texts that consist of headings and paragraphs and little else.

It also plays nice with texts that include HTML tags, links, images, unordered and ordered lists, italics, bolded sections, etc. All of this extra HTML code that’s usually thrown into the middle of sentences trips up most text-processing software products out there, but it’s been one of our primary focuses since the beginning — and it shows.

With today’s update, we’ve taken care of two very minor, very sporadic issues that have popped up from time to time when parsing particularly tricky bits of HTML code inside your texts. So, at this points, we’re quite confident that when it comes to HTML, Spin Rewriter is — as usual — the undisputed market leader.

Here’s to you making the most of the power Spin Rewriter brings you! 😀

Even more API goodness! (Python)

Today I’ve got even more good news for all developers out there who are interested in integrating Spin Rewriter into their own software products!

As you probably know (that is, if you’re a developer), we’ve already gone a number of extra miles to make sure Spin Rewriter is super easy to integrate with other apps through our API.

Our API SDK library, written in PHP, is a work of coding art… and let’s not forget the famous integration of Spin Rewriter’s functionality with 3rd party applications in as little as 3 lines of code (literally!)… The response from the developers has been 100% positive since we rolled out the first version of our API, and we’re looking to keep it this way! 😉

Still, so far all our code samples and the API SDK library were only available in PHP… but today, this changes as well!

From now on, you will also find a 100% working Python API SDK library on the API page: http://www.SpinRewriter.com/api

The library itself is hosted on pypi.python.org — feel free to check it out right away! 🙂

Updated API code samples

We’ve just made things even easier for all developers out there who wish to integrate Spin Rewriter’s incredible power of ENL Semantic Spinning into their applications.

We’ve updated our (almost famous) working code samples, along with the brand-new Spin Rewriter API SDK (PHP Library & Examples), version 4.1.0.

With all this code ready to go, you can now integrate Spin Rewriter’s article spinning technology into your own software products with — literally! — 3 lines of code!

Of course our API developer documentation still tells you everything about all the features that are available through the API (which is all of them), and how to use them: http://www.SpinRewriter.com/api

Enjoy! 😉

“Replace All” functionality improved

We have just updated the “Replace All” functionality that’s been available since Spin Rewriter 2.0.

You can now pull up a list of synonyms of any given word or phrase by double-clicking (or selecting) it, and easily select the synonyms you want to use with all occurrences of that word or phrase. It will then either add or remove active synonyms of all words that convey the exact same meaning in your text.

This is one of about 35-40 updates that will be released with Spin Rewriter 3.0 on December 6th, so — stay tuned! 😉

Spin Rewriter now recognizes even the weirdest encodings

You might have noticed I picked the “Programming” category for this blog post. The reason for this is quite simple – this post won’t be very interesting to 95% of you who aren’t programmers. 😉

You see, out of thousands of active users, we have received about 2-3 customer tickets each month saying that Spin Rewriter somehow garbled up the original text. We’ve been looking into this for a while now, and we found out that:

  • 99.5% of all submitted texts are processed normally
  • texts that begin with the bytecode EF BB BF are encoded in the standard UTF-8 format (works well with Spin Rewriter)
  • texts that begin with the bytecode FE FF are encoded in the UTF-16/UCS-2, little endian format (some issues)
  • texts that begin with the bytecode FF FE are encoded in the UTF-16/UCS-2, little endian format (some issues)
  • texts that begin with the bytecode FF FE 00 00 are encoded in the UTF-16/UCS-2, little endian format (sporadic issues)
  • texts that begin with the bytecode 00 00 FE FF are encoded in the UTF-16/UCS-2, little endian format (sporadic issues)

For instance, if our user entered “It іs nevеr a сonvenіent timе tо hаvе уour vеhicle quіt оn уоu.” in the UTF-16/UCS-2, little endian format, Step 2 of the spinning process appeared fine, however Step 3 showed this: “It Ñ�s nevеr a Ñ�onvenÑ�ent timе tо hаvе Ñ�our vеhicle quÑ�t оn Ñ�оu.”

We have now resolved all these issues and Spin Rewriter will process all articles that you can throw at it. 😉

Reason for last week’s issues: HACKER ATTACK! :(

Those of you who are using your Spin Rewriter subscription and our other services to the fullest, have undoubtedly noticed that we were experiencing some issues last week.

Our servers usually became much less responsive at 30 minutes within every hour (8:30 AM, 9:30 AM, etc.) and these periods of low responsiveness lasted for 3 to 9 minutes most of the time. There were also some sporadic time periods of connection issues, these usually happened towards the end of the hour (5:46 PM, 9:48 PM, etc.). We launched a thorough investigation as soon as our monitoring systems started reporting these issues, and we’ve been working practically non-stop for 50+ hours in order to resolve these issues.

I’m sad to say that the primary reason for these issues was an outside attack. We’re still tracking the attacker and will have more information shortly. This attack only caused additional load on our servers, so there’s nothing to worry about – we’re just sorry that you had to deal with these issues at all.

Here’s to doing honest business, and never having to deal with things like this again! 🙂