Walk-through — How EFB works

EH Forwarder Bot adalah kerangka kerja yang bisa diperluas yang memungkinkan pengguna mengontrol dan mengelola akun dari platform obrolan yang berbeda di antarmuka yang dipersatukan. Ini terdiri dari 4 bagian: Saluran Utama, beberapa Saluran Cabang, beberapa Middleware dan Koordinator.

EFB Project Structure
master channel

The channel that directly interact with the User. It is guaranteed to have one and only one master channel in an EFB session.

slave channel

The channel that delivers messages to and from their relative platform. There is at lease one slave channel in an EFB session.

coordinator

Komponen kerangka kerja yang menyimpan contoh saluran, dan mengirim pesan antar saluran.

middleware

Modul yang memproses pesan dan status terkirim antara saluran, dan membuat perubahan dimana diperlukan.

Konsep untuk mengetahui

module

A common term that refers to both channels and middlewares.

the User
the User Themself

This term 1 can refer to the user of the current instance of EH Forwarder Bot, operating the master channel, and the account of an IM platform logged in by a slave channel.

chat

A place where conversations happen, it can be either a private chat, a group chat, or a system chat.

private chat

A conversation with a single person on the IM platform. Messages from a private conversation shall only has an author of the User Themself, the other person, or a “system member”.

For platforms that support bot or something similar, they would also be considered as a “user”, unless messages in such chat can be sent from any user other than the bot.

For chats that the User receive messages, but cannot send message to, it should also be considered as a private chat, only to raise an exception when messages was trying to send to the chat.

group chat

A chat that involves more than two members. A group chat MUST provide a list of members that is involved in the conversation.

system chat

A chat that is a part of the system. Usually used for chats that are either a part of the IM platform, the slave channel, or a middleware. Slave channels can use this chat type to send system message and notifications to the master channel.

chat member

A participant of a chat. It can be the User Themself, another person or bot in the chat, or a virtual one created by the IM platform, the slave channel, or a middleware.

message

Pesan yang disampaikan secara ketat antara guru saluran dan saluran budak. Hal ini biasanya membawa informasi dari jenis tertentu.

Setiap pesan setidaknya harus memiliki ID unik yang berbeda dalam saluran budak berhubungan dengan itu. Setiap pesan yang disunting harus dapat diidentifikasi dengan ID unik yang sama.

status

Informasi yang tidak diformat ke dalam pesan. Biasanya termasuk pembaruan obrolan dan anggota obrolan, dan penghapusan pesan.

Saluran Slave

Tugas dari saluran budak relatif sederhana.

  1. Menyampaikan pesan ke dan dari saluran utama.

  2. Mengelola sebuah daftar dari semua obrolan yang tersedia, dan anggota kelompok.

  3. Monitor perubahan obrolan dan memberitahukan saluran inti.

Fitur-fitur yang tidak sesuai dengan standar EFB model Saluran Budak dapat ditawarkan sebagai budak-tambahan-fitur.

Saluran Inti

Master channels is relatively more complicated and also more flexible. As it directly faces the User, its user interface should be user-friendly, or at least friendly to the targeted users.

Pekerjaan dari saluran inti termasuk:

  1. Menerima, memproses dan menampilkan pesan dari budak saluran.

  2. Menampilkan daftar lengkap dari obrolan dari semua budak saluran.

  3. Offer an interface for the User to use "extra functions" from slave channels.

  4. Memproses pembaruan dari saluran budak.

  5. Berikan antarmuka yang mudah digunakan sejauh mungkin.

Middlewares

Middlewares dapat memantau dan membuat perubahan atau membatalkan pesan dan status disampaikan antara saluran. Middlewares dieksekusi dalam urutan pendaftaran, satu demi satu. Sebuah middleware akan selalu menerima pesan-pesan yang diproses jika sebelumnya middleware tersedia. Sekali middleware membatalkan pesan atau status, pesan tidak akan diproses dan disampaikan lebih lanjut.

Footnotes

1

“Themself” here is used as a derived form of a gender-neutral singular third-person pronoun.