Arc Forumnew | comments | leaders | submitlogin
How does HN use firebase?
3 points by printf 3689 days ago | 5 comments
HN recently exposed an API through firebase. How did they do it?

Are they having news.arc push a json to firebase in the `submit-item` method? Or are they checking the profile/ story/ vote/ folders every n seconds, convert, and push that?

PS: CSS is broken for arclanguage.org.



3 points by kogir 3681 days ago | link

We accumulate modified items and profiles by hooking save-item and save-prof. Then every 30 seconds or so we submit an update batch to Firebase using their REST API.

The biggest pain was fixing up Racket's HTTP libraries to support HTTP pipelining correctly and writing our own streaming JSON serializer than minimizes the frequency and lifetime of allocations.

-----

1 point by tvvocold 3678 days ago | link

will arc forum update in future? just like hackernews.

-----

1 point by akkartik 3689 days ago | link

Yeah, I've informed the HN admins. But we have no insight into the current code, I'm afraid.

-----

1 point by tvvocold 3688 days ago | link

could they github(opensource) that?

-----

1 point by printf 3689 days ago | link

Thanks Kartik! Any ideas how one can go about it?

-----