Skip to content
TORNLIFE More

Question @Splent: Feed/firehose from API

Started by pobk [3171827] on in API Development.

4 replies · 152 views · thread synced · 9 days ago · View on torn.com
About this thread

Posts archived: 5 / 5 posts (100%) · the total is Torn's reply count + the opening post at the last fetch

Counted by TornLife from the archived posts.

Archived posts
5
Discussion span
→
People posting
4
Likes on archived posts
6
Posts by staff, officers and moderators
1
Authority score
73 / 100
Historical score
31 / 100
Story score
30 / 100
Engagement score
52 / 100

Most-liked replies

pobk [3171827]

So, it occurred to me during one of my dubiously delightful debauched and daring dives into a disastrously drunken episode, that Torn may or may not have a message queue at it's core?

 

If this is the case? Can you spaff said queue out onto a RabbitMQ or MQTT feed at all, hell... even a HTTP/2 pipeline with JSON RPC?

Glasnost [1844049]

Extraordinarily unlikely. I mean, the data fed to the API isn't really by a queue to my knowledge, and they are used to communicate between some microservices, not all.

 

Plus, doing so would bypass all authentication, rate limits, logging, user control etc. Would it be possible to add an authentication mechanism of some kind to achieve this? Yes. Would it be worthwhile? No.

 

There's a reason APIs are the standard and not shared messages queues for loosely coupled and detached services.

 

And I may have asked for this many times, over many years, and been given a straight no.

Mauk [1494436]

Had they invested in real-time tech years ago, they'd probably have saved money by now given how much effort they put into scaling the game.

 

With the addition of web sockets in the new item market, it does seem like they're finally changing course on the "polling-everywhere" approach. If that implementation goes well, who knows, they might increasingly see value in adding real-time streams elsewhere and, just maybe, eventually the API.

 

Currently, yeah, probably a hard no.

splent [2088243] Admin Staff

In some of my first discussions with Ched, he mentioned he'd really like to implement something like API websockets to which players could connect. Both so they can get real-time data & to drastically reduce the amount of requests. 

It's just that the current focus is to build & standardize API v2 and refactor some of the codebase, but I'm sure this is a topic we'll revisit when I get to the point of request optimization.

Of course, any ideas & suggestions regarding that topic are more than welcome, so I appreciate bringing this topic up! 

pobk [3171827]

Without a view on the architecture, I couldn't possibly begin to make any suggestions... All previous experience (read: PTSD) of this kind of thing has been horrific and required much therapy afterwards.