Standardized API for Plugs #2
Labels
No Label
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
Ready for Development
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No Milestone
No project
No Assignees
1 Participants
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: anthrove/e621-sdk-go#2
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The e621-Plug is the first plug of many, so we need to define a protocol, so the Orchestrator can talk with the different Plugs.
Possible Layer:
Comunication Layer / Endpoints
PlugStatus:
Return the Status of the Plug and possible some information about the threads and jobs
CreateScrapeJob:
Info from orchestrator to Plug to scrape a specific user
JobStatus:
Return the Information / Status about the job (if he is running, canceled, finished)
JobFinished:
Send an Information from plug to orchestrator that the job is finished
Transport Layer / Protocol
MQ (MQTT / AMQP):
Create different topics to send and receive information
Pub/Sub (Redis):
Create different topics to send and receive information
RPC (gRPC):
Define a protobuf protocol and send and receive with example bidirectional streams the information
Websockets:
Create websocket connection and send information in both directions (JSON serialized)
REST:
Define some rest endpoints and get information by checking regular times if something changes
IRC:
Parse objects to JSON → Hastebin (because of max length in IRC message) → IRC server. It is a custom pub sub model
I've put together a few rough ideas just to mention them. As far as the communication layer is concerned, I don't think we need any more. If others are needed, please feel free to mention them.
As far as the transport layer is concerned, something like Redis is interesting, as it makes it very easy to reach all plugs, especially when scrape jobs are commissioned. However, it becomes more difficult if you expect answers. So if we agree that plugs only need to receive jobs and no further communication is needed, I would suggest using a pub/sub system.
If that is not the case, we should use either gRPC or REST. REST because it is simple and rudimentary. It is also a common protocol that is supported everywhere.
gRPC has the advantage that it is very performant and also because of the .proto files it is a versioned protocol, which necessarily also reflects the documentation of this protocol.
Unfortunately, I don't know enough about MQTT to say anything about it.
Would you like to share your thoughts on this @daskadse
Wrong Repository