Skip to content

Releases: SaltyAom/hifumin

Hifumin Bismarck

31 Jul 05:46
dc92cb7
Compare
Choose a tag to compare

Named after the German battleship "Bismarck" which is named after "Otto von Bismarck".

Bundesarchiv_Bild_193-04-1-26,_Schlachtschiff_Bismarck

Published at hifumin.app

Bismarck is a complete rewrite of Hifumin in SvelteKit instead of Nextjs with a lot of cutting-edge features, cloud saves, and solid structure for future development planned ahead.

But most importantly, notable features and changes are:

  • Rebranding from Opener to Hifumin
  • Seele, a fast custom search engine combined with Akashic Server
  • Migrating from Google Cloud to deploys.app, improving roundtrip by a lot, expected request in SEA is <100 ms
  • API Mirror server, which updates every 9 hours, no data is needed to scrap from nhentai API on production
  • API caching, with API mirror done, every update of the mirror will trigger the API server to redeploy with mirror server bundled as cache, no need for external request if data is in the cache, results in a very fast response time.
  • Galahad, a user data API server, save data across devices in the cloud.

Seele

Since Atago, Akashic, reverse proxy nHentai as GraphQL was created under Hifumin and published as a public API.

Everything is good with Akashic, it works like a charm.

Receiveing GraphQL requests then mirror requests to nHentai, a perfect reverse proxy API server.

But I feel like it can get better.

So I change the strategy from just-in-time to ahead-of-time requests.

Instead of getting data at the time of request which will have delayed around 0.5 seconds, Hifumin Mirror, a CRON service that get data from nHentai every 9 hours and publishes it to the Mirror server to reduce the load from nHentai.

Then after the publication of the mirror server, Hifumin Mirror then triggers the deployment of Akashic, bundled it with mirror server data into the container then public.

This results in absolute 0 external requests to nHentai API if requested hentai published more than 9 hours, as the data is read from the file system instead of waiting for API response.

The server is blazingly fast, less than 0.01ms to response (this included parsing GraphQL AST, reading from the cache, and calculating transform the response structure)

As the experimental feature of the custom Hentai Search Engine is finished, it's merged into Akashic and renamed Seele.

Migration from Google Cloud to deploys.app

Google Cloud is great, it has almost everything I could think of to create Hifumin.

However, it's too complicated for Hifumin.

You see, Hifumin is just a serverless container running alongside together, it needs no complex infrastructure at all.

Deploying Hifumin to Cloud Run is great, but after an enormous DDOS attack of 100M requests in less than 5 minutes, the billing spike.

Requiring me properly set up cloud-native infrastructures for HIfumin, and turned out it required a lot to receive that huge load.

These are services required to handle the setup Hifumin in GCP:

  • Cloud Run
  • Cloud Build
  • Premium Static IP
  • GCP SSL/TLS issuer
  • Layer 7 Load Balancer
  • Serverless Network Endpoint Group (Serverless NEGs)
  • Cloud CDN
  • Cloud Armor
  • VPC Group
  • Cloud NAT
  • Cloud Router
  • Serverless VPC Connector

There's too much service running for a free Hentai server, the billing is too expensive for me as my country pays a lot lesser than other countries, and as I gain an absolute 0 penny from Hifumin, I couldn't afford that.

FYxvKyPUEAEi_71

So I found with AcoShift in Svelte Meetup, and he talks about his service, deploys.app which only needs me to just published the serverless container and his service will handle the rest from:

  • Anti DDOS
  • Fast roundtrip time
  • Autoscaling
  • Cheap price
  • Price by CPU time

Behind the scene is an advanced K8S cluster running across a big cloud and backed by Cloudflare.

I also noticed that request made in SEA is now very fast, request is resolved in <100ms which feels almost instant.

After a month of using deploys.app, Hifumin costs is reduced by 28x compared to Google Cloud.

So, all Hifumin service is now running on deploys.app

Galahad

Bismarck introduces Galahad, a user data-center API.

Bismarck will now store data like favorite hentai in the cloud instead of on the device, to enable seamless and continuous reading from across many devices.

The database server is using PlanetScale, a cloud-native database that scales up to millions of queries/seconds and more.

And require seamlessly using Prisma, and ending in Fastify, one of the fastest server of Node.js

Hifumi

Hifumi is a frontend service of Hifumin (this current repo)

As mentioned, Hifumi is completely rewritten in Svelte instead of Nextjs which we gain:

  • Much cleaner codebase and architect
  • Even faster performance in both code execution and load time

We also handle caching, and rate-limit inside the container via Varnish, and NGINX.

Styling is entirely rewritten from scratch with the help of WindiCSS, resulting in no unused style or component at all.

And with a custom GraphQL library written, Hifumin can be fully utilized efficiently way to handle GraphQL requests and caching.

All these combinations working together, make the Hifumi feels almost instant.

Outline

It has been around 9-10 months since last released, Hifumin has grown so much since the idea for Stupid Hackathon Thailand.

I couldn't have thought that I would end up creating one of the most advanced hentai platforms out there.

But besides it is a hentai platform, I've learned so much and grown with it.

I feel happy to be working on this project, and I couldn't be here without all of your support of Hifumin.

Opener Atago

20 Nov 13:53
Compare
Choose a tag to compare

Atago

A complete rewrite of Opener Studio, named after Cruiser "Atago".
image

Now publish to as master, or alternatively for future visitors see atago.opener.stdio.

Opener Atago is a complete rewrite of Opener with a modular approach in mind.
Atago now includes many whole new features down to the structure of the code.
But the most important is a solid base for the future.

Notably new features:

  • GraphQL API named "Akashic"
  • Reverse Image Search.
  • Settings UI overhaul
  • Running on Cloud Run
  • Cloudflare

Akashic.

New API is now introduced, named "Akashic".
It's a rewrite of the API server as a GraphQL server written in Rust.
Akashic is free to use, no API key, if you're interested in nHentai API and want GraphQL, Akashic is a good option.

Currently is now deployed at akashic.opener.studio, soon will be implemented to (api.opener.studio)[https://api.opener.studio/] with version prefix, eg. /v1.
Akashic will be marked as /v2.

Searchable (beta)

Opener now introduced new feature, reverse image search.
You can now find sources from images, it's, in fact, using a reverse proxy API server for SourceNao, called Searchable.
It's now deployed at (searchable.opener.studio)[https://searchable.opener.studio]

Settings UI Overhaul

New settings UI page.
Settings are now grouped for easier usage for adding new features in the future.
Also, settings are now searchable built directly in the settings tab search bar.

Cloud Run

Opener is now running on Google Cloud Run.
As I was creating Opener, I realized that Opener is almost stateless.
Opener's strategy is in fact short-lived dynamic generated content. The requested page is generated and has a short-lived time which helps improve the response time and eliminates redundant requests generation while keeping the content fresh.

This is why Opener is now running in a serverless environment on Cloud Run.
Using Cloud Run helps improve a lot of performance from the old host and will be running for a long time.

Cloudflare

Opener is using Cloudflare for caching.
Cloudflare provided a lot of fine features especially caching and serving data from Edges which helps improve a lot of response time for almost every cases.

Using Cloudflare rules, Opener is now cached generated content with dynamic caching time improving TTFB on both web and APIs.

Opener is now faster than ever thanks to Cloudflare.

Outline

Atago is a great start to a bright new future.
Atago has a strong based and solid foundation.
I'm thrilled to be working on this project and thanks to you for your support of using Opener.